-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
migrate FloatingActionButtonAndPopover to function component #21851
migrate FloatingActionButtonAndPopover to function component #21851
Conversation
@abdulrahuman5196 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] |
CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
Starting to review now. |
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-07-10.at.2.37.48.PM.mp4Mobile Web - Chromeaz_recorder_20230710_155210.mp4Mobile Web - SafariUntitled.3.mp4DesktopScreen.Recording.2023-07-10.at.9.36.23.PM.mp4iOSScreen.Recording.2023-07-10.at.10.34.43.PM.mp4AndroidUntitled.mp4 |
@dayana7204 could you kindly fix the merge conflicts. Anyways I will do initial testing on the code change |
And @dayana7204 FloatingActionButtonAndPopover is not only limited to the above mentioned cases, It should auto open in case of new accounts. Have we tested the same? If so can we update the tests section |
@abdulrahuman5196 thanks for your review. |
Thank you @dayana7204 . Will continue review |
Checked code on high level. Seems fine to me. will test again in my morning and approve if no issues are found. |
@abdulrahuman5196 Could you please review? |
@@ -274,4 +286,12 @@ export default compose( | |||
key: ONYXKEYS.IS_LOADING_REPORT_DATA, |
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.
Looks like there is two withWindowDimensions
is used, one should be removed.
Coming from - https://expensify.slack.com/archives/C01GTK53T8Q/p1688970802542999
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.
Yes, I checked and removed the duplication. It was from the original class component.
Thank you for your kind review. :)
@@ -56,51 +57,29 @@ const propTypes = { | |||
|
|||
/** Indicated whether the report data is loading */ | |||
isLoading: PropTypes.bool, | |||
|
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.
@dayana7204 Kindly add comment for 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.
done. thank you :)
@dayana7204 I am good with the changes and completed the reviewer's checklist. Once you have added the comment as requested above, I can approve. |
…funcCompMigration-16273
@abdulrahuman5196 I've added a comment along with your request. |
C+ approved comment is here #21851 (review). All yours @NikkiWines |
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.
Couple very small comments but overall looks good
} | ||
|
||
setIsCreateMenuActive(true); | ||
|
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.
NAB: extra blank line
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.
removed extra blank line.
if (!props.isFocused && props.isSmallScreenWidth) { | ||
return; | ||
} | ||
|
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.
NAB: extra blank line
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.
removed extra blank line.
hideCreateMenu(); | ||
}, | ||
})); | ||
// Workspaces are policies with type === 'free' |
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.
Add a blank line above the comment please
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.
Added a blank line.
if (!props.isFocused && prevIsFocused) { | ||
return true; | ||
} | ||
|
||
return false; |
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.
if (!props.isFocused && prevIsFocused) { | |
return true; | |
} | |
return false; | |
return !props.isFocused && prevIsFocused; |
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.
Updated as your suggestion.
@NikkiWines Thank you for your kind review. :) |
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.
👍
…funcCompMigration-16273
@NikkiWines I fixed lint issue, could you please check and approve? |
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.
@dayana7204 looks like you've still got linter errors |
@NikkiWines fixed and pushed again. |
✋ 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/NikkiWines in version: 1.3.42-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.3.42-26 🚀
|
Details
Refactor FloatingActionButtonAndPopover.js to functional component
Fixed Issues
$ #16273
Tests
Offline tests
Same as Tests
QA Steps
Same as local tests
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
web-chrome.mov
web-safari.mov
Mobile Web - Chrome
mobile.web.chrome.mov
Mobile Web - Safari
mobile.web.safari.mov
Desktop
desktop.mov
iOS
iphone.mov
Android
android.mov