Skip to content
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

Peter kulko/design tokens support #714

Conversation

PKulkoRaccoonGang
Copy link
Contributor

Description:

Describe what this pull request changes, and why. Include implications for people using this change.

Merge checklist:

  • Consider running your code modifications in the included example app within frontend-platform. This can be done by running npm start and opening http://localhost:8080.
  • Consider testing your code modifications in another local micro-frontend using local aliases configured via the module.config.js file in frontend-build.
  • Verify your commit title/body conforms to the conventional commits format (e.g., fix, feat) and is appropriate for your code change. Consider whether your code is a breaking change, and modify your commit accordingly.

Post merge:

  • After the build finishes for the merged commit, verify the new release has been pushed to NPM.

adamstankiewicz and others added 24 commits June 26, 2024 11:28
feat: adds support for loading external theme CSS for MFEs

Introduces `useAppTheme` in `AppProvider` to load/inject `<link>` elements for the core theme CSS and any theme variant CSS into the HTML document. Exposes the app theme state and a way to mutate it to consumers via `AppContext`.

fix: handle missing theme config

fix: add env vars to env files

fix: remove unused code

chore: wip commit

fix: prefer runtime config for paragon theme

fix: rebase on master and resolve package conflicts

fix: revert to original webpack.dev.config config

chore: clean up unnecessary comment line

fix: grammar

Co-authored-by: Adolfo R. Brandes <[email protected]>
chore: refresh package-lock.json to lockfileVersion 3

fix: clean up link nodes in document head when no longer needed

fix: fallback to locally installed core and light theme css urls

docs: update to docs

chore: update docs about

fix: expose setThemeVariant
fix: rebase with master and update based on PARAGON changes

chore: remove support for env vars config for paragon dynamic theming
fix: updates

fix: one more update

fix: refresh package-lock.json

fix: refresh package-lock.json pt2

fix: updates

fix: update package-lock.json

fix: make it theme variant agnostic

docs: update howto theming guide

fix: ensure app loads without styles if the PARAGON_THEME_URLS and fallback urls all fail to load

fix: ensure fallback theme links are removed if they also error

docs: add link to mfe runtime config api adr

fix: don't attempt to load paragon css urls if PARAGON_THEME_URLS is absent
docs: fix code example

docs: add missing comma

docs: update how to
chore: update package-lock.json

chore: update package-lock.json take 2

chore: remove console.log statements

fix: ignore system preference change when theme variant set in localstorage

chore: add tests for updates to AppProvider

chore: update react-intl to pass peer dependencies after pinning all deps

chore: split hooks.js up into separate files and begin some related tests

test: add testing to useParagonTheme hooks (openedx#514)

* test: add testing to useParagonThemeCore
* test: add test to useThemeVariants hook
* fix: Paragon definition and remove onload mock
* test: change test message to be clear
@openedx-webhooks
Copy link

openedx-webhooks commented Jun 29, 2024

Thanks for the pull request, @PKulkoRaccoonGang!

What's next?

Please work through the following steps to get your changes ready for engineering review:

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

🔘 Update the status of your PR

Your PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate.

🔘 Let us know that your PR is ready for review:

Who will review my changes?

This repository is currently maintained by @openedx/committers-frontend. Tag them in a comment and let them know that your changes are ready for review.

Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jun 29, 2024
@PKulkoRaccoonGang PKulkoRaccoonGang marked this pull request as draft June 29, 2024 14:16
Copy link

codecov bot commented Jun 29, 2024

Codecov Report

Attention: Patch coverage is 83.90093% with 52 lines in your changes missing coverage. Please review.

Project coverage is 83.64%. Comparing base (bc9c233) to head (cb35089).
Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
src/react/hooks/paragon/useParagonThemeVariants.js 81.57% 19 Missing and 2 partials ⚠️
src/react/hooks/paragon/useParagonThemeCore.js 80.95% 15 Missing and 1 partial ⚠️
src/react/hooks/paragon/utils.js 78.78% 7 Missing ⚠️
src/react/hooks/paragon/useParagonTheme.js 84.37% 4 Missing and 1 partial ⚠️
src/react/reducers.js 84.61% 2 Missing ⚠️
src/react/hooks/paragon/useParagonThemeUrls.js 96.77% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #714      +/-   ##
==========================================
+ Coverage   83.41%   83.64%   +0.23%     
==========================================
  Files          40       48       +8     
  Lines        1073     1388     +315     
  Branches      197      290      +93     
==========================================
+ Hits          895     1161     +266     
- Misses        166      211      +45     
- Partials       12       16       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Jul 30, 2024
@mphilbrick211 mphilbrick211 removed the FC Relates to an Axim Funded Contribution project label Dec 9, 2024
@mphilbrick211
Copy link

Hi @PKulkoRaccoonGang - closing this for now. Can reopen if needed.

@mphilbrick211 mphilbrick211 added the closed inactivity PR was closed because the author abandoned it label Dec 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed inactivity PR was closed because the author abandoned it open-source-contribution PR author is not from Axim or 2U
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants