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

refactor(native-filters): Move filtersState to dataMask redux root #13437

Merged
merged 19 commits into from
Mar 7, 2021

Conversation

simcha90
Copy link
Contributor

@simcha90 simcha90 commented Mar 3, 2021

SUMMARY

This PR move (dashboard redux state) -> nativeFilters -> filtersState to redux -> dataMask because of next reasons:

  1. it has now not only nativeFilters data but also cross-filters data and own charts data
  2. we also use it in explore for reusage
  3. it uses dataMask naming instead of filtersState

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-03-04.at.11.21.14.mov

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@simcha90 simcha90 changed the title refactor(native-filters): Move filters state to data mask redux root refactor(native-filters): Move filtersState to dataMask redux root Mar 3, 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.

First pass comments

@simcha90 simcha90 closed this Mar 4, 2021
@simcha90 simcha90 reopened this Mar 4, 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.

Second pass - mostly import nits but also a question about whether dataMask should be under src or src/dashboard.

@@ -0,0 +1,62 @@
/**
Copy link
Member

Choose a reason for hiding this comment

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

I see the reasoning behind having dataMask on the root level, as they will be used in viz, filters, dashboard and explore, but I still feel superset-frontend/src/dashboard/dataMask might be more appropriate, as that's where these masks are primarily used.

Copy link
Contributor Author

@simcha90 simcha90 Mar 7, 2021

Choose a reason for hiding this comment

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

I think it's the same reason why we put chart in the root, it's parallel to chart I think... Also this feature have enough functionality to have independent place in root :) Also I think in future we will need to add here also ui filtering like ui changes that will applied to other charts, may be also we will need to use here to show how it's applied to itself

@villebro
Copy link
Member

villebro commented Mar 4, 2021

FYI @simcha90 this needs a rebase (also left a few comments)

simcha90 added 4 commits March 7, 2021 08:25
…_to_data_mask

� Conflicts:
�	superset-frontend/package-lock.json
�	superset-frontend/package.json
@codecov
Copy link

codecov bot commented Mar 7, 2021

Codecov Report

Merging #13437 (9d80fe1) into master (d0714a0) will decrease coverage by 4.03%.
The diff coverage is 86.17%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13437      +/-   ##
==========================================
- Coverage   77.41%   73.37%   -4.04%     
==========================================
  Files         909      611     -298     
  Lines       45863    21336   -24527     
  Branches     5534     5537       +3     
==========================================
- Hits        35503    15656   -19847     
+ Misses      10232     5550    -4682     
- Partials      128      130       +2     
Flag Coverage Δ
cypress 57.97% <86.25%> (+0.05%) ⬆️
hive ?
javascript 63.26% <50.00%> (-0.02%) ⬇️
mysql ?
postgres ?
presto ?
python ?
sqlite ?

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

Impacted Files Coverage Δ
superset-frontend/src/chart/ChartContainer.jsx 100.00% <ø> (ø)
...s/nativeFilters/FilterBar/CascadeFilterControl.tsx 85.71% <ø> (ø)
...perset-frontend/src/dashboard/containers/Chart.jsx 100.00% <ø> (ø)
...frontend/src/dashboard/containers/FiltersBadge.tsx 89.28% <ø> (ø)
superset-frontend/src/dashboard/reducers/index.js 100.00% <ø> (ø)
superset-frontend/src/dashboard/reducers/types.ts 0.00% <ø> (-100.00%) ⬇️
...ntend/src/explore/components/ExploreChartPanel.jsx 82.60% <ø> (ø)
superset-frontend/src/explore/reducers/index.js 100.00% <ø> (ø)
superset-frontend/src/chart/ChartRenderer.jsx 76.31% <33.33%> (+0.31%) ⬆️
superset-frontend/src/chart/chartAction.js 78.00% <50.00%> (ø)
... and 319 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 d0714a0...2d12c37. Read the comment docs.

@villebro villebro merged commit 45972e9 into apache:master Mar 7, 2021
@@ -112,6 +112,7 @@
"geolib": "^2.0.24",
"global-box": "^1.2.0",
"html-webpack-plugin": "^4.5.1",
"immer": "^8.0.1",
Copy link
Member

Choose a reason for hiding this comment

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

When adding a new library, it would be nice to add a note in PR description to explain why it is needed. Sometimes it's not very obvious what the purpose of the library is.

@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label Mar 12, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 dashboard:native-filters Related to the native filters of the Dashboard size/XL 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants