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

feat(filter-set): Filter set edge cases #13576

Merged
merged 81 commits into from
Mar 15, 2021

Conversation

simcha90
Copy link
Contributor

SUMMARY

This PR process edge cases for filter sets:

  1. When some filter was removed from dashboard we mark it as removed and not apply when user clicks on filter set
  2. When for some filter was changed metadata we mark it as highlighted and not apply when user clicks on filter set
  3. Added option invalidate filter set - removed invalid filters from filter set
  4. Saving in dashboard metadata also filters metadata for each filter set
  5. Added option edit name for filter set
  6. Added option select filter set with invalid filters in this case only valid filters will be applied and this superset will be selected

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screen.Recording.2021-03-11.at.16.37.31.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 added 30 commits March 3, 2021 14:24
…incubator-superset into filter_bar_actions

� Conflicts:
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
…_to_data_mask

� Conflicts:
�	superset-frontend/package-lock.json
�	superset-frontend/package.json
…ctions

� Conflicts:
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
� Conflicts:
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
simcha90 and others added 11 commits March 10, 2021 09:22
…pdate

� Conflicts:
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterBar.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSetUnit.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/FilterSets.tsx
�	superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/Footer.tsx
…rBar/FilterSets/EditSection.tsx

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
@junlincc junlincc requested a review from suddjian March 11, 2021 22:02
@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label Mar 11, 2021
@junlincc
Copy link
Member

/testenv up

@github-actions
Copy link
Contributor

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

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.

A few comments

@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #13576 (19005f6) into master (5fca19d) will decrease coverage by 4.52%.
The diff coverage is 32.52%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13576      +/-   ##
==========================================
- Coverage   77.53%   73.01%   -4.53%     
==========================================
  Files         904      608     -296     
  Lines       45986    21637   -24349     
  Branches     5552     5725     +173     
==========================================
- Hits        35657    15799   -19858     
+ Misses      10195     5702    -4493     
- Partials      134      136       +2     
Flag Coverage Δ
cypress 56.56% <20.65%> (-0.64%) ⬇️
hive ?
javascript 63.04% <30.18%> (-0.34%) ⬇️
mysql ?
postgres ?
presto ?
python ?
sqlite ?

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

Impacted Files Coverage Δ
...nd/src/common/components/CronPicker/CronPicker.tsx 100.00% <ø> (ø)
...onents/nativeFilters/FilterBar/FilterSets/utils.ts 28.57% <0.00%> (+0.98%) ⬆️
superset-frontend/src/dashboard/reducers/types.ts 0.00% <ø> (ø)
...frontend/src/explore/components/OptionControls.tsx 67.02% <0.00%> (ø)
...ontrols/DndColumnSelectControl/DndColumnSelect.tsx 22.58% <ø> (ø)
...ents/controls/FilterControl/AdhocFilterControl.jsx 60.00% <ø> (ø)
.../controls/FilterControl/AdhocFilterEditPopover.jsx 58.00% <ø> (ø)
...Control/AdhocFilterEditPopoverSimpleTabContent.jsx 74.83% <ø> (ø)
...terControl/AdhocFilterEditPopoverSqlTabContent.jsx 63.33% <ø> (ø)
...nents/controls/FilterControl/AdhocFilterOption.jsx 100.00% <ø> (ø)
... and 339 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 5fca19d...6c72bbb. Read the comment docs.

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

@villebro villebro merged commit a35825d into apache:master Mar 15, 2021
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* refactor(native-filters): move data mask to root reducer

* refactor: update rest stuff for dataMask

* refactor: add ownCrrentState to explore

* fix: fix immer reducer

* fix: merge with master

* refactor: support explore dataMask

* refactor: support explore dataMask

* docs: add comment

* refactor: remove json stringify

* fix: fix failed cases

* feat: filter bat buttons start

* fix: fix CR notes

* fix: fix cascade filters

* fix: fix CR notes

* refactor: add clear all

* fix: fix CR notes

* fix: fix CR notes

* fix: fix CR notes

* feat: buttons in filter bar

* lint: update imports

* feat: add tabs for filter sets

* feat: add buttons to filter set

* feat: first phase add filter sets

* fix: undo FF

* refactor: continue filter sets

* fix: fix CR notes

* refactor: header

* fix: fix CR notes

* fix: fix CR notes

* refactor: continue filter sets

* lint: fix lint

* refactor: continue filter sets

* fix: fix filter bar opening

* refactor: continue filter sets

* refactor: continue filter sets

* refactor: continue filter sets

* feat: filters sets history

* feat: filters sets history

* fix: filter set name

* refactor: fix expand filters case

* fix: fix CR notes

* refactor: filter sets

* refactor: filter sets

* refactor: filter sets

* refactor: filter sets

* refactor: update sets

* feat: edit filter set

* refactor: add warning icon

* fix: fix CR notes

* Update superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterSets/EditSection.tsx

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>

* fix: fix CR notes

* feat: filter set edge cases

* lint: fix lint

* lint: fix TS

* refactor: fix CR notes

* fix: fix CR notes

* fix: fix CR notes

Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.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 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/L 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants