Open lanitochka17 opened 1 week ago
Triggered auto assignment to @miljakljajic (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
@miljakljajic FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
We think that this bug might be related to #wave-collect - Release 1
The fallback avatar is clickable and leads to not here page
In offline mode, we can't call successfully openPublicProfilePage
and can't get avatarURL
in
https://github.com/Expensify/App/blob/f73cdc44664566f9f2012cc9f7b34769391049e3/src/pages/settings/Profile/ProfileAvatar.tsx#L48
In the function openPublicProfilePage
we can set avatarUrl
to the default avatar when its call fails
We'll not allow user to navigate to the avatar page when it don't have data and in offline mode NA
Workspace - Fallback avatar in workspace chat is clickable and leads to not here page
In the navigateToAvatarPage function, we haven't included logic to prevent the user from navigating to the avatar page if the avatar is default
In the ProfileAvatar component, we currently have logic to display a "not found" page if we cannot find personalDetail matching the accountID prop. We should implement the same logic in the navigateToAvatarPage function
We need to verify whether we can find a personalDetail that matches the icon.id. If we can find a match, then we'll allow the user to navigate to the avatar page.
Even though, we can display the disable pointer when the user hovers over the default avatar
On the Header page, we also disable the header view, including interactions with the avatar. https://github.com/Expensify/App/blob/ec196638296045a64ced8baed6e4ba358c70f902/src/pages/home/HeaderView.tsx#L175-L180 Here, we use the function isOptimisticPersonalDetail. https://github.com/Expensify/App/blob/ec196638296045a64ced8baed6e4ba358c70f902/src/libs/ReportUtils.ts#L1133
I recommend that we do the same in RoomHeaderAvatars (there are two places that need to apply the disabled props)
disabled={ReportUtils.isOptimisticPersonalDetail(icon.id)}
Note that icon.id refers to accountID as defined
Workspace - Fallback avatar in workspace chat is clickable and leads to not here page
Whe navigating to avatar page here, we do not check if the avatar is the default Fallback avatar.
We should disable navigating if the avatar is the fallback avatar.
We should have a check that disables clicking on the avatar here and here when it is the fallback avatar: https://github.com/Expensify/App/blob/f73cdc44664566f9f2012cc9f7b34769391049e3/src/components/RoomHeaderAvatars.tsx#L39-L44
disabled={icon.source === Expensicons.FallbackAvatar}
https://github.com/Expensify/App/assets/64629613/347e51ea-1423-4649-a41d-5467782f536a
@miljakljajic Huh... This is 4 days overdue. Who can take care of this?
Job added to Upwork: https://www.upwork.com/jobs/~0189b738ae283ab8e4
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (External
)
@cretadn22 thanks for the proposal. I think it's better to disable press event (than pressable + no action) when we know that it will lead to not found page. The app performance is concerned here?
@neonbhai thanks for the proposal. Can you confirm that
@aimane-chnaif
Updated proposal: Adding an alternative solution
On the Header page, we also disable the header view, including interactions with the avatar. https://github.com/Expensify/App/blob/ec196638296045a64ced8baed6e4ba358c70f902/src/pages/home/HeaderView.tsx#L175-L180 Here, we use the function isOptimisticPersonalDetail. https://github.com/Expensify/App/blob/ec196638296045a64ced8baed6e4ba358c70f902/src/libs/ReportUtils.ts#L1133
I recommend that we do the same in RoomHeaderAvatars (there are two places that need to apply the disabled props)
disabled={ReportUtils.isOptimisticPersonalDetail(icon.id)}
Note that icon.id refers to accountID as defined
if icon.source is Expensicons.FallbackAvatar, it always leads to not found page?
Confirmed! Shows not found in all contexts (1:1, group chats and workspace rooms)
there's no other case of showing not found page?
Confirmed, unable to find other case where the avatar leads to not found page
cc: @aimane-chnaif
@miljakljajic, @aimane-chnaif Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
reviewing updated proposal
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.4-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
The fallback avatar should not be clickable
Actual Result:
The fallback avatar is clickable and leads to not here page
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/78819774/3ae651c8-420d-49cf-832e-6b279ba781bb
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @aimane-chnaif