-
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
Migrate Avatar.js
to use functional component
#17217
Migrate Avatar.js
to use functional component
#17217
Conversation
this.setState({imageError: false}); | ||
} | ||
setImageError(false); | ||
}, [props.network.isOffline]); |
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.
Started a conversation around whether or not imageError
should be included in the dep array in the open-source channel here: https://expensify.slack.com/archives/C01GTK53T8Q/p1681117333835879
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 comment to explain why imageError
shouldn't be a dependency in running side effects.
81db650
to
420c6c2
Compare
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!
Reviewer Checklist
Screenshots/VideosWebScreen.Recording.2023-04-12.at.4.08.04.PM.movAndroid |
My android emulator doesn't want to work anymore 😭 @marcaaron Could you test on Android? I've tested all other platforms. |
Taking a look now! I am having some Android issues too today so we'll see how it goes 🙃 😫 |
✋ 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/marcaaron in version: 1.3.0-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.3.0-2 🚀
|
Details
Migrated the Avatar component from class based to function based.
Fixed Issues
$ GH_LINK
PROPOSAL: N/A
Tests
Offline tests
Same as above
QA Steps
Same as tests step.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
Screen.Recording.2023-04-11.at.7.13.14.PM.mov
Mobile Web - Chrome
Screen.Recording.2023-04-11.at.6.52.29.PM.mov
Mobile Web - Safari
Screen.Recording.2023-04-11.at.7.04.28.PM.mov
Desktop
Screen.Recording.2023-04-11.at.6.48.17.PM.mov
iOS
Screen.Recording.2023-04-11.at.7.01.35.PM.mov
Android
Screen.Recording.2023-04-11.at.6.50.30.PM.mov