sadpandajoe opened a new pull request, #44836:
URL: https://github.com/apache/superset/pull/44836
### SUMMARY
The dashboard "Refresh interval" modal never showed the configured
`SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE`. The modal rendered
`extra={refreshErrors[0] ? null : refreshWarningMessage}`, but
`getRefreshWarningMessage` only returns a message under the same condition as
the minimum-refresh-limit error (`0 < frequency < limit`). Whenever the warning
would appear, the error was already set and hid it.
The warning now renders independently of the error, so it shows beneath the
limit error text when an interval below the limit is selected. The warning
still only appears when a limit and a warning message are both configured, and
is hidden once the interval meets the limit.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (text shown under an existing form field).
### TESTING INSTRUCTIONS
1. Set `SUPERSET_DASHBOARD_PERIODICAL_REFRESH_LIMIT = 60` and
`SUPERSET_DASHBOARD_PERIODICAL_REFRESH_WARNING_MESSAGE = "..."` in
`superset_config.py`.
2. Open a dashboard, then `Set auto-refresh interval` from the header menu.
3. Select `10 seconds`: the limit error and the configured warning both
show, and Save is disabled.
4. Select `5 minutes`: neither shows and Save is enabled.
Automated: `npm run test --
src/dashboard/components/RefreshIntervalModal.test.tsx`. The new "warning
alongside the error" test fails on master and passes with this change.
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [ ] 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
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]