Skip to content

fix(config): Wire LOGO_TARGET_PATH and document custom spinner usage#36951

Open
shashbha14 wants to merge 4 commits into
apache:masterfrom
shashbha14:fix/theming-config-docs
Open

fix(config): Wire LOGO_TARGET_PATH and document custom spinner usage#36951
shashbha14 wants to merge 4 commits into
apache:masterfrom
shashbha14:fix/theming-config-docs

Conversation

@shashbha14
Copy link
Copy Markdown

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:

  1. Documents Custom Loading Icon: Explicitly documents brandSpinnerUrl in THEME_DEFAULT within config.py. This clarifies that users can set a custom GIF/image loader via config without needing to replace source files or rebuild assets.
  2. Fixes Logo Link: Updates THEME_DEFAULT to correctly use LOGO_TARGET_PATH for brandLogoHref. Previously, LOGO_TARGET_PATH was ignored by the default theme, forcing users to override the entire theme object just to change the logo link.
  3. Clarifies Configuration: Added comments to APP_ICON, LOGO_TOOLTIP, LOGO_RIGHT_TEXT, and APP_ICON_WIDTH (deprecation note) to clarify their interaction with THEME_DEFAULT or their deprecated status.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
N/A (Configuration and Documentation changes only)

TESTING INSTRUCTIONS
To verify these changes locally:

  1. Verify Logo Link Fix:

    • In superset_config.py, set LOGO_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).
  2. 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.

ADDITIONAL INFORMATION

@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Jan 7, 2026

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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot Bot added doc Namespace | Anything related to documentation global:theming Related to theming Superset labels Jan 7, 2026
@netlify
Copy link
Copy Markdown

netlify Bot commented Jan 7, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 552a9cb
🔍 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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@rusackas
Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a bug where the LOGO_TARGET_PATH configuration variable was ignored by the default theme system, and improves documentation around custom loading icons and logo configuration.

Changes:

  • Fixed LOGO_TARGET_PATH to be properly wired into THEME_DEFAULT["token"]["brandLogoHref"]
  • Documented the brandSpinnerUrl configuration option for custom loading icons
  • Added clarifying comments about how APP_ICON, LOGO_TARGET_PATH, LOGO_TOOLTIP, and LOGO_RIGHT_TEXT interact with the theme system

Comment thread superset/config.py Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.44%. Comparing base (9968393) to head (24b7e03).
⚠️ Report is 1465 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.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread superset/config.py Outdated
Comment thread superset/config.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot removed the doc Namespace | Anything related to documentation label Feb 19, 2026
rusackas and others added 2 commits February 19, 2026 13:40
Adds a unit test to verify that LOGO_TARGET_PATH is properly wired
into THEME_DEFAULT["token"]["brandLogoHref"], as requested in review.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pull-request-size pull-request-size Bot added size/M and removed size/S labels Feb 19, 2026
@rusackas
Copy link
Copy Markdown
Member

I've added a test to help see this through.

@bito-code-review
Copy link
Copy Markdown
Contributor

bito-code-review Bot commented Feb 19, 2026

Code Review Agent Run #570c3f

Actionable Suggestions - 0
Additional Suggestions - 2
  • tests/unit_tests/config_test.py - 2
    • Incomplete test coverage · Line 317-335
      The 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-332
      The 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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

global:theming Related to theming Superset size/M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Theming Error: Facing issue in Changing App Icon and Loading icon in Apache Superset 6.0.0

3 participants