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

Update v23 with React 18 + Gatsby 5 support from v22 branch #3395

Open
wants to merge 9 commits into
base: release-23.x
Choose a base branch
from

Conversation

bradenmacdonald
Copy link
Contributor

@bradenmacdonald bradenmacdonald commented Jan 23, 2025

This PR merges the changes from #3367 into our v23 branch, as a single merge commit. There were quite a few conflicts, mostly in .scss files, but I resolved them by just replacing the SCSS changes with a new run of sass-migrator and stylelint --fix, which is how the v22 SCSS changes were made.

Deploy preview: https://deploy-preview-3395--paragon-openedx-v23.netlify.app/
Compare to: https://paragon-openedx-v23.netlify.app/ to avoid layout/visual differences caused by the search feature that on the "main" docs site.

Includes:
* misc gatsby GraphQL syntax updates
* fix markdown syntax issues ('<' and '{' now require escaping)
* convert gatsby-config to ESM
* add 'rehype-mdx-code-props' plugin to get live code blocks working
* fix: "Do not define components during render" warning caused by PropsTable component that's only used in one place (duplicate props tables from "data view" page). Fixed by removing the duplicate tables.
* set Content-Security-Policy header so playground works again
* used sass-migrator to auto-fix use of deprecated global functions like mix(), map-merge()
* used sass-migrator to auto-fix things like @media query syntax
* suppress other SASS deprecation warnings that we cannot fix at this time
* update stylelint rules
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Jan 23, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @bradenmacdonald!

This repository is currently maintained by @openedx/paragon-working-group.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are 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.


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.

Copy link

netlify bot commented Jan 23, 2025

Deploy Preview for paragon-openedx-v23 ready!

Name Link
🔨 Latest commit b17d3ae
🔍 Latest deploy log https://app.netlify.com/sites/paragon-openedx-v23/deploys/67928e4bcef7e4000840d847
😎 Deploy Preview https://deploy-preview-3395--paragon-openedx-v23.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.91%. Comparing base (2117eb6) to head (b17d3ae).

Additional details and impacted files
@@               Coverage Diff                @@
##           release-23.x    #3395      +/-   ##
================================================
+ Coverage         93.88%   93.91%   +0.02%     
================================================
  Files               232      232              
  Lines              3943     3943              
  Branches            933      901      -32     
================================================
+ Hits               3702     3703       +1     
+ Misses              237      236       -1     
  Partials              4        4              

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

@brian-smith-tcril
Copy link
Contributor

To add context to the icon changes: the browserslist config changes landed in master via #3284, and the commits from that made it into alpha via #3340

It seems the way conflicts were resolved in there didn't keep the browserslist config changes, and I instead made CI happy by regenerating icons (8662f3f)

This PR fixes that incorrect resolution from before alpha turned into release-23.x and master turned into release-22.x.

Making that a separate PR and landing it before this merge was discussed, but that would require re-doing the merge after that PR landed. The browserslist/icon changes are isolated to a single commit on this PR and will remain in history that way.

@bradenmacdonald
Copy link
Contributor Author

This PR seems to cut the "build docs" time on CI from ~4 min to ~2 min :)

@brian-smith-tcril
Copy link
Contributor

For anyone trying to review this,

The "Files Changed" tab was freezing/crashing my browser tab, but the GitHub Pull Requests VSCode Extension handles this without problems.

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.

All the code changes LGTM! I'm going to click around the docs site a bit and then drop a ✔️

Copy link
Contributor

Choose a reason for hiding this comment

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

useArrowKeyNavigationHook, useIndexOfLastVisibleChildHook, and useToggleHook all have variations of

// Note: this file was renamed from 'useIndexOfLastVisibleChild.tsx' to 'useIndexOfLastVisibleChildHook.tsx' to fix
// some bugs in the Gatsby www site, where Webpack was getting the .tsx and .mdx
// files confused. Renaming this file allows us to keep the URLs of the docs site
// unchanged.

at the top of the files. This file (useIsVisibleHook) and useWindowSizeHook were also renamed but do not have those.

Not a blocker - just noting as something that'd be good to make consistent in release-22.x.

Copy link
Contributor

Choose a reason for hiding this comment

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

Made an issue for this one #3396

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.

Everything seems to be working as expected on the docs site!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Status: Needs Triage
Development

Successfully merging this pull request may close these issues.

3 participants