-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
perf(native-filters): Load native filters after charts #14443
Conversation
� Conflicts: � superset-frontend/src/dashboard/util/getPermissions.ts
� Conflicts: � superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigForm/FiltersConfigForm.tsx
Reviewing/testing #14408 first, but one problem with this approach is that it will cause two renders of charts - first with the full width of the dashboard without the filter tab, and next with the filter tab. To address this I would recommend making the filter tab visible initially, but potentially introduce the loading spinner instead of the tab contents to highlight that filters are still pending. |
� Conflicts: � superset-frontend/src/dashboard/components/nativeFilters/FilterBar/index.tsx � superset-frontend/src/dashboard/components/nativeFilters/FilterBar/state.ts � superset-frontend/src/dashboard/components/nativeFilters/FilterBar/utils.ts � superset-frontend/src/dashboard/types.ts � superset-frontend/src/dataMask/reducer.ts
Codecov Report
@@ Coverage Diff @@
## master #14443 +/- ##
==========================================
+ Coverage 76.95% 77.09% +0.13%
==========================================
Files 955 957 +2
Lines 48091 48141 +50
Branches 6036 6056 +20
==========================================
+ Hits 37008 37112 +104
+ Misses 10884 10828 -56
- Partials 199 201 +2
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.
One small comment, other than that LGTM and was verified to work well in all following cases:
- regular examples dashboard
- dashboard with no charts on first page
- Global Async Query framework (websocket)
{!isInitialized ? ( | ||
<Loading /> | ||
) : isFeatureEnabled(FeatureFlag.DASHBOARD_NATIVE_FILTERS_SET) ? ( |
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.
I think this causes an unnecessary visual artefact - I think it's ok to keep this as-is, i.e. showing the filters in spinning state until they've fully 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.
but this is the point not to render them in order they will not start to do requests to the server :)
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.
Haha, makes sense 🤦
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
* fix:fix get permission function * refactor: filter default value * refactor: update default value loading * refactor: apply defaultValues * lint: fix lint * lint: fix lint * test: fix test * refactor: use extraFormData for reload charts * feat: load native filters after after charts * feat: load filters after charts * fix: revert changes * test: fix timers * test: fix tests (cherry picked from commit 582900c)
* fix:fix get permission function * refactor: filter default value * refactor: update default value loading * refactor: apply defaultValues * lint: fix lint * lint: fix lint * test: fix test * refactor: use extraFormData for reload charts * feat: load native filters after after charts * feat: load filters after charts * fix: revert changes * test: fix timers * test: fix tests
* fix:fix get permission function * refactor: filter default value * refactor: update default value loading * refactor: apply defaultValues * lint: fix lint * lint: fix lint * test: fix test * refactor: use extraFormData for reload charts * feat: load native filters after after charts * feat: load filters after charts * fix: revert changes * test: fix timers * test: fix tests (cherry picked from commit 582900c)
* fix:fix get permission function * refactor: filter default value * refactor: update default value loading * refactor: apply defaultValues * lint: fix lint * lint: fix lint * test: fix test * refactor: use extraFormData for reload charts * feat: load native filters after after charts * feat: load filters after charts * fix: revert changes * test: fix timers * test: fix tests
* fix:fix get permission function * refactor: filter default value * refactor: update default value loading * refactor: apply defaultValues * lint: fix lint * lint: fix lint * test: fix test * refactor: use extraFormData for reload charts * feat: load native filters after after charts * feat: load filters after charts * fix: revert changes * test: fix timers * test: fix tests
* fix:fix get permission function * refactor: filter default value * refactor: update default value loading * refactor: apply defaultValues * lint: fix lint * lint: fix lint * test: fix test * refactor: use extraFormData for reload charts * feat: load native filters after after charts * feat: load filters after charts * fix: revert changes * test: fix timers * test: fix tests
SUMMARY
Show filter bar after all charts loaded
Dependent on: #14408
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-05-04.at.9.17.02.mov
TEST PLAN
ADDITIONAL INFORMATION