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): JS error when editing charts #21422

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Sep 9, 2022

SUMMARY

"Edit chart" from dashboard may throw an JS error if the dashboard context is not found in localStorage. This could happen when users either don't have localStorage enabled in there browser (unlikely) or when localStorage has run out of space (for example, if SQLLAB_BACKEND_PERSISTENCE isn't enabled in SQL Lab).

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

image

TESTING INSTRUCTIONS

To reproduce the JS error

  1. Go to a Dashboard page

  2. Delete localStorage item dashboard__explore_context:

    image
  3. Go edit any chart in the dashboard

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

@codecov
Copy link

codecov bot commented Sep 9, 2022

Codecov Report

Merging #21422 (d9baee7) into master (9ada541) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #21422      +/-   ##
==========================================
- Coverage   66.55%   66.54%   -0.01%     
==========================================
  Files        1791     1791              
  Lines       68593    68598       +5     
  Branches     7319     7320       +1     
==========================================
  Hits        45651    45651              
- Misses      21051    21056       +5     
  Partials     1891     1891              
Flag Coverage Δ
javascript 52.72% <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/explore/ExplorePage.tsx 0.00% <0.00%> (ø)

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

@kgabryje
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

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

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

LGTM

@ktmud ktmud merged commit 1084bde into apache:master Sep 12, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

justinpark pushed a commit to airbnb/superset-fork that referenced this pull request Sep 16, 2022
@john-bodley john-bodley deleted the fix-dashboard--edit-link branch February 17, 2023 22:17
@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/S 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants