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: Chart download as image issue #19885

Merged

Conversation

codemaster08240328
Copy link
Contributor

SUMMARY

This pr resolves the issue which is about downloading chart as image.

Why this issue happened:

We were passing wrong query selector for chart element to downloadAsImage() function, which returned undefined from document.querySelector().

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Goto chart explore page
  2. Select any chart
  3. Try to download chart as image from 3 dots button on top right corner.

Expected result:
Should be able to see the downloaded image of chart.

ADDITIONAL INFORMATION

  • Fix Issue.

Copy link
Contributor

@diegomedina248 diegomedina248 left a comment

Choose a reason for hiding this comment

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

Can we add a test for this? Maybe a cypress one?

@yousoph
Copy link
Member

yousoph commented Apr 28, 2022

/testenv up

@github-actions
Copy link
Contributor

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

@apache apache deleted a comment from github-actions bot Apr 28, 2022
@apache apache deleted a comment from github-actions bot Apr 28, 2022
@apache apache deleted a comment from yousoph Apr 28, 2022
@codecov
Copy link

codecov bot commented Apr 28, 2022

Codecov Report

Merging #19885 (a7b086a) into master (ae38411) will decrease coverage by 0.03%.
The diff coverage is 52.24%.

❗ Current head a7b086a differs from pull request most recent head 0b0868c. Consider uploading reports for the commit 0b0868c to get more accurate results

@@            Coverage Diff             @@
##           master   #19885      +/-   ##
==========================================
- Coverage   66.55%   66.52%   -0.04%     
==========================================
  Files        1692     1714      +22     
  Lines       64802    65032     +230     
  Branches     6657     6717      +60     
==========================================
+ Hits        43129    43260     +131     
- Misses      19973    20065      +92     
- Partials     1700     1707       +7     
Flag Coverage Δ
javascript 51.25% <46.97%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...-chart-controls/src/sections/advancedAnalytics.tsx 14.28% <0.00%> (-19.05%) ⬇️
...d/packages/superset-ui-chart-controls/src/types.ts 100.00% <ø> (ø)
...preset-chart-deckgl/src/layers/Geojson/Geojson.jsx 0.00% <0.00%> (ø)
...et-chart-deckgl/src/layers/Geojson/controlPanel.ts 50.00% <ø> (ø)
...hart-echarts/src/MixedTimeseries/transformProps.ts 0.00% <ø> (ø)
...gin-chart-echarts/src/Timeseries/transformProps.ts 57.89% <ø> (ø)
...plugins/plugin-chart-handlebars/src/Handlebars.tsx 0.00% <0.00%> (ø)
...ars/src/components/Handlebars/HandlebarsViewer.tsx 0.00% <0.00%> (ø)
...frontend/plugins/plugin-chart-table/src/Styles.tsx 100.00% <ø> (ø)
...frontend/src/SqlLab/components/SqlEditor/index.jsx 51.07% <0.00%> (-0.28%) ⬇️
... and 54 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 ae38411...0b0868c. Read the comment docs.

@yousoph
Copy link
Member

yousoph commented Apr 28, 2022

Quick testing on the ephemeral env looks good

@rusackas rusackas merged commit c2999fd into apache:master Apr 29, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@rusackas
Copy link
Member

@codemaster08240328 will be adding tests later in a separate PR.

@rusackas rusackas added the need:tests This PR requires tests label Apr 29, 2022
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Apr 29, 2022
@sadpandajoe
Copy link
Contributor

🏷️ preset:2022.17

hughhhh pushed a commit to hve-labs/superset that referenced this pull request May 11, 2022
philipher29 pushed a commit to ValtechMobility/superset that referenced this pull request Jun 9, 2022
@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 need:tests This PR requires tests preset:2022.17 Preset-Patch size/XS 🚢 2.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants