fix(native-filters): remove hard-coded default time range#15015
Conversation
3592acd to
550399f
Compare
550399f to
6771a83
Compare
|
/testenv up FEATURE_DASHBOARD_NATIVE_FILTERS=true |
|
@junlincc Ephemeral environment spinning up at http://35.163.111.252:8080. Credentials are |
|
@villebro thanks for the PR! looks like hard coded time range are removed, but filter is not affecting the query. please see video, when i do set time range to last week, dashboard has no change. Screen.Recording.2021-06-08.at.11.32.17.AM.mov |
😱 Thanks for testing - will look into this asap and add a test. |
|
@junlincc it's applying fine for me: It appears that the COVID dataset doesn't have a temporal column. Which raises the question, we should probably not show a time filter (or time column filter for that matter) if there are no temporal columns available in the target dataset. However, this same problem applies to Filter Box as well, so I propose leaving that to a later PR. |
|
sounds good. does #15068 make sense? cc @kgabryje @michael-s-molina |
|
Ephemeral environment shutdown and build artifacts deleted. |
|
🏷2021.23 |
* fix(native-filters): use default for time range from explore * fix tests (cherry picked from commit 8aaa603)
* fix(native-filters): use default for time range from explore * fix tests
* fix(native-filters): use default for time range from explore * fix tests
* fix(native-filters): use default for time range from explore * fix tests
* fix(native-filters): use default for time range from explore * fix tests

SUMMARY
Currently the time range native filter defaults to "Last week" despite the new default being "No Filter" as introduced in #14661. This PR removes all references to "Last week" and leaves the time range value unset unless explicitly set. Other changes:
filterState(which the application has control over)defaultValue(this is now fully handled by the application)BEFORE
When leaving the default value unset, the value shows up as "Last week":

AFTER
Now it defaults to "No filter":

When no filter is defined, the filter indicator shows the filter as being unset:

TESTING INSTRUCTIONS
Local testing:
ADDITIONAL INFORMATION