innovark37 opened a new pull request, #37523:
URL: https://github.com/apache/superset/pull/37523
### SUMMARY
This PR fixes theme token handling for subdirectory deployments by ensuring
`brandSpinnerUrl` gets properly prefixed with the application root path,
similar to how `brandLogoUrl` and `APP_ICON` are already handled.
#### Problem
When Superset is deployed under a subdirectory (e.g., `/superset/`,
`/analytics/`), the loading spinner image (`brandSpinnerUrl`) would break
because its URL wasn't being prefixed with the application root. This caused
404 errors for the spinner image in non-root deployments.
#### Root Cause
The application initialization code already handled `brandLogoUrl` and
`APP_ICON` for subdirectory deployments, but missed `brandSpinnerUrl`, which is
another theme token that references static assets.
#### Solution
Extend the existing subdirectory handling logic to include `brandSpinnerUrl`
token, applying the same pattern used for `brandLogoUrl`.
### TESTING INSTRUCTIONS
1. Create test theme configuration:
```py
THEME_DEFAULT = {
"token": {
"brandSpinnerUrl": "/static/assets/images/loading.gif",
},
"algorithm": "default",
}
```
2. Start Superset with subdirectory deployment:
```
SUPERSET_APP_ROOT=/analytics
```
4. Verify loading spinner appears
### 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
--
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]