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(native-filters): add sort option to select filter #13569

Merged
merged 3 commits into from
Mar 12, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Mar 11, 2021

SUMMARY

Add sort option to native select filter that defaults to true.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

The filter config modal:
image

And the filter itself:
image

TEST PLAN

Local testing

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

@villebro villebro force-pushed the villebro/native-select-sort branch from a4ad977 to e238b18 Compare March 11, 2021 08:50
@villebro villebro force-pushed the villebro/native-select-sort branch from f96befd to 9518a96 Compare March 11, 2021 16:41
@@ -29,10 +29,10 @@ interface PluginFilterSelectCustomizeProps {
defaultValue?: (string | number)[] | null;
currentValue?: (string | number)[] | null;
enableEmptyFilter: boolean;
fetchPredicate?: string;
Copy link
Member Author

Choose a reason for hiding this comment

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

fetchPredicate is now automatically applied in backend

@villebro villebro force-pushed the villebro/native-select-sort branch from 9518a96 to bc28498 Compare March 11, 2021 16:43
Comment on lines -55 to +54
multiSelect: false,
multiSelect: true,
Copy link
Member Author

Choose a reason for hiding this comment

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

Enabling multiSelect by default to match Filter Box.

@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label Mar 11, 2021
@junlincc
Copy link
Member

junlincc commented Mar 11, 2021

LGTM ✅ Please merge this PR as soon as all checks pass. 🙏

@junlincc junlincc added the rush! Requires immediate attention label Mar 11, 2021
@villebro villebro force-pushed the villebro/native-select-sort branch from 4f4ba96 to bc28498 Compare March 11, 2021 22:35
@villebro villebro force-pushed the villebro/native-select-sort branch from 6816b0d to ac72e59 Compare March 12, 2021 00:21
@codecov
Copy link

codecov bot commented Mar 12, 2021

Codecov Report

Merging #13569 (ba7e49c) into master (5fca19d) will decrease coverage by 4.08%.
The diff coverage is 53.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13569      +/-   ##
==========================================
- Coverage   77.53%   73.45%   -4.09%     
==========================================
  Files         904      604     -300     
  Lines       45986    21412   -24574     
  Branches     5552     5557       +5     
==========================================
- Hits        35657    15729   -19928     
+ Misses      10195     5548    -4647     
- Partials      134      135       +1     
Flag Coverage Δ
cypress 57.08% <87.50%> (-0.12%) ⬇️
hive ?
javascript 63.35% <13.33%> (-0.03%) ⬇️
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% <ø> (ø)
...et-frontend/src/filters/components/Select/types.ts 100.00% <ø> (ø)
...tend/src/filters/components/Select/controlPanel.ts 20.00% <20.00%> (-13.34%) ⬇️
...ontend/src/filters/components/Select/buildQuery.ts 57.14% <50.00%> (-9.53%) ⬇️
...frontend/src/common/components/CronPicker/index.ts 100.00% <100.00%> (ø)
.../src/components/dataViewCommon/TableCollection.tsx 100.00% <100.00%> (ø)
...tersConfigModal/FiltersConfigForm/ControlItems.tsx 70.83% <100.00%> (+5.61%) ⬆️
...s/nativeFilters/FilterBar/CascadeFilterControl.tsx 64.28% <0.00%> (-21.43%) ⬇️
...hboard/components/nativeFilters/FilterBar/state.ts 85.71% <0.00%> (-14.29%) ⬇️
...ponents/nativeFilters/FilterBar/CascadePopover.tsx 83.09% <0.00%> (-14.09%) ⬇️
... and 305 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...ac72e59. Read the comment docs.

@rusackas rusackas self-requested a review March 12, 2021 00:44
@pkdotson pkdotson merged commit 901acd9 into apache:master Mar 12, 2021
@junlincc junlincc removed the rush! Requires immediate attention label Mar 12, 2021
@villebro villebro deleted the villebro/native-select-sort branch March 12, 2021 06:02
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* feat(native-filters): add sort option to select filter

* remove from useEffect

* disable flaky cypress tests
@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 preset-io size/M 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants