Skip to content
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(dashboard): Ensure correct positioning of "Drill to detail by" submenu #21894

Merged
merged 1 commit into from
Oct 21, 2022

Conversation

codyml
Copy link
Member

@codyml codyml commented Oct 20, 2022

SUMMARY

The "Drill to detail by" context menu submenu introduced in #21351 can end up offscreen, if there are enough menu items and you right-click close to the bottom of the viewport. This PR uses the logic that currently handles that issue with the top-level context menu to also handle the issue for the submenu.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2022-10-20 at 3 12 59 PM

After:
Screen Shot 2022-10-20 at 3 13 27 PM

TESTING INSTRUCTIONS

  1. Run Superset with DRILL_TO_DETAIL set to True.
  2. Create a dashboard full of time-series bar charts with > 1 dimension.
  3. Try opening the drill to detail context menu all over the chart. Submenu placement should be the default Y-position (slightly lower than the parent item) everywhere except near the bottom edge.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags: DRILL_TO_DETAIL
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codyml codyml changed the title fix(dashboard): Ensure correct positioning of drill to detail submenu fix(dashboard): Ensure correct positioning of "Drill to detail by" submenu Oct 20, 2022
@codecov
Copy link

codecov bot commented Oct 20, 2022

Codecov Report

Merging #21894 (0b4fae2) into master (9a063ab) will increase coverage by 0.00%.
The diff coverage is 85.71%.

@@           Coverage Diff           @@
##           master   #21894   +/-   ##
=======================================
  Coverage   55.55%   55.56%           
=======================================
  Files        1806     1807    +1     
  Lines       69140    69147    +7     
  Branches     7393     7395    +2     
=======================================
+ Hits        38409    38419   +10     
+ Misses      28822    28818    -4     
- Partials     1909     1910    +1     
Flag Coverage Δ
javascript 53.33% <85.71%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
...frontend/src/components/Chart/ChartContextMenu.tsx 5.00% <0.00%> (-6.54%) ⬇️
superset-frontend/src/components/Chart/utils.ts 85.71% <85.71%> (ø)
...ponents/Chart/DrillDetail/DrillDetailMenuItems.tsx 95.83% <100.00%> (+0.59%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@geido
Copy link
Member

geido commented Oct 21, 2022

/testenv up FEATURE_DRILL_TO_DETAIL=true

@github-actions
Copy link
Contributor

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

Copy link
Member

@michael-s-molina michael-s-molina left a comment

Choose a reason for hiding this comment

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

LGTM

@michael-s-molina michael-s-molina merged commit 40f8254 into apache:master Oct 21, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 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 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants