palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.73k stars 2.18k forks source link

Table line wrapping has a size limit #1903

Closed titatoverheks closed 6 years ago

titatoverheks commented 6 years ago

Bug report

Chrome latest, MacOS

Steps to reproduce

  1. Create a column with a really long text, e.g.
    "DUMB AND DUMBER" by Peter Farrelly, Bennett Yellin and Bob Farrelly FADE IN: EXT. PROVIDENCE, RHODE ISLAND - WINTER MORNING A PRETTY YOUNG WOMAN is standing on the street corner waiting for a bus. She's carrying books and looking very collegiate. A black stretch LIMOUSINE with darkened windows drives past, SLAMS ON ITS BRAKES, and backs up. The Young Woman stares at her reflection in the windows, wondering what this is all about. Finally, the REAR PASSENGER WINDOW zips down, revealing LLOYD CHRISTMAS, age 30. He's a pleasant-enough looking guy, if a little shaggy. He's wearing a dark suit. LLOYD Excuse me, can you tell me how to get to the medical school? I'm supposed to be giving a lecture in twenty minutes and my driver's a bit lost. YOUNG WOMAN (heavy European accent) Go straight aheads and makes a left over za bridge. Lloyd checks out her body. LLOYD I couldn't help noticing the accent. You from Jersey? YOUNG WOMAN (unimpressed) Austria. LLOYD Austria? You're kidding. (mock-Australian accent) Well, g'day, mate. What do you say we get together later and throw a few shrimp on the barbie. The Young Woman turns her back to him and walks away. LLOYD (to self) Guess I won't be going Down Under tonight... He SIGHS and zips the window back up. INT. LIMO Lloyd climbs through the driver's partition into the front seat. Then he puts a CHAUFFEUR'S CAP on his head and drives away. We see that HE'S THE DRIVER! The dispatch radio CRACKLES TO LIFE: DISPATCHER (V.O.) Carr 22, come in, car 22... Lloyd grabs his CB mike. LLOYD This is 22. DISPATCHER (V.O.) 22, where the hell are you, Lloyd? You're running late on the East Side pick-up. LLOYD Cool your jets, Arnie. I'm on my way. DISPATCHER (V.O.) Well hurry it up. And make sure you park legally. One more ticket and your ass is history. CUT TO: EXT. MUTT CUTS DOG SALON - DAY This building is white with black spots on it, like a DALMATION. Over the front door is an awning shaped like a DOG'S SNOUT, whiskers included. A van pulls up outside. The vehicle is decorated like a GIANT POODLE, with four legs hanging off the sides, a tail in the rear, and a dog's snout on the front grill. MUTT CUTS is written on the side of it. HARRY DUNNE climbs out. He's in his early 30s and dressed in a ridiculous BEAGLE COSTUME, including a CAP WITH FLOPPY EARS. He goes to the rear of the van, opens it, and a swarm of DOGS pile out. HARRY Okay, gang, single file. You know the rules: No pushing, no humping, and no sniffing heinies... The door to the shop opens and Harry's annoyed boss, MR. PALMER, sticks his head out. PALMER Hey, why aren't those mutts on leashes? HARRY The same reason you're not on a leash, sir -- because it's demeaning and it chafes like hell. PALMER Just get them in here now! They all have to be bathed and clipped in an hour. Palmer disappears back inside. Harry CALLS to the dogs but they pay no attention. He struggles to keep them from wandering off. He grabs a couple of SMALL POOCHES and sits them on a wall. HARRY You kids stay right here... As he turns to round up the other, we discover that the wall isn't a wall -- it's a flatbed truck. The truck drives away, taking the two dogs with it. HARRY (at truck) Hey, wait a minute! Harry chases after the vehicle. CUT TO: EXT. EAST SIDE ESTATE - DAY Lloyd Christmas pulls the limousine into a long, tree-lined driveway. He gets out and looks up in awe at an IMPRESSIVE STONE MANSION. He WHISTLES to himself, then walks to the front door and RINGS THE BELL. The double-front doors of the mansion open and MARY SWANSON appears. She's 25 and gorgeous. Lloyd's jaw drops open when he lays eyes on her. MARY Hello. (beat) I'll be just a minute... As Mary steps back inside, Lloyd takes out a tiny can of Binaca. He sprays his mouth, under his arms, his hair, behind his ears... CUT TO: INT. LIMO - DAY Lloyd is driving and Mary is in the back, looking out the window, lost in thought. She's got a BRIEFCASE resting on her lap and she fingers the leather nervously. Lloyd keeps glancing at her in the rear-view mirror, but for a moment he is speechless. Then: LLOYD Why you going to the airport? Flying somewhere? MARY (dead-pan) How'd you guess? LLOYD Well, I saw your luggage, then when I noticed the airline ticket, I put two and two together. (beat) So where you heading? MARY Aspen. LLOYD Oh, you're gonna love it. I hear California's beautiful this time of year. Mary looks back out the window and Lloyd sneaks another glance. LLOYD Name's Christmas. Lloyd Christmas. MARY I'm Mary. ON LLOYD -- we can almost see his mind work. He's desperate to impress her. LLOYD Uh, this isn't my real job, you know. It's only temporary. MARY Oh? LLOYD Yeah, you see, my friend Harry and I are saving up our money so we can open our own pet store. MARY That's nice. LLOYD (smiling) I got worms. MARY I beg your pardon? LLOYD That's what we're gonna call it: I Got Worms. We're gonna specialize in selling worm farms -- you know, like ant farms. A lot of people don't realize that worms make much better pets than ants. They're quiet, affectionate, they don't bite, and they're super with the kids. MARY Aren't ants quiet, too? Lloyd realizes she has a point. LLOYD Uh... well, sure -- but they aren't half as affectionate. And if you cut an ant's head off, it won't grow back. MARY I see. LLOYD And best of all, worm farming is a seventy-five-thousand-dollar-a-year industry. I wouldn't mind having a piece of that pie, if you know what I mean. To her credit, she doesn't. They continue driving. Mary looks at her watch and crosses her legs. Lloyd can see that she's concerned about something. LLOYD What's the matter? Little tense about the flight? MARY (beat) Something like that. Lloyd SWIVELS AROUND and STARES over his shoulder at her. LLOYD It's really nothing to worry about, Mary. Statistically, they say you're more likely to get killed on the way to the airport. You know, like in a head-on crash, or something. MARY Um, Lloyd, could please keep your eyes on the road. LLOYD Good thinking. There's a lot of bad drivers out there. Lloyd turns back to the steering wheel. CUT TO: EXT. AIRPORT - DAY Lloyd is putting the last bags on a cart. He closes the trunk and turns to Mary. She looks nervous and disconcerted as she reaches into her purse. She pulls out a ten-dollar tip. MARY Here you go. LLOYD Keep it. It was my pleasure. For the first time, Mary Swanson offers a slight smile. This makes her more lovely than ever. LLOYD Relax, Mary. Just get trashed and pass out. You'll be there before you know it. MARY Thanks Lloyd. (beat) And good luck with your worms. Then she PICKS UP HER BRIEFCASE and walks into the terminal, followed by a PORTER pushing her bags. Lloyd watches her, ENCHANTED, until she's out of sight. Afterwards, he climbs back into the limo, LOVESICK. For a moment he doesn't even have the energy to turn the key. He just drops his head against the steering wheel, DEVASTATED. There's a TAP on the window. Lloyd looks up to see a POLICE OFFICER standing there. POLICE OFFICER Come on, move it, you're in a red zone. Lloyd starts the limo and pulls away. CUT TO: INT. AIRPORT TERMINAL - DAY Mary looks tense as she moves through the throngs of travelers. Her pace is slow, deliberate, and her eyes are focused straight ahead. She passes a row of phone booths and two MEN -- one dressed in an ARMANI SUIT, the other in a PLAID SPORTCOAT -- watch her. ARMANI SUIT She's gonna leave the briefcase at the foot of the escalator. You make the pick-up. PLAID SPORTCOAT Piece of cake. EXT. AIRPORT TERMINAL - DAY As Lloyd pulls his limo slowly away, he glances in the airport window and SEES MARY WALKING ALONG. When she stops at the foot of the escalator, he stops, too. She puts down the briefcase and checks her coat pocket for her ticket. Lloyd's attention is distracted by a HONK. He turns to see a car directly behind him. LLOYD (to car's driver) Drive around me, you pinhead! When he turns back to watch Mary in the terminal he sees that SHE'S GONE, and she's LEFT HER BRIEFCASE AT THE FOOT OF THE STAIRS. Lloyd jumps to ATTENTION. He pulls the car into a HANDICAPPED SPOT and hops out. He starts to run into the terminal, then notices the Police Officer and suddenly goes into a spastic walk, limping and dragging him leg behind him like a palsy victim. INT. AIRPORT TERMINAL The Armani Man nods to the Plaid Sportcoat and he starts to approach the briefcase. Just as Plaid Sportcoat is reaching for the handle, LLOYD RUNS BY AND GRABS IT. He CONTINUES UP THE ESCALATOR three steps at a time. The two men look at each other, dumbstruck. INT. AIRPORT TERMINAL - BOARDING GATE Lloyd runs with the briefcase to the TV monitors that post the departure times. He looks frantically at the confusion of numbers. LLOYD Damn! QUICK CUT of a dejected Lloyd looking out the window as he watches as Mary's airplane taxiing away. EXT. AIRPORT TERMINAL - DAY Lloyd comes out with the briefcase, passing the two men, who FOLLOW HIM AT A DISTANCE. He starts walking down the sidewalk when suddenly he STOPS IN HIS TRACKS. HIS POV -- his limo is being towed away -- under the supervision of the Police Officer. He takes off after it, but to no avail. LLOYD
    --
  2. enable line wrapping in the table.

Actual behavior

After a certain cut off the text doesn't display anymore:

Expected behavior

All the text shows.

cmslewis commented 6 years ago

@titatoverheks

We only render the first 2000 characters of text passed to <TruncatedFormat> (the component the Table uses to manage cell truncation), because rendering any more than that really constitutes bad practice and is a recipe for poor perf that the data-agnostic Table will likely not be able to overcome. That said, 2000 is somewhat arbitrary (CC @tgreenwatts).

A better design for your app would be to show the full text in some other place in the UI when the user opts in.

EDIT: If you want to change the limit, you can change the prop value you're passing to TruncatedFormat.truncateLength.