grist-core icon indicating copy to clipboard operation
grist-core copied to clipboard

row height expands even if word-wrap is unselected

Open alfredo-ardito opened this issue 1 year ago • 8 comments

row expands its height when a text column type has new lines inserted with [shift+return] and the cell format word-wrap is unselected. The row should expand only if the cell format has the word-wrap selected. This misbehavior started after upgrading to version 1.1.16

image

image

alfredo-ardito avatar Jul 16 '24 07:07 alfredo-ardito

Explicit newlines (e.g. inserted with Shift+Enter) have always expanded rows (just as Google Sheets and Excel do). Word-wrapping affects whether long lines wrap. One thought was to have 3 values for word-wrapping: wrap lines, keep lines, collapse lines.

dsagal avatar Jul 16 '24 14:07 dsagal

True. having 3 values for word-wrapping would solve this. However, in Google sheets and Libreoffice calc new lines are inserted with Ctrl+Enter

alfredo-ardito avatar Jul 16 '24 17:07 alfredo-ardito

Maybe this is what the OP is getting at, but it would be great to have a display option for not expanding row heights. Useful in cases above where a column contains embedded notes

Also mentioned here: https://community.getgrist.com/t/cell-height-inconsistency/2088

gitterspec avatar Aug 22 '24 05:08 gitterspec

This seems a fairly simple improvement, and possibly a good first issue for a new contributor. I see two ways to address it. Currently, the one option for wrapping is this one:

Screenshot 2024-08-23 at 2 57 20 PM

The two options I see to enhance it are:

  • Option 1. Have 3 choices for wrapping: "Clip lines", "Wrap lines", and "Keep text on one line". The last option is the new one, and it would ignore line-breaks.
  • Option 2. Keep the wrapping options as today ("Clip lines" or "Wrap lines"), and add a new configuration option to set the max number of lines to show. It would be unset by default, but if set, text would be limited to the specified number of lines with "..." shown on the last line if anything didn't fit. (Implementation note: for supporting this when wrapping is on, -webkit-line-clamp property may help.)
  • Option 3. Same as option 2, but add this option at Table-widget level (rather than column level).

Feedback welcome!

dsagal avatar Aug 23 '24 19:08 dsagal

Is it unfeasible to implement options 1 and 2 simultaneously? Both are great.

bipenett avatar Sep 12 '24 16:09 bipenett

Here are the mocks https://www.figma.com/design/wcpetFt6aOKzTszcvPPWLQ/%5B05%2F24%5D-Grist-Design?node-id=4343-89047&t=RbJ86TZ0SHtnCr5c-1

lusebille avatar Mar 24 '25 17:03 lusebille

@dsagal I've made the modifications on the mocks, should be ok 👍

lusebille avatar Mar 27 '25 15:03 lusebille

Great, thank you! FYI, I edited some text directly in Figma.

dsagal avatar Mar 27 '25 18:03 dsagal

Figma looks great! What is the timeline for this feature?

sgershuny avatar Jul 09 '25 09:07 sgershuny

It's fallen behind some higher-priority items, but it's near the top of our queue again, so I'd expect it to get released within the next month or so.

dsagal avatar Jul 12 '25 16:07 dsagal

This got released! See https://support.getgrist.com/newsletters/2025-08/#row-height-controls.

dsagal avatar Sep 02 '25 19:09 dsagal