Skip to content

[BD-46] feat: added support Paragon design tokens #303

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

Conversation

PKulkoRaccoonGang
Copy link
Contributor

@PKulkoRaccoonGang PKulkoRaccoonGang commented Jun 15, 2023

Important

Update frontend-platform to a version compatible with Paragon 23.
Needs openedx/frontend-platform#689 to be merged.

Issue: openedx/paragon#2348

@openedx-webhooks openedx-webhooks added the blended PR is managed through 2U's blended developmnt program label Jun 15, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Jun 15, 2023

Thanks for the pull request, @PKulkoRaccoonGang!

When this pull request is ready, tag your edX technical lead.

@PKulkoRaccoonGang PKulkoRaccoonGang marked this pull request as ready for review August 9, 2023 13:11
@PKulkoRaccoonGang PKulkoRaccoonGang force-pushed the Peter_Kulko/support-design-tokens branch from 854fb53 to 9edae71 Compare August 9, 2023 13:57
@PKulkoRaccoonGang PKulkoRaccoonGang force-pushed the Peter_Kulko/support-design-tokens branch from 9edae71 to 1b0fa1f Compare August 18, 2023 10:55
ghassanmas added a commit to ghassanmas/frontend-app-learning that referenced this pull request Oct 6, 2023
  This PR purpose is to test/demo parago design tokens simliar
  to this one for the profile openedx/frontend-app-profile/pull/764

  it override the following depns as seen in package.json

  - paragon alpha
  - openedx/frontend-build/pull/365
  - openedx/frontend-platform/pull/440
  - openedx/frontend-component-header/pull/351
  - openedx/frontend-component-footer/pull/303

 Conclousion so far:

 - There is an extra library that learning depends on which
  needs to support paragon; `frontend-lib-learning-assistant`
  and also `frontend-lib-special-exams`

 - It would be great to have a gudie or a document to look at,
 while doing the conversion that would **map variable from
 who it was used/named before to the name in design tokens**

 - I was stuck in the end with compliation error, that
 wepack couldn't find `Modal` exported from paragon.
@Mashal-m
Copy link
Contributor

Hey @PKulkoRaccoonGang, What is the current status of this PR, is it ready to review and merge?
Could you please resolve conflicts?

1 similar comment
@Mashal-m
Copy link
Contributor

Hey @PKulkoRaccoonGang, What is the current status of this PR, is it ready to review and merge?
Could you please resolve conflicts?

@abdullahwaheed
Copy link
Contributor

hi @PKulkoRaccoonGang is this PR still active or should we close it?

@PKulkoRaccoonGang
Copy link
Contributor Author

@Mashal-m @abdullahwaheed Hello! At the moment, all pull requests opened in the edx and openex repositories are awaiting further action on the use of Paragon design tokens in the MFE. Don't pay any attention to them for now.

Full list of pull requests that should just be open for now:

@dcoa
Copy link
Contributor

dcoa commented Jun 5, 2024

Hi @PKulkoRaccoonGang, thanks for this. I checked these changes and it is still relevant, the only thing left to do is rebase to master, and once the new packages are created update frontend-platform and paragon.

Also with the changes in frontend-build the webpack.dev.config.js needs a change for the example app, the change is only in the entry key:

  entry: {
    app: path.resolve(__dirname, 'example'),
  },

@import "@edx/brand/paragon/variables";
@import "@edx/paragon/scss/core/core";
@import "@edx/brand/paragon/overrides";

@import "@edx/frontend-component-footer/footer";
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
@import "@edx/frontend-component-footer/footer";
@use "@openedx/paragon/dist/core.min.css" as paragonCore;
@use "@openedx/paragon/dist/light.min.css" as paragonLight;
@import "@edx/frontend-component-footer/footer";

For the example app, I think we can use the Paragon installed versions, in this way, it's not necessary to add a js config file, and the styles are applied only for the example app.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dcoa dcoa force-pushed the Peter_Kulko/support-design-tokens branch from 427c7f3 to 21ff55f Compare March 11, 2025 01:57
Copy link

codecov bot commented Mar 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.22%. Comparing base (1d7a871) to head (964378a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #303   +/-   ##
=======================================
  Coverage   91.22%   91.22%           
=======================================
  Files           5        5           
  Lines          57       57           
  Branches       19       19           
=======================================
  Hits           52       52           
  Misses          5        5           

☔ 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.

@dcoa
Copy link
Contributor

dcoa commented Mar 11, 2025

@PKulkoRaccoonGang @brian-smith-tcril

The dependencies has been updated, I think we can open this PR and do the final review. :)

src/_footer.scss Outdated
.footer {
background-color: $gray-footer;
background-color: var(--pgn-color-light-100);
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to do this in a non-breaking way by utilizing fallbacks?

I think with fallbacks we'd be able to keep $gray-footer and have

Suggested change
background-color: var(--pgn-color-light-100);
background-color: var(--pgn-color-light-100, $gray-footer);

Copy link
Contributor

Choose a reason for hiding this comment

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

I made the change and is working with paragon 23 and 22

Copy link
Contributor

Choose a reason for hiding this comment

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

Perfect! Once dist is re-.gitignored this PR should be good to go!

Copy link
Contributor

Choose a reason for hiding this comment

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

Dist folder removed and gitignore restored.

@PKulkoRaccoonGang PKulkoRaccoonGang marked this pull request as ready for review March 11, 2025 22:59
chore: update paragon peerdependencies no breaking change

refactor: update to no breaking change

refactor: update to no breaking change

refactor: update to no breaking change
@dcoa dcoa force-pushed the Peter_Kulko/support-design-tokens branch from a15e094 to 1c47eee Compare March 11, 2025 23:15
@brian-smith-tcril brian-smith-tcril merged commit 10fc7a2 into openedx:master Mar 13, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blended PR is managed through 2U's blended developmnt program
Projects
No open projects
Status: No status
Development

Successfully merging this pull request may close these issues.

9 participants