-
Notifications
You must be signed in to change notification settings - Fork 3.5k
migrate FloatingActionButtonAndPopover to function component #21851
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
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. :)
|
|
||
| /** 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 |
NikkiWines
left a comment
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. :) |
NikkiWines
left a comment
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? |
NikkiWines
left a comment
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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