-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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): Support default to first value in select filter #14869
Conversation
� Conflicts: � superset-frontend/src/dashboard/util/getPermissions.ts
@simcha90 this needs a rebase. Let's also break out the Select filter tests into a separate PR to make review easier. |
� Conflicts: � superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/ControlItems.tsx � superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx � superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
Codecov Report
@@ Coverage Diff @@
## master #14869 +/- ##
==========================================
+ Coverage 77.55% 77.68% +0.12%
==========================================
Files 965 966 +1
Lines 49535 49566 +31
Branches 6268 6293 +25
==========================================
+ Hits 38416 38503 +87
+ Misses 10918 10861 -57
- Partials 201 202 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx
Show resolved
Hide resolved
superset-frontend/src/dashboard/components/DashboardBuilder/state.ts
Outdated
Show resolved
Hide resolved
...src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/DefaultValue.tsx
Outdated
Show resolved
Hide resolved
...ashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
Outdated
Show resolved
Hide resolved
� Conflicts: � superset-frontend/src/dashboard/components/DashboardBuilder/DashboardBuilder.tsx � superset-frontend/src/filters/components/Select/SelectFilterPlugin.tsx
� Conflicts: � superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx � superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/getControlItemsMap.tsx � superset-frontend/src/dashboard/components/nativeFilters/types.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor comments
superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx
Outdated
Show resolved
Hide resolved
...ashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
Show resolved
Hide resolved
superset-frontend/src/filters/components/Select/controlPanel.ts
Outdated
Show resolved
Hide resolved
superset-frontend/src/filters/components/Select/controlPanel.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* upstream/master: fix(explore): Datepicker glitch on hover outside the modal (apache#15033) Add ming-height to empty tab (apache#14878) Remove nowrap (apache#14954) display all metric results in editor (apache#15031) feat: Add "is_select_query" method to base engine spec to make it possible to override it (apache#15013) fix(dashboard): custom css should be removed on unmount (apache#15025) feat(filter-box): hide druid options if druid not enabled (apache#14921) fix: adding additional configs and colors for queryHistory (apache#14995) chore: rename 'Source' to 'Database' for consistency (apache#15021) chore(ci): fix ci conflict (apache#15016) fix(native-filters): avoid double load on initialization (apache#15012) feat(native-filters): Support default to first value in select filter (apache#14869) docs: required information for OAuth2 configuration (apache#15010) Update index.mdx (apache#14990)
…apache#14869) * fix:fix get permission function * feat: add async filters support * revert: revert ff * feat: add async filters support * fix: merge with master * fix: remove tests * lint: fix lint * fix: fix CR notes * fix: fix with master * test: fix tests * refactor: update logic for default first value * fix: get requiredFirst * fix: support instant * docs: update text * docs: fix comments * docs: update texts
…apache#14869) * fix:fix get permission function * feat: add async filters support * revert: revert ff * feat: add async filters support * fix: merge with master * fix: remove tests * lint: fix lint * fix: fix CR notes * fix: fix with master * test: fix tests * refactor: update logic for default first value * fix: get requiredFirst * fix: support instant * docs: update text * docs: fix comments * docs: update texts
…apache#14869) * fix:fix get permission function * feat: add async filters support * revert: revert ff * feat: add async filters support * fix: merge with master * fix: remove tests * lint: fix lint * fix: fix CR notes * fix: fix with master * test: fix tests * refactor: update logic for default first value * fix: get requiredFirst * fix: support instant * docs: update text * docs: fix comments * docs: update texts
SUMMARY
This PR fixes support for default first value in Select native filter. It includes next logic:
requiredFirst
flag we cancel delay of native filters loading, delay charts loading until this filter will be initialized - we do assumption iffilterState.value === undefined
, it means that filter not initializeddefaultToFirstValue
option enabled - we save onfilterState.value
undefined value and on filter loading we on the fly put first valueBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-05-27.at.16.39.38.mov
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION