Skip to content

Conversation

@simcha90
Copy link
Contributor

@simcha90 simcha90 commented Feb 15, 2021

SUMMARY

Requires: apache-superset/superset-ui#959

  1. This PR split nativeFilters -> filtersState to next subdomains:
    a. nativeFilters: save data for native filters itself
    b. crossFilters: save filter for cross filters functionality
    c. ownFilters every chart can save here custom data (like table plugin BE pagination: feat(self-trigger): add backend pagination for the table apache-superset/superset-ui#959)

  2. Re-trigger chart rendering if own extraFormData changed for some specific chart

  3. Apply change from feat(self-trigger): add backend pagination for the table apache-superset/superset-ui#959 to change hook setExtraFormData to setDataMask (also related to splitting of nativeFilters state)

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-02-15.at.19.22.59.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 and others added 21 commits January 21, 2021 16:36
� Conflicts:
�	superset-frontend/spec/javascripts/dashboard/util/getFormDataWithExtraFilters_spec.ts
�	superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
� Conflicts:
�	superset-frontend/src/dashboard/components/nativeFilters/utils.ts
� Conflicts:
�	superset-frontend/src/dashboard/components/nativeFilters/utils.ts
�	superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
� Conflicts:
�	superset-frontend/src/explore/components/controls/VizTypeControl.jsx
� Conflicts:
�	superset-frontend/src/featureFlags.ts
�	superset/config.py
� Conflicts:
�	superset-frontend/src/chart/ChartContainer.jsx
�	superset-frontend/src/chart/ChartRenderer.jsx
�	superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/FilterConfigForm.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/utils.ts
�	superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
�	superset-frontend/src/filters/components/Select/AntdSelectFilter.tsx
� Conflicts:
�	superset-frontend/spec/fixtures/mockNativeFilters.ts
�	superset-frontend/src/dashboard/components/FiltersBadge/selectors.ts
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterValue.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/FilterConfigForm.tsx
�	superset-frontend/src/filters/components/Range/RangeFilterPlugin.tsx
�	superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
�	superset-frontend/src/filters/components/Select/types.ts
�	superset-frontend/src/filters/components/Time/TimeFilterPlugin.tsx
�	superset-frontend/src/filters/components/Time/types.ts
…-superset into private-state

� Conflicts:
�	superset-frontend/spec/fixtures/mockNativeFilters.ts
�	superset-frontend/spec/javascripts/dashboard/util/getFormDataWithExtraFilters_spec.ts
�	superset-frontend/src/dashboard/actions/nativeFilters.ts
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterValue.tsx
�	superset-frontend/src/dashboard/reducers/nativeFilters.ts
� Conflicts:
�	superset-frontend/spec/fixtures/mockNativeFilters.ts
�	superset-frontend/spec/javascripts/dashboard/util/getFormDataWithExtraFilters_spec.ts
�	superset-frontend/src/dashboard/actions/nativeFilters.ts
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
�	superset-frontend/src/dashboard/reducers/nativeFilters.ts
�	superset-frontend/src/dashboard/reducers/types.ts
@junlincc junlincc requested a review from suddjian February 20, 2021 02:11
� Conflicts:
�	superset-frontend/src/dashboard/actions/nativeFilters.ts
�	superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/state.ts
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.

Small type nit

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.

one comment with regards to the unitName - other than that LGTM 👍

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!

@simcha90 simcha90 closed this Mar 2, 2021
@simcha90 simcha90 reopened this Mar 2, 2021
@codecov
Copy link

codecov bot commented Mar 2, 2021

Codecov Report

Merging #13137 (1a6978a) into master (3c62069) will decrease coverage by 4.03%.
The diff coverage is 63.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13137      +/-   ##
==========================================
- Coverage   77.09%   73.05%   -4.04%     
==========================================
  Files         898      599     -299     
  Lines       45711    21147   -24564     
  Branches     5495     5491       -4     
==========================================
- Hits        35241    15449   -19792     
+ Misses      10344     5571    -4773     
- Partials      126      127       +1     
Flag Coverage Δ
cypress 57.95% <78.57%> (+0.32%) ⬆️
hive ?
javascript 62.75% <44.57%> (+0.18%) ⬆️
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% <ø> (ø)
superset-frontend/src/chart/ChartRenderer.jsx 76.00% <0.00%> (-1.03%) ⬇️
...rset-frontend/src/components/ButtonGroup/index.tsx 100.00% <ø> (ø)
...et-frontend/src/components/ErrorBoundary/index.jsx 95.45% <ø> (ø)
...perset-frontend/src/components/FormLabel/index.tsx 100.00% <ø> (ø)
...-frontend/src/components/Select/Select.stories.tsx 0.00% <0.00%> (ø)
superset-frontend/src/components/Select/Select.tsx 90.81% <ø> (ø)
superset-frontend/src/components/Select/styles.tsx 86.30% <ø> (ø)
...et-frontend/src/components/Timer/Timer.stories.tsx 0.00% <0.00%> (ø)
superset-frontend/src/components/Timer/index.tsx 95.83% <ø> (ø)
... and 352 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 3c62069...c2fe5a0. Read the comment docs.

@villebro villebro merged commit f19a830 into apache:master Mar 2, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* feat: add cross filters

* refactor: fix CR notes

* lint: fix lint

* lint: fix lint

* feat: POC adding filters set feature

* chore: pre-commit

* refactor: under chage

* lint: fix TS

* fix: fix FF name

* refactor: move to behaviors

* lint: fix lint

* refactor: update state of native filters

* refactor: finish refactor nativeFilter state

* feat: split native filters state

* refactor: refactor Time filter to use new API

* refactor: refactor Time filter to use new API

* refactor: fix CR notes

* fix: fix update values in filter bar

* refactor: save filter sets in meta

* feat(filter-sets): save filters sets in metadata

* refactor: partially fix ts

* refactor: merge conflicts

* refactor: add behaviors property

* refactor: add behaviors property

* fix: undo py changes

* fix: under some changes

* refactor: synx with master

* fix: undo FF

* fix: undo FF

* lint: ts-ignore

* chore: update lock file

* refactor: update enum

* refactor: naming of enum

* test: fix test

* test: update mocks

Co-authored-by: amitmiran137 <amit.miran@nielsen.com>
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 First shipped in 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 First shipped in 1.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants