-
Notifications
You must be signed in to change notification settings - Fork 9
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
Merge main (v1.5.0) into storybook-site #430
Merged
nmanu1
merged 18 commits into
storybook-site
from
dev/merge-main-v1.5.0-into-storybook-site
Feb 27, 2024
Merged
Merge main (v1.5.0) into storybook-site #430
nmanu1
merged 18 commits into
storybook-site
from
dev/merge-main-v1.5.0-into-storybook-site
Feb 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge main (v1.4.0) into develop
Merge main (v1.4.1) into develop
expose a callback prop to be called everytime after input changes in the FilterSearch component. This enables greater customization for our Locators that are built using FilterSearch primarily J=BACK-2765 TEST=manual
…havior, add documentation specify a type for the props passed into onDropdownInputSelect and pass back the searchFields used in the FilterSearch component so we can properly remove/keep the right filters J=BACK-2765 TEST=manual
…pdownInputChange is specified ensure executeFilterSearch is not called in test when onDropdownInputChange is supplied J=BACK-2765 TEST=manual
J=BACK-2765 TEST=manual
…o args move executeFilterSearch check to be outside a callback J=BACK-2765 TEST=manual
This PR addresses the following vulnerabilities under test-site: bump webpack version to 5.90.0 remove real live api key J=VULN-37163,VULN-38428 TEST=auto Ran npm run test. Spun up the test site and confirmed the pages are working.
The following changes were made to support React 18: - Updated `react` and `react-dom` dev dependency versions from 17.0.2 to 18.2.0 - Updated peer dependencies to allow React 18 - Updated `react-collapsed` from v3.6.0 to v4.1.2 which supports React 18 - Copied `@reach/auto-id`'s `useId` hook with minor modifications from https://github.com/reach/reach-ui/blob/dev/packages/auto-id/src/reach-auto-id.ts. Because the peer dependencies of that library don't allow React 18, we weren't able to install it directly anymore. This `useId` hook uses React 18's `useId` hook if it's present and otherwise falls back to custom logic for React 16 and 17. - Added a new `renderPin` prop to `MapboxMap` to allows React 18 users to render custom JSX into the DOM node for the marker element. This gets around the issue of having to call `createRoot` from `react-dom/client` in `MapboxMap`. This was causing issues on React 16/17 sites because Vite and Webpack were unable to determine that the dynamic import of `react-dom/client` wouldn't be reachable, and tried to resolve the package unsuccessfully. Rather than force existing consumers of the repo to update their bundler config to exclude `react-dom/client`, we provide this optional prop to React 18 users if they want to use React 18 features in their custom pin component, or if they don't want to get the console warning about using `ReactDOM.render` if they use the `PinComponent` prop. To support testing in React 18: - We are now fetching TextEncoder from utils when setting up the test environment because the new react-dom does not have it - `@testing-library/react-hooks` doesn't support React 18 and it's functionality has now been added to `@testing-library/react` in v14. Because of this, `@testing-library/react` was upgraded to v14.2.1, which only supports React 18, and `@testing-library/react-hooks` was removed from the dev dependencies. The GitHub workflow for testing React 16 and 17 was updated to manually downgrade `@testing-library/react` to v12 and install `@testing-library/react-hooks`. Custom logic is added so that if `@testing-library/react-hooks` is installed, it's `renderHook` method is used (i.e. React 16/17), and otherwise the `renderHook` method from `@testing-library/react` is used (React 18). J=BACK-2911, BACK-2923 TEST=auto, manual Updated the test-site to use the new React 18 app initialization and tested all updated components manually to ensure they're not broken. Did a local npm pack of the repo and successfully used it in Pages repos with React 17 and 18. Some updates were also made to clean up our tests: - Upgraded `@testing-library/user-event` from v13.5.0 to v14.5.2, which makes async calls, so we no longer need `waitFor`. As part of this change, we started getting some new console errors when trying to navigate in tests by clicking links. This is because navigation is not defined in the jest jsdom environment. A util function was added to mock the console to remove these errors. - Updated the GitHub test workflow for React 16 and 17 to manually install optional swc libraries because the post install script doesn't seem to run properly after we install specific versions of react-related packages. More info at swc-project/swc#5616 (comment) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Nidhi Manu <[email protected]>
*An automated PR which updates the version number in package.json and package-lock.json files* --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Nidhi Manu <[email protected]>
Current unit coverage is 92.69746646795826% |
jesuyedavid
approved these changes
Feb 27, 2024
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.
lgtm
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Since
@storybook/addon-google-analytics
doesn't support React 18, the Storybook site will have to stay on React 17. Updated the testing GH workflow and the test-site to reflect that this branch is using React 17 by default. Tracked the dev branch in Storm and checked that the Storybook site renders correctly and includes the newonDropdownInputChange
prop forFilterSearch
.