Closed lurch closed 1 year ago
I'll look into that in a few week when another project is completed. Currently there is no special treatment of hidden comment rows (only height 0). Somehow the logic for cell size has to take comment cells into account.
I'll need some more time (~3 weeks) until I can look into this (maybe sooner)...
Found some time... there will be a new option autoColumnWithsIgnoreComments
(defaults to true) that will ignore any comment cell from participating in the auto column size process.
The option enableWrapping
might be also interesting to you, as the long comments will be wrap by default.
I just need to do some manual testing before releasing (should be in the next couple of days).
autoColumnWithsIgnoreComments
should probably be autoColumnWidthsIgnoreComments
? Same typo appears multiple times in the linked commit too.
Ah, thanks for pointing that out, I would have missed it!
After some testing, I found that ignoring comment cells when option hide comments
(or via button) is on might also be a good idea. So only one option has to be set: hide comments
or autoColumnWidthsIgnoreComments
to ignore the widths of comment cells.
Perfect, thank you! :clap:
The only thing that would make it better, is if when you clicked the "Hide comments" button the first column automatically shrank to the new max-width, instead of retaining the old max-width (i.e. when comments were still being shown).
To me this seems a bit counter intuitive... why should the size of the column remain the same when the comments are hidden? After manually changing the column size, it will keep its size.
Sorry, perhaps I should clarify that I've not manually set the column size.
In step 2. it would be nice if the column widths auto-resized again, to ignore the now-hidden comment lines. Does that make sense, or am I still explaining this badly?
Completely misunderstood your comment, sorry. What you just described is exactly the new behavior (maybe you need to manually update to version 0.7.3, not sure when vs code checks for extension updates).
What OS?
Description
I have a CSV file with some very long comment-lines. which causes the first column in the CSV-editor to become ridiculously wide. If I select the option to hide comments (great feature!) the first column is still ridiculously wide.
Expected behavior
I'd expect the first column's width to shrink to the width of the longest cell in non-comment lines. Even if I double-click the column-separator between the first and second columns to auto-resize the column, it still adjusts the first column to the width of the longest (now-hidden) comment, rather than the the width of the longest (still visible) cell.
Steps to reproduce
See above.