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

chore(dashboard): Add filter_scopes warning message for json metadata editor #21543

Conversation

justinpark
Copy link
Member

SUMMARY

Since the existing dashboardState overwrite the filter_scopes directly by the UI state from the filter mapping menu, the filter_scopes changes made from json metadata editor can be lost.

data: {
...finalCopyData,
default_filters: safeStringify(serializedFilters),
filter_scopes: safeStringify(serializedFilterScopes),
},
},

This commit adds the warning message of filter_scopes changes and then links to the filter mapping menu for the alternative.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

chore--warning-filter_scopes.mov

TESTING INSTRUCTIONS

  • Go to a dashboard
  • Click "edit" and "edit properties"
  • Click "advanced" to open json editor
  • check the warning message

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

@justinpark justinpark force-pushed the chore--warning-for-filter_scope-updates-in-json-editor branch from 9d9c011 to 49d4b77 Compare September 22, 2022 18:32
@codecov
Copy link

codecov bot commented Sep 22, 2022

Codecov Report

Merging #21543 (f525195) into master (d67b046) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master   #21543      +/-   ##
==========================================
- Coverage   66.66%   66.65%   -0.01%     
==========================================
  Files        1794     1794              
  Lines       68639    68640       +1     
  Branches     7300     7301       +1     
==========================================
  Hits        45755    45755              
  Misses      21014    21014              
- Partials     1870     1871       +1     
Flag Coverage Δ
javascript 52.80% <0.00%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...src/dashboard/components/PropertiesModal/index.tsx 60.71% <0.00%> (-0.37%) ⬇️

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

justinpark and others added 3 commits September 23, 2022 09:07
Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
@justinpark justinpark force-pushed the chore--warning-for-filter_scope-updates-in-json-editor branch from b2ebb47 to f525195 Compare September 23, 2022 16:07
@ktmud
Copy link
Member

ktmud commented Sep 23, 2022

Can we maybe just remove those unconfigurable fields from the JSON displayed to the users---and add them back before posting to the API? I thought we had something like this for certain fields at one point, but not all and always.

@john-bodley john-bodley merged commit 2cdd88a into apache:master Sep 26, 2022
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Sep 27, 2022
… editor (apache#21543)

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
(cherry picked from commit 2cdd88a)
john-bodley pushed a commit to airbnb/superset-fork that referenced this pull request Oct 3, 2022
… editor (apache#21543)

Co-authored-by: John Bodley <4567245+john-bodley@users.noreply.github.com>
(cherry picked from commit 2cdd88a)
@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