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): scope status of filter not update in dashboard metadata #17945

Merged
merged 2 commits into from
Jan 10, 2022

Conversation

stephenLYZ
Copy link
Member

@stephenLYZ stephenLYZ commented Jan 6, 2022

SUMMARY

This PR fixes the problem that the scope status of filter which adds to the dashboard is not updated in the dashboard json metadata, steps to reproduce:

  1. add a nativeFilter to the dashboard
  2. edit dashboard and see the json metadata
  3. metadata don't have field chartsInScope and filterConfig

It will cause the incorrect scope status if we update the native filter via json metadata like this issue #17932

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

before

2022-01-06.3.28.18.mov

after

2022-01-06.3.30.39.mov

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

@codecov
Copy link

codecov bot commented Jan 6, 2022

Codecov Report

Merging #17945 (cdcfefa) into master (9e69940) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17945      +/-   ##
==========================================
- Coverage   67.07%   67.06%   -0.02%     
==========================================
  Files        1609     1609              
  Lines       64905    64915      +10     
  Branches     6868     6869       +1     
==========================================
  Hits        43537    43537              
- Misses      19502    19512      +10     
  Partials     1866     1866              
Flag Coverage Δ
javascript 53.75% <0.00%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
...et-frontend/src/dashboard/actions/nativeFilters.ts 41.83% <0.00%> (-4.76%) ⬇️
superset-frontend/src/common/components/index.tsx 100.00% <0.00%> (ø)
.../plugins/legacy-preset-chart-nvd3/src/Bar/index.js 66.66% <0.00%> (ø)
...gins/legacy-preset-chart-nvd3/src/DistBar/index.js 66.66% <0.00%> (ø)
...mponents/nativeFilters/FiltersConfigModal/state.ts 73.33% <0.00%> (ø)
...et-frontend/src/common/hooks/apiResources/index.ts
...nd/src/common/hooks/useComponentDidUpdate/index.ts
...set-frontend/src/common/hooks/usePrevious/index.ts
...uperset-frontend/src/components/Menu/MenuRight.tsx
...t-frontend/src/common/hooks/apiResources/charts.ts
... and 32 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 9e69940...cdcfefa. Read the comment docs.

@jinghua-qa
Copy link
Member

/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true FEATURE_UX_BETA=true

@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2022

@jinghua-qa Ephemeral environment spinning up at http://54.187.239.26:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

@jinghua-qa
Copy link
Member

Stephen I have tested the PR in the env, i saw some issues
1, when i create a native filter, it put the filter out of scope even i selected all scope
2, the edit in metadata fornative filters seems not stay
Here is the video
https://user-images.githubusercontent.com/81597121/148483193-14bb16e7-f624-408a-b5ff-ef75d25ae941.mov

@pull-request-size pull-request-size bot added size/S and removed size/XS labels Jan 7, 2022
@jinghua-qa jinghua-qa added the need:qa-review Requires QA review label Jan 7, 2022
Copy link
Member

@rusackas rusackas left a comment

Choose a reason for hiding this comment

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

LGTM! @jinghua-qa if you could give this a test bashing before we merge, that would be great!

@rusackas
Copy link
Member

rusackas commented Jan 8, 2022

/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true FEATURE_DASHBOARD_CROSS_FILTERS=true FEATURE_ENABLE_EXPLORE_DRAG_AND_DROP=true FEATURE_UX_BETA=true

@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2022

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

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

@rusackas rusackas merged commit bd9e123 into apache:master Jan 10, 2022
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

rosemarie-chiu pushed a commit to preset-io/superset that referenced this pull request Jan 10, 2022
…ta (apache#17945)

* fix(dashboard): scope status of filter not update in dashboard metadata

* fix save

(cherry picked from commit bd9e123)
@rosemarie-chiu
Copy link
Contributor

🏷 2022.1

@eschutho eschutho added the v1.4 label Jan 13, 2022
eschutho pushed a commit that referenced this pull request Jan 13, 2022
…ta (#17945)

* fix(dashboard): scope status of filter not update in dashboard metadata

* fix save
shcoderAlex pushed a commit to casual-precision/superset that referenced this pull request Feb 7, 2022
…ta (apache#17945)

* fix(dashboard): scope status of filter not update in dashboard metadata

* fix save
bwang221 pushed a commit to casual-precision/superset that referenced this pull request Feb 10, 2022
…ta (apache#17945)

* fix(dashboard): scope status of filter not update in dashboard metadata

* fix save
@mistercrunch mistercrunch added 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🏷️ 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 need:qa-review Requires QA review preset:2022.1 size/S v1.4 🍒 1.4.0 🍒 1.4.1 🍒 1.4.2 🚢 1.5.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants