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): new created chart did not have high lighted effect when using the permalink of chart share in dashboard #20411

Conversation

diegomedina248
Copy link
Contributor

SUMMARY

If we create a new chart and add it to the dashboard, then generating a permalink for that char from said dashboard does not highlight it on load.

The issue is that, for these charts, they're not part of the dashboard per-se, and get added at the end (in new rows).
For that reason, we're generating the id for them on the fly, and thus, they're always different on load.
The permalink does not find the chart in question in that case.

This PR changes the id generation for these charts to always be the same.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:

Screen.Recording.2022-06-16.at.14.55.04.mov

After:

new.mov

TESTING INSTRUCTIONS

  1. create a new chart and add to dashboard
  2. click 3 dot menu of the chart and copy permalink
  3. open chart permalink in browser and observe the chart

Ensure that the chart highlights.

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

…en using the permalink of chart share in dashboard
@codecov
Copy link

codecov bot commented Jun 16, 2022

Codecov Report

Merging #20411 (dd978a3) into master (11d94ce) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #20411      +/-   ##
==========================================
- Coverage   66.70%   66.70%   -0.01%     
==========================================
  Files        1739     1739              
  Lines       65135    65139       +4     
  Branches     6897     6897              
==========================================
  Hits        43450    43450              
- Misses      19932    19936       +4     
  Partials     1753     1753              
Flag Coverage Δ
javascript 51.74% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/dashboard/actions/hydrate.js 2.04% <0.00%> (-0.09%) ⬇️

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 11d94ce...dd978a3. Read the comment docs.

@rusackas
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

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

Copy link
Member

@stephenLYZ stephenLYZ left a comment

Choose a reason for hiding this comment

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

Tested in local and LGTM! Nice Work!

@rusackas rusackas merged commit c2f01a6 into apache:master Jun 19, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

michael-s-molina pushed a commit that referenced this pull request Jun 23, 2022
…en using the permalink of chart share in dashboard (#20411)

(cherry picked from commit c2f01a6)
@mistercrunch mistercrunch added 🍒 2.0.0 🍒 2.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.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-Patch size/XS v2.0 🍒 2.0.0 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants