Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add
ParagonWebpackPlugin
to support design tokens #546feat: add
ParagonWebpackPlugin
to support design tokens #546Changes from 17 commits
452b3e8
eb4fe12
0e3fc56
2e8ee7d
5fa8aff
f48437b
e98a4fb
12007ca
2bf31f8
9343528
afe8880
3d2f0a1
d173b8e
b7fcfe5
73a83f4
dfdcbdb
b1f8364
4ac4d42
347e820
c019cc9
182100f
516c1bf
27d0f75
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In testing this further with the
@edx/brand
alias installed in this repo'sexample
MFE app, and exposing the injectedPARAGON_THEME
global variable withinApp.jsx
, the installed brand package is not installed as this function references@openedx/brand
rather than the aliased@edx/brand
currently used by MFEs (e.g., frontend-app-learning).I might recommend supporting the following to remain both forward-looking for the
@openedx
migration and the currently used@edx/brand
:@openedx/paragon
@openedx/brand
(brand override)@edx/brand
(brand override)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[unrelated nit, no action needed] now that frontend-build natively supports TypeScript, we might want to consider migrating these JSDoc type definitions to TypeScript. It would help improve the long-term maintainability of these code paths.
I filed a follow-up GitHub issue (#581) to backlog the task to migrate these JSDOc type definitions to TypeScript for future consideration/prioritization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In testing this further with the
@edx/brand
alias installed in this repo'sexample
MFE app, and exposing the injectedPARAGON_THEME
global variable withinApp.jsx
, the installed brand package is not installed as this function references@openedx/brand
rather than the aliased@edx/brand
currently used by MFEs (e.g., frontend-app-learning).I might recommend supporting the following to remain both forward-looking for the
@openedx
migration and the currently used@edx/brand
:@openedx/paragon
@openedx/brand
(brand override)@edx/brand
(brand override)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason why
@edx/brand
is not considered is that we would like to encourage the migration of that alias as much as possible (additional context), that is why is included in the list of changes in the PR description, as you can see in the example app PREven the current readme for the repository makes reference to
@openedx/brand
instead of@edx/brand
.frontend-build/README.md
Line 158 in ae8ce98
I consider that we could be more explicit about this change in the MFE Migration Guide instead. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To expand on @brian-smith-tcril's response below regarding keeping parity with the existing
@edx/brand
scope used today given the non-breaking nature of this release, I believe the README prematurely referenced@openedx/brand
as part of this PR given that migration of NPM scope for the brand packages has not yet been prioritized/executed. Looks like the brand package was incorrectly grouped with the scope migrations for other NPM packages (i.e.,@openedx/paragon
and@openedx/frontend-build
).By having the current README recommend
@openedx/brand
in themodule.config.js
within the README would never be resolved as the alias since@openedx/brand
is not used in consuming apps, so it's currently incorrect documentation.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we validate if the values exist before use them?, I mean just to avoid future errors, something like if !themeCore || !themeVariants return undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not necessary because we are using destructuring if any of them is not defined that will return undefined by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Similar to other comments; currently consuming MFEs install the brand package as
@edx/brand
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Similar to other comments; currently consuming MFEs install the brand package as
@edx/brand
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it'd be nice to add a comment somewhere explaining why this plugin is being used. The readme on npm says
I assume that is why this is being used, but it'd be nice to confirm/document that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @brian-smith-tcril, thanks for your review, I addressed this comment and rebased the branch.