fix(config): Wire LOGO_TARGET_PATH and document custom spinner usage
SUMMARY
This PR addresses user confusion regarding customizing the loading icon and resolves a bug where LOGO_TARGET_PATH was being ignored by the default theme system in Superset 6.0.0.
Specifically, it:
- Documents Custom Loading Icon: Explicitly documents
brandSpinnerUrlinTHEME_DEFAULTwithin config.py. This clarifies that users can set a custom GIF/image loader via config without needing to replace source files or rebuild assets. - Fixes Logo Link: Updates
THEME_DEFAULTto correctly useLOGO_TARGET_PATHforbrandLogoHref. Previously,LOGO_TARGET_PATHwas ignored by the default theme, forcing users to override the entire theme object just to change the logo link. - Clarifies Configuration: Added comments to
APP_ICON,LOGO_TOOLTIP,LOGO_RIGHT_TEXT, andAPP_ICON_WIDTH(deprecation note) to clarify their interaction withTHEME_DEFAULTor their deprecated status.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A (Configuration and Documentation changes only)
TESTING INSTRUCTIONS To verify these changes locally:
-
Verify Logo Link Fix:
- In
superset_config.py, setLOGO_TARGET_PATH = "https://custom.url". - Restart Superset and click the top-left logo.
- Result: It should navigate to
https://custom.url(previously it would stay on/unless the theme was overridden).
- In
-
Verify Custom Spinner:
- In
superset_config.py, set:THEME_DEFAULT = { "token": { "brandSpinnerUrl": "/static/assets/images/my-custom-spinner.gif" } } - Restart Superset.
- Result: The custom GIF should appear during loading.
- In
ADDITIONAL INFORMATION
- [x] Has associated issue: Fixes #36940
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration (follow approval process in SIP-59)
- [ ] 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
Code Review Agent Run #3272be
Actionable Suggestions - 0
Review Details
-
Files reviewed - 1 · Commit Range:
4e6b533..4e6b533- superset/config.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help
Deploy Preview for superset-docs-preview ready!
| Name | Link |
|---|---|
| Latest commit | 552a9cbd54729b56b9e07b05eac2398d64937267 |
| Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/69978337ba3eb1000803448f |
| Deploy Preview | https://deploy-preview-36951--superset-docs-preview.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify project configuration.
Looks simple enough, but can you perhaps add a simple test where you add a LOGO_TARGET_PATH and assert that it shows up in the code?
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 66.44%. Comparing base (9968393) to head (24b7e03).
:warning: Report is 1253 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #36951 +/- ##
===========================================
+ Coverage 0 66.44% +66.44%
===========================================
Files 0 668 +668
Lines 0 51391 +51391
Branches 0 5794 +5794
===========================================
+ Hits 0 34148 +34148
- Misses 0 15855 +15855
- Partials 0 1388 +1388
| Flag | Coverage Δ | |
|---|---|---|
| hive | 41.43% <ø> (?) |
|
| mysql | 64.55% <ø> (?) |
|
| postgres | 64.62% <ø> (?) |
|
| presto | 41.45% <ø> (?) |
|
| python | 66.42% <ø> (?) |
|
| sqlite | 64.22% <ø> (?) |
|
| unit | 100.00% <ø> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
I've added a test to help see this through.
Code Review Agent Run #570c3f
Actionable Suggestions - 0
Additional Suggestions - 2
-
tests/unit_tests/config_test.py - 2
-
Incomplete test coverage · Line 317-335The test docstring states it verifies behavior when LOGO_TARGET_PATH is set, but the implementation only checks the default case. Since THEME_DEFAULT is evaluated at import time, setting LOGO_TARGET_PATH after import won't change it. Consider either updating the docstring to reflect only testing the default, or modifying the test to properly validate the 'or' logic by directly testing THEME_DEFAULT with different values.
-
Redundant assertion · Line 330-332The assertion `assert (custom_path or "/") == custom_path` merely verifies Python's built-in 'or' short-circuiting, which doesn't add value to testing the config logic.
-
Review Details
-
Files reviewed - 2 · Commit Range:
4e6b533..24b7e03- superset/config.py
- tests/unit_tests/config_test.py
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- MyPy (Static Code Analysis) - ✔︎ Successful
- Astral Ruff (Static Code Analysis) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help