Skip to content

Conversation

@arbrandes
Copy link
Contributor

@arbrandes arbrandes commented Dec 8, 2025

Description

This PR does four main things:

  • refactor: Move runtime react hooks into separate files
  • feat!: Paragon 23 and External CSS support
  • feat: Update to Node 24 and regenerate package-lock
  • fix: Build error caused by [email protected]

While the other commits are reasonably uncontroversial, the meat of it comes from Paragon 23 and design tokens support. Paragon 23 is in and of itself is a breaking change due to the introduction of design tokens. In other words, as of this version frontend-base apps now need to support Paragon 23 as well.

This also adds a subset of the external CSS feature that was introduced to frontend-build and -platform alongside design tokens. Notably, the following are no longer needed in frontend-base land:

  • The entire webpackParagonPlugin and the concept of an innate PARAGON_THEME
  • $paragonVersion and $brandVersion substitutions
  • Fallback theme URLs

In effect, the current port only supports loading openedx/brand styles externally.

Also, the MFE_CONFIG runtime mechanism is still not finalized for frontend-base, so the corresponding documentation was not added.

References

This is based on the work originally described in the following PRs. They're now closed, but still useful to understand the motivation - including why I'm not including some of the features here:

Subsequent PRs actually implemented it:

The migration howto for MFEs is also useful as reference:

https://openedx.atlassian.net/wiki/spaces/BPL/pages/3770744958/Migrating+MFEs+to+Paragon+design+tokens+and+CSS+variables

Testing

Beyond CI, I suggest that this PR undergo only an architecture and code review, and after merge and release of a new version, it will be possible to test the features introduced here more easily with correspondingly upgraded MFEs (PRs listed below).

Related PRs

This is done in preparation for Paragon 23 support.
@arbrandes arbrandes changed the title design tokens feat!: Paragon 23 and External CSS support Dec 8, 2025
@arbrandes arbrandes force-pushed the design-tokens branch 3 times, most recently from 68608d2 to e08c07a Compare December 8, 2025 16:02
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Super exciting to see this happening! I haven't tested this locally yet, but I did a first pass. Looking forward to seeing where the conversations that stem from my comments go!

Copy link
Contributor Author

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

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

@brian-smith-tcril, I addressed the review explicitly in commit a658f31. Now I'll embark on the full-on rename of all variables and filenames as per our previous discussion.

@arbrandes
Copy link
Contributor Author

Ok. @brian-smith-tcril, this is the full diff since your last review (nice, Github now allows linking to the diff of a range of commits in a PR!):

https://github.com/openedx/frontend-base/pull/111/files/e08c07a0785b563357c246fc16486ea341cdef9f..f440a1ef5790a705f1a0852c7cfdb051b2cde1d0

Good for a second pass.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Overall this is looking great!

I left a couple comments, most are small suggestions for changes to docs/inline comments, but there are a couple places where I had some questions.

@arbrandes arbrandes force-pushed the design-tokens branch 2 times, most recently from ecae865 to 0c7e11a Compare December 11, 2025 18:17
Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Looks to me like this is 99% good to merge!

I left a couple tiny comments. Mostly small wording changes to inline comments, one place where adding an extra test would be cool.

Copy link
Contributor

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

Code-wise this LGTM!

I still haven't pulled this down to test locally but I'm still confident to say :shipit:

This upgrades Paragon to version 23, which in and of itself is a
breaking change to to the introduction of design tokens.  In other
words, as of this version frontend-base apps now need to support Paragon
23 as well.

This also adds a subset of the external CSS feature that was introduced
to frontend-build and -platform alongside design tokens.  Notably, the
following are no longer needed in frontend-base land:

* The entire webpackParagonPlugin and the concept of an innate PARAGON_THEME
* $paragonVersion and $brandVersion substitutions
* Fallback theme URLs

In effect, the current port only supports loading `openedx/brand` styles
externally.

Also, the MFE_CONFIG runtime mechanism is still not finalized for
frontend-base, so the corresponding documentation was not added.
Limit react-focus-on's version to `<3.10.0`, as that minor version seems to be
a little risky.  See:

theKashey/react-focus-on#111
@arbrandes arbrandes enabled auto-merge (rebase) December 12, 2025 15:09
@arbrandes arbrandes merged commit 90ca7aa into openedx:main Dec 12, 2025
5 checks passed
@arbrandes arbrandes deleted the design-tokens branch December 12, 2025 15:46
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.

Support Paragon design tokens and theming

2 participants