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): Only apply changes when editing properties #17392

Merged
merged 4 commits into from
Nov 12, 2021
Merged

fix(Dashboard): Only apply changes when editing properties #17392

merged 4 commits into from
Nov 12, 2021

Conversation

geido
Copy link
Member

@geido geido commented Nov 10, 2021

SUMMARY

This PR adds the onlyApply prop to the properties modal of the Dashboard, so that changes will only be applied but not saved. This is to avoid confusion with discarded changes that were actually saved.

BEFORE

Fixes #17243

AFTER

Test.3.mp4

TESTING INSTRUCTIONS

  1. Open a Dashboard
  2. Edit its properties and apply
  3. Discard the changes
  4. Make sure the changes were actually discarded

ADDITIONAL INFORMATION

  • Has associated issue: [Dashboard] Color scheme won't be discarded when discarding changes #17243
  • 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 Nov 10, 2021

Codecov Report

Merging #17392 (c07c0cb) into master (8f9cea8) will increase coverage by 0.01%.
The diff coverage is 87.50%.

❗ Current head c07c0cb differs from pull request most recent head 0aa5513. Consider uploading reports for the commit 0aa5513 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17392      +/-   ##
==========================================
+ Coverage   77.02%   77.04%   +0.01%     
==========================================
  Files        1038     1041       +3     
  Lines       56021    56063      +42     
  Branches     7735     7738       +3     
==========================================
+ Hits        43150    43191      +41     
- Misses      12613    12614       +1     
  Partials      258      258              
Flag Coverage Δ
javascript 71.22% <14.28%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...frontend/src/SqlLab/components/ResultSet/index.tsx 61.48% <0.00%> (ø)
...frontend/src/SqlLab/components/SqlEditor/index.jsx 54.14% <ø> (ø)
...rc/explore/components/ExploreChartHeader/index.jsx 56.52% <0.00%> (ø)
...nd/src/explore/components/ExploreViewContainer.jsx 2.08% <0.00%> (-0.04%) ⬇️
superset-frontend/src/explore/controls.jsx 30.98% <ø> (ø)
superset/charts/commands/data.py 97.95% <ø> (+1.59%) ⬆️
superset/connectors/sqla/models.py 87.97% <ø> (ø)
superset/db_engine_specs/hive.py 86.48% <0.00%> (-0.34%) ⬇️
superset/charts/data/api.py 88.48% <88.48%> (ø)
superset/charts/data/query_context_cache_loader.py 90.00% <90.00%> (ø)
... and 16 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 8f9cea8...0aa5513. Read the comment docs.

@geido
Copy link
Member Author

geido commented Nov 11, 2021

/testenv up

@github-actions
Copy link
Contributor

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

@jinghua-qa
Copy link
Member

I have a question when I set a color theme in the chart and add it to a dashboard, why I can not see the color theme information in the dashboard edit mode?

color.theme.is.empty.mov

@geido
Copy link
Member Author

geido commented Nov 11, 2021

I have a question when I set a color theme in the chart and add it to a dashboard, why I can not see the color theme information in the dashboard edit mode?

@jinghua-qa the color scheme of the chart does not affect the color scheme of the Dashboard. Only the color scheme of the Dashboard can affect the color scheme of a Chart afaik.

Copy link
Member

@jinghua-qa jinghua-qa 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

@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

@geido geido merged commit 0712be4 into apache:master Nov 12, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

geido added a commit that referenced this pull request Dec 1, 2021
rusackas pushed a commit that referenced this pull request Dec 1, 2021
jinghua-qa pushed a commit to preset-io/superset that referenced this pull request Dec 1, 2021
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
* Apply only

* Test apply button

* Update Cypress

* Rename test
@hadiismanto
Copy link

But the content or the selection of color scheme in the chart should be the same with the dashboard right ?

Because if it is not...then your chart could become useless regarding the color scheme.....

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.5.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 size/S 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dashboard] Color scheme won't be discarded when discarding changes
5 participants