-
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: Columns not auto sizing correctly #2359
Merged
ericlln
merged 21 commits into
deephaven:main
from
ericlln:DH-18392-columns-not-auto-sizing-correctly
Feb 10, 2025
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b9ac955
fix column width using upper/lower font widths
ericlln 7c7af71
try caching char widths instead of measuring text
ericlln 05540d9
fix truncateToWidth method edge cases
ericlln 928af6a
put default font width directly in truncate method
ericlln 1eafa8e
use common method to truncate quick filter header
ericlln 1518263
Fix column text width measuring wrong var
ericlln c4f42c1
code cleanup
ericlln fb05339
increase header horizontal padding
ericlln db979e5
more code cleanup
ericlln bf86d06
revert previous change
ericlln 2daa808
terminate text width calc early based on max width
ericlln 62a421e
stop retrieving font from context in getTextWidth
ericlln 5f88f60
move maxWidth check to correct place
ericlln d46b5ec
use cached truncated string
ericlln 34770a9
cache/speed up more measureText calls
ericlln e7cfaef
update existing tests
ericlln a924354
tests for getTextWidth method
ericlln de2922e
tests for existing truncateToWidth methods
ericlln 8ebe1ca
fix incorrect code
ericlln 66cf3d8
revert change to theme
ericlln da41aaf
updated snapshots
ericlln File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 see in a lot of places that we no longer check the default font. What happens if the font is not the map? Do we get a default somehow, or is it guaranteed to be calculated?
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 saw that this constant was being used in a lot of different places, since
CellRenderer.getCachedTruncatedString
doesn’t accept an undefined value for the font widths. The functionGridRenderer.truncateToWidth
that it calls does though, and already uses that constant for default values, so I madegetCachedTruncatedString
accept undefined for the font widths, and the constant can be removed from other places safely.If you did happen to need the font widths for something else in those methods, you would have to add back that undefined check.