Conversation
|
@dukenv0307 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] |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
src/libs/UserUtils.ts
Outdated
| avatarSource.includes('images/avatars/avatar_') || | ||
| avatarSource.includes('images/avatars/default-avatar_') || | ||
| avatarSource.includes('images/avatars/user/default') || | ||
| avatarSource.includes('images/avatars/custom-avatars') || // F1 season avatars |
There was a problem hiding this comment.
should we add these to CONST?
There was a problem hiding this comment.
will do in refactor
grgia
left a comment
There was a problem hiding this comment.
code looking good, will manually test next
|
cc @dannymcclain @dubielzyk-expensify got an avatar adhoc for ya #73412 (comment) |
src/libs/UserUtils.ts
Outdated
| * @param avatarSource - the avatar source from user's personalDetails | ||
| */ | ||
| function isDefaultAvatar(avatarSource?: AvatarSource): avatarSource is string | undefined { | ||
| function isDefaultAvatar(avatarSource?: AvatarSource, originalFileName?: string): avatarSource is string | undefined { |
There was a problem hiding this comment.
Why do we need to update this function? If it's a custom avatar, it won't show in the attachment modal
Screen.Recording.2025-10-25.at.11.35.02.mov
There was a problem hiding this comment.
I think if we want to be consistent, we should not allow to see the avatar preview here at all if it's a default avatar.
cc @grgia what do you think ?
There was a problem hiding this comment.
But on the second thought, yeah this one is influencing quite a lot of places :(
I'll refactor to not touch it for now...
There was a problem hiding this comment.
I was thinking we could do this in the refactor issue, WDYT?
|
Custom avatar is not shown if we reset cache and restart. I think the RCA is also in Screen.Recording.2025-10-25.at.11.37.27.mov |
|
When user deletes photo, should we save photo and close RHP automatically? This is different from when user changes profile picture, they have to click save button to update profile picture and close RHP. Screen.Recording.2025-10-25.at.11.38.51.mov |
|
I think this is looking real good 👍 cc @dannymcclain for extra thoughts, but otherwise it looks good to me. Awesome job! |
|
@jmusial let me know when this is ready for the next build/review 😁 |
I think instead of closing the RHP, we should keep it open and select the very first default avatar. But I don't feel super duper strongly.
Feeling good to me too! 👍 |
|
@grgia I think you can run the build now Current state:Fixed:
Screen.Recording.2025-10-27.at.15.06.07.movFYI:There is a backend issue when saving avatar. Exists on Repro steps:
Reason:Backed return empty data when updating avatar. |
|
We can zoom in and out on custom avatars, but not on default avatars. Should we fix it here? Screen.Recording.2025-10-27.at.23.25.11.mov |
Yeah that make sense to me. I guess we don't really close the RHP automatically in other places. |
grgia
left a comment
There was a problem hiding this comment.
@jmusial cc @dukenv0307
Anything outstanding that needs clarifying / fixing before we can get this to a final build for design?
I'd suggest aligning it in the refactor. To clean this up requires touching |
|
🚧 @grgia has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
|
Tests LGTM, cc @dukenv0307 |
|
on it now |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-10-29.at.23.13.34.movAndroid: mWeb ChromeScreen.Recording.2025-10-29.at.23.08.41.moviOS: HybridAppScreen.Recording.2025-10-29.at.23.12.08.moviOS: mWeb SafariScreen.Recording.2025-10-29.at.23.06.50.movMacOS: Chrome / SafariScreen.Recording.2025-10-29.at.23.03.54.movMacOS: DesktopScreen.Recording.2025-10-29.at.23.14.05.mov |
|
✋ 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/grgia in version: 9.2.42-0 🚀
|
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.2.42-11 🚀
|


Explanation of Change
This PR cleans up the logic of upload / edit / preview button for new custom avatar.
Fixed Issues
$ #73124
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.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
Android: Native
0058.andorid.native.mov
Android: mWeb Chrome
0058.android.chrome.mov
iOS: Native
0058.ios.native.mov
iOS: mWeb Safari
0058.ios.safari.mov
MacOS: Chrome / Safari
0058.desktop.chrome.mov
MacOS: Desktop
0058.desktop.native.mov