-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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(column-header-tooltip): make that hide the tooltip when the cloum… #18988
Merged
rusackas
merged 8 commits into
apache:master
from
prosdev0107:fix/38807-column-header-tooltip
May 2, 2022
Merged
Changes from 1 commit
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a4bd893
fix(column-header-tooltip): make that hide the tooltip when the cloum…
prosdev0107 61e16a0
fix(column-header-tooltip): fix lint
prosdev0107 f2fa480
fix(column-header-tooltip): make to dynamic tooltip header in FilterT…
prosdev0107 31be89c
fix(column-header-tooltip): make to fix the lint issue
prosdev0107 763dd7a
fix(column-header-tooltip): make to remove the tooltip option
prosdev0107 c830b29
fix(column-header-tooltip): make to add test and storybook for dynami…
prosdev0107 1683101
fix(column-header-tooltip): make to fix lint
prosdev0107 9150313
fix(dynamic-tooltip): make to fix merge conflict
prosdev0107 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
Next
Next commit
fix(column-header-tooltip): make that hide the tooltip when the cloum…
…n header is turncated
- Loading branch information
commit a4bd8938d9670be1cf5bceb04d61338cc9bfbbda
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
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.
@rusackas was this decided somewhere as a breakpoint?
If not, @prosdev0107 consider using this if possible, which is a dynamic way of doing it.
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.
@diegomedina248 Evan's correct handle is @rusackas
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.
@michael-s-molina crap 🤦 , thanks
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.
THANK YOU. I spent a few minutes trying to find an example of the AntD-native approach. I swear I had a CodePen example of this that I once wrote up, but I seem to have left it in my other coat.
The 200px is indeed arbitrary. It also doesn't seem to matter, thus my comment/screenshot above.
I'm OK with setting a reasonable maximum column width. Exactly how wide is up for grabs. Maybe @kasiazjc has opinions on the matter. We should also test/consider how the contents of the cell are wrapped/truncated when hitting this maximum width.
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.
The only downside to the AntD approach is a little more vendor lock-in, should we ever decide to change component libraries again... but it probably won't be our biggest battle then :)
The
getTextDimension
approach seems like it'd work, but is slightly fragile-looking to me as a technique to start reusing in more places.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.
Sorry for the late response, but re: columns setting max/min width can be tricky I think. To do it well we would have to go through different types of data there are in the columns and define min/max... If we would introduce max width for columns and let's say we would have 2 columns it could look weird as the table would not be stretched from left or right.
Easy solution would be to scale the column width, so depending on the width of the table all columns always have the same width 🤔 but still, lot's of edge case.
That is, if I understand the problem correctly 🙃