Skip to content

feat: translate PARAGON_THEME_URLS to frontend-base theme config#38610

Merged
arbrandes merged 1 commit intoopenedx:masterfrom
arbrandes:arbrandes/shim-paragon-theme-urls
May 7, 2026
Merged

feat: translate PARAGON_THEME_URLS to frontend-base theme config#38610
arbrandes merged 1 commit intoopenedx:masterfrom
arbrandes:arbrandes/shim-paragon-theme-urls

Conversation

@arbrandes
Copy link
Copy Markdown
Contributor

@arbrandes arbrandes commented May 7, 2026

Description

Adds a structural translator from the legacy PARAGON_THEME_URLS shape (frontend-platform's env.config.jsx) into the frontend-base SiteConfig.theme setting served by FrontendSiteConfigView.

frontend-base loads Paragon's base CSS via its shell stylesheet, so the runtime theme setting is exclusively a brand-override mechanism. The translator deliberately narrows to urls.brandOverride only. Bare url and urls.default (which historically pointed at Paragon defaults) are dropped, since translating them would clobber the bundled CSS with potentially stale URLs. defaults passes through unchanged. Custom brand-only variants whose legacy form was a bare url are not translated; deployers using those would re-author them in frontend-base directly.

PARAGON_THEME_URLS is also added to the set of site-level keys stripped from per-app MFE_CONFIG_OVERRIDES, since theme is site-level only in frontend-base. Both translations are factored through a new LEGACY_SITE_LEVEL_KEYS constant so the rename map and the structural translator stay in sync at the strip site.

LLM usage notice

Built with assistance from Claude.

@arbrandes arbrandes enabled auto-merge (rebase) May 7, 2026 19:40
Adds a structural translator from the legacy PARAGON_THEME_URLS shape
(frontend-platform's env.config.jsx) into the frontend-base SiteConfig
`theme` setting served by FrontendSiteConfigView.

frontend-base loads Paragon's base CSS via its shell stylesheet, so the
runtime `theme` is exclusively a brand-override mechanism.  The
translator deliberately narrows to `urls.brandOverride` only; bare `url`
and `urls.default` would point at Paragon defaults and clobber the
bundled CSS, so they are dropped.  `defaults` passes through unchanged
when at least one URL survives, and is dropped (along with the whole
`theme` key) when no URL survives, since `defaults` alone is meaningless
without a stylesheet to point at.

PARAGON_THEME_URLS is also added to the site-level keys stripped from
per-app MFE_CONFIG_OVERRIDES, since `theme` is site-level only in
frontend-base.

Co-Authored-By: Claude <noreply@anthropic.com>
@arbrandes arbrandes force-pushed the arbrandes/shim-paragon-theme-urls branch from be2926f to 11796c1 Compare May 7, 2026 21:20
@arbrandes arbrandes merged commit 198fe67 into openedx:master May 7, 2026
41 checks passed
@arbrandes arbrandes deleted the arbrandes/shim-paragon-theme-urls branch May 7, 2026 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants