-
Notifications
You must be signed in to change notification settings - Fork 14k
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): decouple params from filter config modal (first phase) #13021
refactor(native-filters): decouple params from filter config modal (first phase) #13021
Conversation
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.
A few first pass comments, let me know what you think.
superset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/utils.ts
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## master #13021 +/- ##
===========================================
+ Coverage 53.06% 72.84% +19.78%
===========================================
Files 489 553 +64
Lines 17314 20276 +2962
Branches 4482 5301 +819
===========================================
+ Hits 9187 14770 +5583
+ Misses 8127 5381 -2746
- Partials 0 125 +125
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* master: fix: UI toast typo (apache#13026) feat(db engines): add support for Opendistro Elasticsearch (AWS ES) (apache#12602) fix(build): black failing on master, add to required checks (apache#13039) fix: time filter db migration optimization (apache#13015) fix: untranslated text content of Dashboard page (apache#13024) fix(ci): remove signature requirements for commits to master (apache#13034) fix: add alerts and report to default config (apache#12999) docs(changelog): add entries for 1.0.1 (apache#12981) ci: skip cypress if no code changes (apache#12982) chore: add cypress required checks for branch protection (apache#12970) Refresh dashboard list after bulk delete (apache#12945) Updates storybook to version 6.1.17 (apache#13014) feat: Save datapanel state in local storage (apache#12996) fix: added text and changed margins (apache#12923) chore: Swap Slack Url 2 more places (apache#13004)
…sen/incubator-superset into decouple_filter_config_params
if (!controlItem.config.resetConfig) { | ||
return; | ||
} |
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.
if (!controlItem.config.resetConfig) { | |
return; | |
} | |
if (!isValidChange(controlItem.config)) { | |
return; | |
} |
extract !controlItem.config.resetConfig
to isValidChange(config)
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.
Small nit; other than that + a rebase to resolve conflict this LGTM and one of the last steps needed to fully decouple filters 🎉
...rset-frontend/src/dashboard/components/nativeFilters/FilterConfigModal/FilterConfigModal.tsx
Outdated
Show resolved
Hide resolved
…ter_config_params � Conflicts: � superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterValue.tsx
…irst phase) (apache#13021) * refactor: decouple params from filter config modal (first phase) * refactor: remove unnecessary fields * refactor: fix CR notes * fix: fix controlValues * refactor: fix Cr notes Co-authored-by: amitmiran137 <[email protected]>
* master: (30 commits) refactor(native-filters): decouple params from filter config modal (first phase) (apache#13021) fix(native-filters): set currentValue null when empty (apache#13000) Custom superset_config.py + secret envs (apache#13096) Update http error code from 400 to 403 (apache#13061) feat(native-filters): add storybook entry for select filter (apache#13005) feat(native-filters): Time native filter (apache#12992) Force pod restart on config changes (apache#13056) feat(cross-filters): add cross filters (apache#12662) fix(explore): Enable selecting an option not included in suggestions (apache#13029) Improves RTL configuration (apache#13079) Added a note about the ! prefix for breaking changes to CONTRIBUTING.md (apache#13083) chore: lock down npm to v6 (apache#13069) fix: API tests, make them possible to run independently again (apache#13076) fix: add config to disable dataset ownership on the old api (apache#13051) add required * indicator to message content/notif method (apache#12931) fix: Retroactively add granularity param to charts (apache#12960) fix(ci): multiline regex in change detection (apache#13075) feat(style): hide dashboard header by url parameter (apache#12918) fix(explore): pie chart label bugs (apache#13052) fix: Disabled state button transition time (apache#13008) ...
SUMMARY
This PR decouple hardcoded per filter params from Filter config modal.
Now they generated dynamically based on
controlPanel
config.In first phase we take all params that have
renderTrigger
property and render them in the bottom of the Modal.also we added new property
resetConfig
to resetdefaultValue
if current property is changedBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-02-09.at.9.12.21.mov
TEST PLAN
ADDITIONAL INFORMATION