-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
fix(38312): Update dependencies as indicated by Snyk #39372
Conversation
@cristipaval Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
Hold off a sec. I think I forgot to update storybook dependency. |
"@babel/plugin-proposal-private-methods": "^7.18.6", | ||
"@babel/plugin-proposal-private-property-in-object": "^7.21.11", |
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.
These were required for our jest test and existed as a peer dependency of storybook v6. Since the latest version does not contain this, I added them explicitly as a dependency.
Ready now @yuwenmemon |
Given the changes, I think it would be helpful for a C+ to help with the testing. The changes are mostly related to types. |
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
Hey, I noticed you changed some webpack configuration files. This can break production builds. Did you remember to run a production build locally to verify they still work? |
title: 'Components/Form', | ||
component: FormProvider, | ||
subcomponents: { | ||
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error |
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.
This is not a blocker or anything, just wondering why we need this.
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.
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.
Hehe yes, but why is the type wrong? Or is this expected somehow?
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.
|
||
const main: Main = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', '@storybook/addon-react-native-web'], |
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.
Would you like to share your consideration to remove this addon @storybook/addon-react-native-web
? Is it because there's no entry command in package.json
to run storybook on native platforms (no usage on native platforms) ?
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.
That's correct. I wasn't able to find this being used anywhere.
@@ -13,6 +13,7 @@ const theme: ThemeVars = create({ | |||
colorPrimary: colors.productDark400, | |||
colorSecondary: colors.green, | |||
appContentBg: colors.productDark100, | |||
appPreviewBg: colors.productDark100, |
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.
When I build production storybook via npm run storybook-build
and then cd to ./dist/docs
and run npx serve
to access the storybook, the No Preview
message in the home page is not easy to read
The empty preview page looks like below if this is removed
But I agree with this style added, the preview looks prettier
Default background | Background productDark100 |
---|---|
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.
I found that the dev cmd storybook dev
automatically redirects to preview the first component. Maybe we can omit this if the production endpoint of storybook is also able to auto redirect to a preview of a component.
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.
Hmm, I found that there's an option to change the background color of the preview area. So, I'm inclined not to incorporate this style.
Screen.Recording.2024-04-02.at.5.52.01.PM.mov
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.
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.
@allroundexperts Oh, yes, npx http-server
works well!
@allroundexperts Friendly bump. And there're conflicts need to be resolved. |
@allroundexperts Another friendly bump here! |
Added. |
title: 'Components/Form', | ||
component: FormProvider, | ||
subcomponents: { | ||
// @ts-expect-error Subcomponent passes props with unknown type causing a TS error |
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.
@pecanoro This same error exists on main as well. I don't think this has to do with the version update. We can fix it in a follow up PR if you'd like. |
@allroundexperts There're conflicts need to be resolved. |
Ugh damn, I was waiting for the tests to finish running and I didn't merge, now we have conflicts, I am sorry! |
No worries. Resolved the conflicts! |
All tests passing. @pecanoro Good to merge! |
Tested again and it seems to be working! Merging since @yuwenmemon is OOO for the whole week and we don't want more conflicts! Thank you everyone! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.4.62-0 🚀
|
1 similar comment
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.4.62-0 🚀
|
🚀 Deployed to staging by https://github.com/pecanoro in version: 1.4.62-0 🚀
|
I'm not sure if this is related or not, but the test steps failed when QA can't access https://staging.new.expensify.com/docs/index.html @eh2077 @allroundexperts @pecanoro please could you take a look and see if you think of a fix for the deploy blocker issue |
Checking this now @Julesssss |
@Julesssss Is the deploy blocker link you shared is correct? |
@Julesssss Did you check if it was related to the deploy process? Since it's working locally, maybe it's related to that as @allroundexperts suggested |
"storybook-build-staging": "ENV=staging build-storybook -o dist/docs", | ||
"storybook": "storybook dev -p 6006", | ||
"storybook-build": "ENV=production storybook build -o dist/docs", | ||
"storybook-build-staging": "ENV=staging storybook build -o dist/docs", |
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.
Did you try building it to see if this is what caused the storybook not to load?
@allroundexperts By the way, those console errors are also in production so it must be something else |
🚀 Deployed to production by https://github.com/thienlnam in version: 1.4.62-17 🚀
|
It seems like this was unrelated. We struggled to reproduce and the issue was closed before the recent deploy 👍 |
Details
The original PR (created by Snyk automatically) had conflicts. As such, raising a new PR with those changes.
Fixed Issues
$ #38311
$ https://github.com/Expensify/Expensify/issues/366633
$ https://github.com/Expensify/Expensify/issues/366623
PROPOSAL: N/A
Tests
npm install
npm run storybook
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop