bschreder opened a new pull request, #38922: URL: https://github.com/apache/superset/pull/38922
feat(dashboard): pre-filter time grain ### SUMMARY This follows the proposal in GitHub discussion https://github.com/apache/superset/discussions/38306: fetch available time grain options from the dataset-supported grains expose a multi-select configuration for the Time Grain control preserve backwards compatibility by treating an undefined value as "all allowed" store selected time grains in native_filter_configuration only when a subset is selected ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF After: - Dashboard authors can configure allowed Time Grain options in the filter configuration UI - End users only see the selected subset of time grains in the dashboard filter ### TESTING INSTRUCTIONS 1. Open a dashboard with a Time Grain native filter. 2. Edit the filter configuration for the Time Grain control. 3. Set a subset of allowed time grains, such as Day and Week. 4. Save the dashboard. 5. Confirm the dashboard Time Grain filter only shows the configured values. 6. Confirm leaving all values selected behaves the same as before. 7. Confirm existing dashboards without this config still behave unchanged. 8. Run the relevant automated tests and pre-commit checks locally. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
