-
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
[TS migration] Migrate 'AvatarWithIndicator.js' component to TypeScript #30328
[TS migration] Migrate 'AvatarWithIndicator.js' component to TypeScript #30328
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.
lgtm 😄
@robertKozik 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] |
Hi @fabioh8010 could you resolve conflicts? |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.native.movAndroid: mWeb Chromeandroid.web.moviOS: Nativeios.native.moviOS: mWeb Safariios.web.movMacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@fabioh8010 bump on resolve conficts |
…mponent/AvatarWithIndicator
Hi @robertKozik Fabio is OOO, I took over and conflicts are resolved now 😄 |
We did not find an internal engineer to review this PR, trying to assign a random engineer to #25034 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
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.
One main question about shouldRender={false}
I also have some NAB suggestions for improving comments in UserUtils
- since we renamed a lot of avatarURL
params to avatarSource
, we maaay want to also update the docs, basically changing the wording from "given a URL" to "given an avatar source" - but if this sounds too picky for everyone we can probably leave it 😬
<Tooltip text={props.tooltipText}> | ||
<Tooltip | ||
text={tooltipText} | ||
shouldRender={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.
Why do we even wrap everything in Tooltip if we're never going to render the Tooltip, just its children? Is this actually needed? If so, I think we should explain why
src/libs/UserUtils.ts
Outdated
return true; | ||
} | ||
} | ||
|
||
if (!avatarURL) { | ||
if (!avatarSource) { | ||
// If null URL, we should also use a default avatar |
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 - maaaybe we can update this comment to something like:
// If null URL, we should also use a default avatar | |
// If null source, we should also use a default avatar |
src/libs/UserUtils.ts
Outdated
* Provided a source URL, if source is a default avatar, return the associated SVG. | ||
* Otherwise, return the URL pointing to a user-uploaded avatar. |
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.
Just thinking - should we update these function docs since we are updating the first param to be a "source" instead of always a "URL"? For example, for this function I feel like it would be a bit clearer to say something like:
* Provided a source URL, if source is a default avatar, return the associated SVG. | |
* Otherwise, return the URL pointing to a user-uploaded avatar. | |
* Provided an avatar source, if source is a default avatar, return the associated SVG. | |
* Otherwise, return the URL or SVG pointing to the user-uploaded avatar. |
Bump @fabioh8010 - we also have some conflicts here |
@Beamanator sorry for the late, this one fell through the cracks! Everything updated now! |
No problem! Thanks @fabioh8010 ! @robertKozik can you please review again on all platforms before we merge? 🙏 |
Sure! I'm on it 👀 |
Thanks! 🙌 |
@fabioh8010 @Beamanator all works well 👌🏼 |
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
✋ 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/Beamanator in version: 1.4.7-0 🚀
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 1.4.7-4 🚀
|
Details
Fixed Issues
$ #25034
PROPOSAL: N/A
Tests
Offline tests
Same as above.
QA Steps
Same as above.
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
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
Android: Native
Screen.Recording.2023-10-25.at.05.25.36.mov
Android: mWeb Chrome
Screen.Recording.2023-10-25.at.05.26.40.mov
iOS: Native
Screen.Recording.2023-10-25.at.05.34.26.mov
iOS: mWeb Safari
Screen.Recording.2023-10-25.at.05.34.52.mov
MacOS: Chrome / Safari
Screen.Recording.2023-10-25.at.05.35.49.mov
Screen.Recording.2023-10-25.at.05.36.03.mov
MacOS: Desktop
Screen.Recording.2023-10-25.at.05.36.17.mov