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

[ST-6228] [BpkSlider] Pin react-slider to version that still supports React 17 #3725

Merged
merged 1 commit into from
Jan 21, 2025

Conversation

dominicfraser
Copy link
Contributor

@dominicfraser dominicfraser commented Jan 21, 2025

react-slider currently errors when being used alongside Webpack and React 17.

Module not found: Error: Can't resolve 'react/jsx-runtime' in '.../banana/packages/webapp/node_modules/@radix-ui/react-slider/dist'
Did you mean 'jsx-runtime.js'?
BREAKING CHANGE: The request 'react/jsx-runtime' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.

This is not fixed until React 18. At this point we still need to support React 17.

facebook/react#20235 (comment)

This PR reverts to an exact version that still supports React 17.

It also pins to exactly that version, via npm i --registry=https://registry.npmjs.org/ @radix-ui/[email protected] --save-exact preventing NPM silently updating the minor version when consumers do an install.


Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [KOA-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Accessibility tests
    • The following checks were performed:
      • Ability to navigate using a keyboard only
      • Zoom functionality (Deque University explanation):
        • The page SHOULD be functional AND readable when only the text is magnified to 200% of its initial size
        • Pages must reflow as zoom increases up to 400% so that content continues to be presented in only one column i.e. Content MUST NOT require scrolling in two directions (both vertically and horizontally)
      • Ability to navigate using a screen reader only
  • Storybook examples created/updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here

@dominicfraser dominicfraser added the patch Patch production bug label Jan 21, 2025
Copy link

Visit https://backpack.github.io/storybook-prs/3725 to see this build running in a browser.

@dominicfraser dominicfraser marked this pull request as ready for review January 21, 2025 11:01
Copy link
Contributor

@metalix2 metalix2 left a comment

Choose a reason for hiding this comment

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

Looks good!

@metalix2 metalix2 merged commit ad33557 into main Jan 21, 2025
10 checks passed
@metalix2 metalix2 deleted the ST-6228_slider branch January 21, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Patch production bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants