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

feat(dashboard): Rearrange items in chart header controls dropdown #20049

Merged
merged 2 commits into from
May 13, 2022

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented May 12, 2022

SUMMARY

This PR rearranges and renames menu items in chart's controls dropdown on Dashboard.

  • Grouped creating permalink and sending email in "Share" submenu
  • Grouped exporting to CSV and downloading image in "Download" submenu
  • Renamed "View chart in Explore" to "Edit chart"
  • Renamed "Maximize/Minimize chart" to "Enter/Leave fullscreen"

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
image

After:
image
image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • 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

CC @kasiazjc

@codecov
Copy link

codecov bot commented May 12, 2022

Codecov Report

Merging #20049 (632f496) into master (1cd002e) will decrease coverage by 0.00%.
The diff coverage is 66.66%.

❗ Current head 632f496 differs from pull request most recent head 2e80a3f. Consider uploading reports for the commit 2e80a3f to get more accurate results

@@            Coverage Diff             @@
##           master   #20049      +/-   ##
==========================================
- Coverage   66.35%   66.35%   -0.01%     
==========================================
  Files        1713     1713              
  Lines       64102    64105       +3     
  Branches     6746     6748       +2     
==========================================
  Hits        42538    42538              
- Misses      19849    19851       +2     
- Partials     1715     1716       +1     
Flag Coverage Δ
javascript 51.31% <66.66%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...BigNumber/BigNumberWithTrendline/transformProps.ts 46.96% <ø> (ø)
...end/src/dashboard/components/SliceHeader/index.tsx 87.23% <ø> (ø)
.../src/dashboard/components/gridComponents/Chart.jsx 60.60% <ø> (ø)
...ponents/controls/VizTypeControl/VizTypeGallery.tsx 87.09% <ø> (ø)
...dashboard/components/SliceHeaderControls/index.tsx 63.85% <66.66%> (-2.40%) ⬇️

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 1cd002e...2e80a3f. Read the comment docs.

@kgabryje
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

@kgabryje Ephemeral environment spinning up at http://34.220.138.72: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.

Thanks for the PR @kgabryje. I'm assuming that we will have another one coming for the dashboard options as well (to make them consistent).

I'm not sure if it's related but clicking on Download as image is raising the following exception:

Screen Shot 2022-05-13 at 10 43 36 AM

@kasiazjc
Copy link
Contributor

LGTM thank you 🙏

@kgabryje kgabryje force-pushed the feat/dashboard-dropdown-rearrange branch from 2d688c8 to 2e80a3f Compare May 13, 2022 15:10
@kgabryje
Copy link
Member Author

Thanks for the PR @kgabryje. I'm assuming that we will have another one coming for the dashboard options as well (to make them consistent).

I'm not sure if it's related but clicking on Download as image is raising the following exception:

Screen Shot 2022-05-13 at 10 43 36 AM

Well spotted. The problem was that the menu renders in the chart holder in DOM tree, but submenu is attached to the body and there's no way to specify popup container. I changed the screenshot selector from relative to absolute (each chart holder has a class specific to chart id, so it's easy to use exact selector to grab correct chart)

@kgabryje
Copy link
Member Author

I'm assuming that we will have another one coming for the dashboard options as well (to make them consistent).

Yep! That will happen when new Dashboard header (consistent with header in Explore) gets implemented

@michael-s-molina
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

@michael-s-molina Ephemeral environment spinning up at http://34.222.140.234: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

@kgabryje kgabryje merged commit 3043a54 into apache:master May 13, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
…pache#20049)

* feat(dashboard): Rearrange items in chart header controls dropdown

* Fix download as image and tests
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.0.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 preset-io size/L 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants