-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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(Explore): Show the tooltip only when label does not fit the container in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel #16060
Conversation
Insane!! you made it work!! please spin up the testenv with DND enabled 🙏 |
For clarity:
Ideally, we should strive to implement the ability to show the tooltip only when it does not fit the container everywhere. However, this is an effort that will require more iterations. |
This PR needs to wait for #15942 to be merged as that PR contains the required Superset-UI version. The CI checks won't pass until that's merged in. |
Codecov Report
@@ Coverage Diff @@
## master #16060 +/- ##
=======================================
Coverage 76.83% 76.84%
=======================================
Files 995 995
Lines 52884 52920 +36
Branches 6721 6743 +22
=======================================
+ Hits 40636 40667 +31
- Misses 12023 12028 +5
Partials 225 225
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true FEATURE_UX_BETA=true |
@villebro Ephemeral environment spinning up at http://52.26.42.109:8080. Credentials are |
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.
LGTM - this is a really nice functional improvement and code also looks much cleaner now 👍
superset-frontend/src/explore/components/controls/DndColumnSelectControl/OptionWrapper.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/explore/components/controls/OptionControls/index.tsx
Outdated
Show resolved
Hide resolved
…ls/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
@geido thanks for the fix! We also need to make the change of the data panel. tooltip should only show when it doesn't fit in the datapanel 🙏 |
Yes, i can confirm it;s not related to this PR. let's have a follow up one to clean up in Safari But let's not close the issue until above 2 comments are addressed. 🙏 |
Also in filter, when there are multiple value selected, should we? we should? show all the selected values in the tooltip, instead of "..." this change can be made in this PR, maybe? @geido Screen.Recording.2021-08-05.at.10.29.31.AM.mov |
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.
All selected filter values show show in the tooltip 🙏
Tooltip in FiltersI have just updated the PR to show the tooltip whenever the tooltip title is different from the label (i.e. the tooltip text is longer than what fits in the label in every size of the panel). In that way, the tooltip will show up in cases such as the "Filters" IN and NOT IN and in any other case where we might want to force-show the tooltip independently from the label content or the size of the panel. DEV.Quarterly.1.mp4Tooltips in Dataset panelOne PR has been opened for this: Disabled Default Tooltips on SafariTwo PRs have been opened for this: |
/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true FEATURE_UX_BETA=true |
@geido Ephemeral environment spinning up at http://54.149.39.100:8080. Credentials are |
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.
Product sign-off!! tested locally. will test again when both this and #16192 go in.
labelRef && | ||
labelRef.current && | ||
labelRef.current.scrollWidth > labelRef.current.clientWidth); |
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.
labelRef && | |
labelRef.current && | |
labelRef.current.scrollWidth > labelRef.current.clientWidth); | |
labelRef?.current?.scrollWidth > labelRef.current.clientWidth); |
If you're feelin' fancy ¯\_(ツ)_/¯
Ephemeral environment shutdown and build artifacts deleted. |
…gies * upstream/master: (64 commits) check roles before fetching reports (#16260) chore: upgrade mypy and add type guards (#16227) fix: pivot columns with ints for name (#16259) chore(pylint): Bump Pylint to 2.9.6 (#16146) fix examples tab for dashboard (#16253) chore: bump superset-ui packages to 0.17.84 (#16251) chore: Shows the dataset description in the gallery dropdown (#16200) fix(Dashboard): Omnibar dropdown visibility and keyboard commands (#16168) chore: bump py version for integration test (#16213) fix: skip perms on query context update (#16250) refactor: external metadata fetch API (#16193) feat(dao): admin can remove self from object owners (#15149) fix(dashboard): cross filter chart highlight when filters badge icon clicked (#16233) fix: validate_parameters and query (#16241) fix: Remove Advanced Analytics tag for 2 charts (#16240) Revert "feat: Changing Dataset names (#16199)" (#16235) feat: Allow users to connect via legacy SQLA form (#16201) fix: remove encryption from db params (#16214) fix(Explore): Show the tooltip only when label does not fit the container in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel (#16060) Show/hide tooltips (#16192) ... # Conflicts: # superset/tasks/caching/cache_strategy.py
…iner in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel (apache#16060) * Implement dynamic tooltip * Normalize and consolidate * Clean up * Refactor and clean up * Remove unnecessary var * Fix type import * Update superset-frontend/src/explore/components/controls/OptionControls/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> * Remove unnecessary styled span * Show full tooltip title * Force show tooltip * Force show tooltip D&D off Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> (cherry picked from commit a1e18ed)
…iner in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel (apache#16060) * Implement dynamic tooltip * Normalize and consolidate * Clean up * Refactor and clean up * Remove unnecessary var * Fix type import * Update superset-frontend/src/explore/components/controls/OptionControls/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> * Remove unnecessary styled span * Show full tooltip title * Force show tooltip * Force show tooltip D&D off Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
…iner in METRICS/FILTERS/GROUP BY/SORT BY of the DATA panel (apache#16060) * Implement dynamic tooltip * Normalize and consolidate * Clean up * Refactor and clean up * Remove unnecessary var * Fix type import * Update superset-frontend/src/explore/components/controls/OptionControls/index.tsx Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com> * Remove unnecessary styled span * Show full tooltip title * Force show tooltip * Force show tooltip D&D off Co-authored-by: Ville Brofeldt <ville.v.brofeldt@gmail.com> Co-authored-by: Michael S. Molina <70410625+michael-s-molina@users.noreply.github.com>
SUMMARY
This PR makes the tooltip appear only when the label does not fit the container for the METRICS/FILTERS/GROUP BY (with D&D enabled)/SORT BY of the DATA panel. It also consolidates the look and behavior of the Columns and Metrics across the 3 different implementations, including the one in Superset UI. Finally, this PR hides the tooltip when the drag event starts.
REQUIRES SUPERSET-UI PR MERGED
Attention, this PR requires the related PR apache-superset/superset-ui#1271 in Superset-UI to be merged first.
REFACTOR REQUIRED
Refactoring is suggested to remove the 3 different implementations and consolidate the code. This PR only intention is to resolve the issue #15996 within the limitations of the current implementation.
BEFORE
before_drag_drop.mp4
before_NO_drag_drop.mp4
AFTER
after_drag_drop.mp4
after_NO_drag_drop.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION