* upstream/master: (68 commits)
fix typos (apache#14950)
docs: fix custom oauth config (apache#14997)
fix: apply template_params on external_metadata (apache#14996)
fix: toggle fullscreen on the dashboard (apache#14979)
feat(native-filters): add markers and number formatter + simple tests (apache#14981)
fix(native-filters): Fix "undefined" error after editing a filter (apache#14984)
fix(native-filters): remove implied fetch predicate (apache#14982)
fix(native-filters): update cascaded filter state on change (apache#14980)
fix(filter box): replace freeform where clause with ilike (apache#14900)
refactor: Convert TableElement.jsx component from class to functional with hooks (apache#14830)
fix: renamed sqllab filters to _filters (apache#14971)
feat(native-filters): apply cascading without instant filtering (apache#14966)
chore: bump superset-ui to 0.17.53 (apache#14968)
fix(native-filters): cascading filters not rendering in tab (apache#14964)
feat: add type_generic and is_dttm to table metadata (apache#14863)
additional safeguard (apache#14953)
feat: Adding FORCE_SSL as feature flag in config.py (apache#14934)
feat(dashboard/native-filters): Hide filters out of scope of current tab (apache#14933)
fix: time parser truncate to first day of year/month (apache#14945)
fix: is_temporal should overwrite is_dttm (apache#14894)
...
SUMMARY
Currently enabling cascading in native filters requires instantly applying filters, causing all charts in scope to rerender and retrigger queries. This PR changes child filters to apply the currently selected data mask of the parent filter instead of the currently applied one, removing the need to instantly apply filters.
While making the changes, I considered moving
dataMaskSelectedinto Redux instead of adding it as a prop on the chain of components. However, I noticed that many of the intermediate components between the filter tab andFilterValuewere already usingdataMaskSelected, which made the benefits of moving it to Redux less appealing. In addition, adding it to Redux would have required eitherdataMaskSelectedproperty to complement thedataMaskproperty (which contains the applied data mask) in the state treeor
dataMaskso that it would be split intodataMask.appliedanddataMask.selectedSince both of these would have required fairly significant refactoring, it seems better to perform this refactoring later when the full scope of refactoring needs is clear (e.g. will some of this state be moved into Context or be kept in Redux).
BFEORE
Currently each time a parent filter is changed, it triggers the filter automatically:
https://user-images.githubusercontent.com/33317356/120623645-962b6000-c468-11eb-86b5-db95319691f4.mp4
AFTER
Now the parent filter only retriggers the child filters (applying works like before):
https://user-images.githubusercontent.com/33317356/120628894-e2c56a00-c46d-11eb-8200-51d2c73ea10d.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION