Skip to content

fix(Explore): Show the tooltip only when label does not fit the container in the Dataset panel#16192

Merged
rusackas merged 1 commit intoapache:masterfrom
geido:fix/issue_15996_dataset_panel
Aug 12, 2021
Merged

fix(Explore): Show the tooltip only when label does not fit the container in the Dataset panel#16192
rusackas merged 1 commit intoapache:masterfrom
geido:fix/issue_15996_dataset_panel

Conversation

@geido
Copy link
Copy Markdown
Member

@geido geido commented Aug 11, 2021

SUMMARY

This PR makes the tooltip appear only when the label does not fit the container in the Dataset panel. Also, it hides the tooltip when the drag event starts.

BEFORE

DEV.Games.mp4

AFTER NO DRAG AND DROP

tooltips_after_NO_d.d.mp4

AFTER DRAG AND DROP ON

tooltips_after_d.d_ON.mp4

TESTING INSTRUCTIONS

  1. Visit Explore
  2. Observe the labels with long text in the Dataset panel and make sure they are truncated with ellipsis
  3. Hover the labels and check the tooltip
  4. Expand the panel until the text isn't truncated and hover the labels
  5. Make sure the tooltip isn't appearing
  6. Drag an item
  7. Make sure the tooltip isn't appearing

ADDITIONAL INFORMATION

@codecov
Copy link
Copy Markdown

codecov Bot commented Aug 11, 2021

Codecov Report

Merging #16192 (4117407) into master (a702487) will decrease coverage by 0.02%.
The diff coverage is 67.64%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16192      +/-   ##
==========================================
- Coverage   76.82%   76.79%   -0.03%     
==========================================
  Files         996      996              
  Lines       52962    53041      +79     
  Branches     6736     6773      +37     
==========================================
+ Hits        40689    40735      +46     
- Misses      12048    12077      +29     
- Partials      225      229       +4     
Flag Coverage Δ
javascript 71.16% <67.64%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...d/src/explore/components/DatasourcePanel/index.tsx 76.00% <54.54%> (-4.73%) ⬇️
...atasourcePanel/DatasourcePanelDragOption/index.tsx 94.11% <91.66%> (ø)
...controls/DndColumnSelectControl/DndSelectLabel.tsx 77.27% <0.00%> (-7.73%) ⬇️
...rset-frontend/src/components/ReportModal/index.tsx 74.46% <0.00%> (-1.44%) ⬇️
...frontend/src/dashboard/components/Header/index.jsx 63.06% <0.00%> (-1.10%) ⬇️
superset-frontend/src/views/CRUD/hooks.ts 46.98% <0.00%> (-0.83%) ⬇️
...c/views/CRUD/data/database/DatabaseModal/index.tsx 43.36% <0.00%> (-0.79%) ⬇️
.../database/DatabaseModal/DatabaseConnectionForm.tsx 53.46% <0.00%> (-0.54%) ⬇️
...rontend/src/views/CRUD/dashboard/DashboardList.tsx 71.63% <0.00%> (-0.32%) ⬇️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 72.61% <0.00%> (-0.06%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a702487...4117407. Read the comment docs.

@geido
Copy link
Copy Markdown
Member Author

geido commented Aug 11, 2021

@geido
Copy link
Copy Markdown
Member Author

geido commented Aug 11, 2021

/testenv up FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true

@github-actions
Copy link
Copy Markdown
Contributor

@geido Ephemeral environment spinning up at http://18.236.192.117:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Copy Markdown
Member

@pkdotson pkdotson left a comment

Choose a reason for hiding this comment

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

Tested and looks good to go! Thanks for the fix!

@junlincc
Copy link
Copy Markdown
Member

junlincc commented Aug 12, 2021

Thanks for the improvement, this is awesome!

  1. can we also add this enhancement to non-dnd? I think user can be benefit from it. There are quite a few features built upon dnd so far, can you guys help brainstorm how to apply those to all 3 modes, easily? @kgabryje @villebro

  2. towards the end of the video, after i drop the super long metric in the zone, tooltip is not attached to the field, maybe because i resize the panel early on? let's address this issue in this pr 🙏:)

Screen.Recording.2021-08-11.at.7.43.32.PM.mov

@junlincc junlincc added the hold:testing! On hold for testing label Aug 12, 2021
@geido
Copy link
Copy Markdown
Member Author

geido commented Aug 12, 2021

Thanks for the improvement, this is awesome!

  1. can we also add this enhancement to non-dnd? I think user can be benefit from it. There are quite a few features built upon dnd so far, can you guys help brainstorm how to apply those to all 3 modes, easily? @kgabryje @villebro

@junlincc this is already implemented with D&D off as well

  1. towards the end of the video, after i drop the super long metric in the zone, tooltip is not attached to the field, maybe because i resize the panel early on? let's address this issue in this pr 🙏:)

This is already fixed in my other PR #16060

Country.of.Citiz.mp4

Thank you!

@junlincc junlincc removed the hold:testing! On hold for testing label Aug 12, 2021
Copy link
Copy Markdown
Member

@junlincc junlincc left a comment

Choose a reason for hiding this comment

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

product signoff! awesome!! waited for a year for this improvement :)

@rusackas rusackas merged commit 2c5731a into apache:master Aug 12, 2021
@github-actions
Copy link
Copy Markdown
Contributor

Ephemeral environment shutdown and build artifacts deleted.

amitmiran137 pushed a commit that referenced this pull request Aug 16, 2021
…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
opus-42 pushed a commit to opus-42/incubator-superset that referenced this pull request Nov 14, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 28, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.4.0 First shipped in 1.4.0 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.4.0 First shipped in 1.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants