Skip to content

Respect columns configuration when auto-sizing#290

Merged
severo merged 8 commits intomasterfrom
respect-columns-configuration
Oct 6, 2025
Merged

Respect columns configuration when auto-sizing#290
severo merged 8 commits intomasterfrom
respect-columns-configuration

Conversation

@severo
Copy link
Copy Markdown
Contributor

@severo severo commented Oct 2, 2025

part of #228

I refactored the code a lot (and simplified the localStorage format), because it was too hard to understand. The code is not necessarily much shorter, but it's more explicit and easier to understand and maintain, I guess.

I changed some behaviors:

  • the column-specific minWidth configuration is now respected
  • an auto-resized column is not marked as fixed anymore (the small dot), as automatic sizing sets all the columns to their measured width by default
  • the algorithm to shrink the column so that they try to fit in the component is now:
    • don't shrink the fixed columns
    • try to shrink the largest columns, then the second largest ones, etc.
    • a column cannot be shrunk below 33% of its measured width (which is capped by the CSS max-width: 40rem)
    • a column cannot be shrunk below 150px (to avoid having '...' instead of the header title)

Feel free to try the new behavior. I think it's more usable now.

Screencast.From.2025-10-02.23-03-37.mp4

@severo severo requested a review from platypii October 2, 2025 21:06
@severo severo mentioned this pull request Oct 2, 2025
Copy link
Copy Markdown
Contributor

@platypii platypii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So many providers 😆 but code looks cleaner, and I like the behavior better 👍

@severo severo merged commit 4bf3a1c into master Oct 6, 2025
14 of 15 checks passed
@severo severo deleted the respect-columns-configuration branch October 6, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants