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(native-filters): Fix update ownState #17181

Merged
merged 24 commits into from
Oct 26, 2021
Merged

Conversation

simcha90
Copy link
Contributor

@simcha90 simcha90 commented Oct 21, 2021

SUMMARY

Steps to reproduce(description):

  1. Create VizPlugin that changes only it's ownState with crossFilter functionality e.g. (use only setDataMask({ ownState: {} }))
  2. Add it to dashboard
  3. Try to change ownState it reloads all other charts on first time

Issue: when we check if need reload other charts we auto reload all charts in case if in list of active filters added new chart(filter), but when we add only ownState, regarding that we added this chart in list of filters it doesn't emit values for other charts, only for itself, so we need to check if it has values emitted outside of this chart

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

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 Oct 21, 2021

Codecov Report

Merging #17181 (e63f695) into master (37944e1) will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17181      +/-   ##
==========================================
+ Coverage   76.89%   76.94%   +0.04%     
==========================================
  Files        1038     1038              
  Lines       55515    55613      +98     
  Branches     7564     7588      +24     
==========================================
+ Hits        42690    42793     +103     
+ Misses      12575    12570       -5     
  Partials      250      250              
Flag Coverage Δ
javascript 71.03% <100.00%> (+0.12%) ⬆️

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

Impacted Files Coverage Δ
...et-frontend/src/dashboard/components/Dashboard.jsx 81.88% <100.00%> (+3.79%) ⬆️
...erset-frontend/src/components/Pagination/index.tsx 72.72% <0.00%> (-27.28%) ⬇️
...nativeFilters/FiltersConfigModal/Footer/Footer.tsx 90.90% <0.00%> (-9.10%) ⬇️
...src/dashboard/components/DashboardBuilder/state.ts 71.42% <0.00%> (-1.75%) ⬇️
...frontend/src/dashboard/components/Header/index.jsx 68.30% <0.00%> (-0.41%) ⬇️
...c/filters/components/Select/SelectFilterPlugin.tsx 80.85% <0.00%> (-0.27%) ⬇️
...et-frontend/src/components/TableSelector/index.tsx 74.28% <0.00%> (-0.25%) ⬇️
...frontend/src/components/DatabaseSelector/index.tsx 95.00% <0.00%> (-0.13%) ⬇️
...board/components/nativeFilters/FilterBar/index.tsx 88.09% <0.00%> (-0.10%) ⬇️
...tersConfigModal/FiltersConfigForm/ColumnSelect.tsx 96.07% <0.00%> (-0.08%) ⬇️
... and 46 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 37944e1...e63f695. Read the comment docs.

@suddjian suddjian added the need:tests This PR requires tests label Oct 21, 2021
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, but curious if you agree with the refactoring proposal?

superset-frontend/src/dashboard/components/Dashboard.jsx Outdated Show resolved Hide resolved
Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for fixing + making the code more readable!

@simcha90 simcha90 merged commit cf284ba into apache:master Oct 26, 2021
@amitmiran137 amitmiran137 deleted the fix_ownstate branch October 26, 2021 10:11
@rusackas
Copy link
Member

Thanks for this contribution! Pinging @kgabryje to raise awareness, since this might have a positive performance impact worth assessing. Also, as for the tag from @suddjian, is there any plan to add/adjust tests to cover this new approach?

etr2460 pushed a commit that referenced this pull request Nov 1, 2021
etr2460 pushed a commit that referenced this pull request Nov 2, 2021
sadpandajoe pushed a commit to preset-io/superset that referenced this pull request Nov 2, 2021
eschutho pushed a commit that referenced this pull request Nov 17, 2021
* fix:fix get permission function

* fix: fix own state update

* refactor: fix CR notes

(cherry picked from commit cf284ba)
eschutho pushed a commit that referenced this pull request Dec 6, 2021
AAfghahi pushed a commit that referenced this pull request Jan 10, 2022
@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:tests This PR requires tests size/M 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