-
Notifications
You must be signed in to change notification settings - Fork 3k
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
RequestorStep.js: class to functional component refactor #27455
RequestorStep.js: class to functional component refactor #27455
Conversation
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.
Left comments.
} | ||
|
||
const RequestorStep = React.forwardRef(InnerRequestorStep); |
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 spreading to other components @mountiny, what format should we stick for the forwardRef
? In our codebase we use:
export default React.forwardRef((props, ref) => (
<RequestorStep
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
forwardedRef={ref}
/>
));
sometimes forwardedRef
is innerRef
But I wanna bring into a discussion this format proposed by @kacper-mikolajczak
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 think these are best in Slack where more people can weigh in
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.
Thread created to discuss this
Reviewer Checklist
Screenshots/VideosWebMacOS_Chrome.mp4Mobile Web - ChromeAndroid_Chrome.mp4Mobile Web - SafariiOS_Safari.mp4DesktopMacOS_Desktop.mp4iOSiOS_Native.mp4AndroidAndroid_Native.mp4 |
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
We did not find an internal engineer to review this PR, trying to assign a random engineer to #16247 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
@chiragsalian is assigned for a review here so I am going to leave that to him |
Hi @chiragsalian, could you please take a look? Thanks! |
Sorry i didn't get a chance to review this today. It's on my plate for tomorrow. |
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.
@chiragsalian LGTM |
Just going to merge this, thanks for the reviews! |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.75-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.75-12 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 1.3.76-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.76-6 🚀
|
Details
PR implements refactor from class to functional component of
RequestorStep.js
Fixed Issues
$ #16247
PROPOSAL: #16247 (comment)
Tests
Use Staging Server
inPreferences
inSettings
Settings
->Workspaces
Bank account
Personal Info
appearsOffline tests
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 methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
RequestorStep_web.mp4
Mobile Web - Chrome
RequestorStep_web_android.mov
Mobile Web - Safari
RequestorStep_web_ios.mov
Desktop
RequestorStep_desktop.mov
iOS
RequestorStep_ios.mov
Android