-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: cap width of columns with long names #1574
fix: cap width of columns with long names #1574
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1574 +/- ##
==========================================
- Coverage 46.45% 46.45% -0.01%
==========================================
Files 571 571
Lines 36030 36031 +1
Branches 9020 9020
==========================================
Hits 16738 16738
- Misses 19240 19241 +1
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
@@ -1043,7 +1043,7 @@ export class GridMetricCalculator { | |||
firstColumn, | |||
treePaddingX | |||
); | |||
columnWidths.set(column, columnWidth); | |||
columnWidths.set(column, Math.min(600, columnWidth)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want this constant to be defined in the theme so it can be changed manually if needed. Take a look at the calculateColumnWidth
method - we already have a minColumnWidth
, we could just define a maxColumnWidth
that it uses and never go over that.
Note this doesn't address #1284, but that's fine and can be addressed in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can take on #1284 after this one. I think it'll be somewhat related anyways
Closes #1276
Use the following command to test a table with a long column name
New table render with capped column width