You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-10-09] [$500] Android - LHN - Long pressing on stacked avatars results in transparency issue with avatars #27396
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Precondition: User has a workspace IOU and a thread in room
Launch New Expensify app
Long press on workspace IOU row in LHN
Long press on the message thread row in LHN
Expected Result:
There is no visual issues with the avatars
Actual Result:
When long pressing on workspace IOU row in LHN, a circular overlay is seen instead of square overlay over the workspace avatar.
As for the message thread, the user avatar overlaps with workspace avatar
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.69-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from TestRail:
changed the title [-]Android - LHN - Long pressing on stacked avatars results in transparency issue with avatars[/-][+][$500] Android - LHN - Long pressing on stacked avatars results in transparency issue with avatars[/+]on Sep 14, 2023
Please re-state the problem that we are trying to solve in this issue.
Long-pressing the LHN item will make the second avatar transparent. This happens on the search page too.
What is the root cause of that problem?
Each item in the list uses PressableWithFeedback which has a default pressDimmingValue of 0.8. Holding down the item will reduce the opacity to 0.8. On Android, having components stacked on top of each other with reduced opacity will not render it correctly. This is the same issue as this one which I explained the issue here or this one.
What changes do you think we should make in order to solve the problem?
The solution is to use needsOffscreenAlphaCompositing on the component that has the opacity applied, which is OpacityView in this case.
Details:
We will apply this to both PressableWithSecondaryInteraction of OptionRowLHN and PressableWithFeedback of OptionRow. The needsOffscreenAlphaCompositing will be true only if the icon's length is >= 2.
PressableWithSecondaryInteraction uses PressableWithFeedback internally, so we will pass over the needsOffscreenAlphaCompositing props to PressableWithFeedback.
In PressableWithFeedback, we will pass the needsOffscreenAlphaCompositing props to OpacityView, and in OpacityView, pass the needsOffscreenAlphaCompositing props to Animated.View with the added condition of && shouldRenderOffscreen like we do in OfflineWithFeedback.
The PR that introduced the bug has been identified. Link to the PR - current PR was fixing missing functionality and second one already fix regression from initial one
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment - N/A
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion - N/A
Determine if we should create a regression test for this bug - N/A
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
melvin-bot commentedon Sep 14, 2023
Triggered auto assignment to @laurenreidexpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 14, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)[-]Android - LHN - Long pressing on stacked avatars results in transparency issue with avatars[/-][+][$500] Android - LHN - Long pressing on stacked avatars results in transparency issue with avatars[/+]melvin-bot commentedon Sep 14, 2023
Job added to Upwork: https://www.upwork.com/jobs/~0181b4bbc15e998db5
melvin-bot commentedon Sep 14, 2023
Current assignee @laurenreidexpensify is eligible for the External assigner, not assigning anyone new.
melvin-bot commentedon Sep 14, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @narefyev91 (
External)bernhardoj commentedon Sep 14, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
Long-pressing the LHN item will make the second avatar transparent. This happens on the search page too.
What is the root cause of that problem?
Each item in the list uses PressableWithFeedback which has a default
pressDimmingValueof 0.8. Holding down the item will reduce the opacity to 0.8. On Android, having components stacked on top of each other with reduced opacity will not render it correctly. This is the same issue as this one which I explained the issue here or this one.What changes do you think we should make in order to solve the problem?
The solution is to use
needsOffscreenAlphaCompositingon the component that has the opacity applied, which is OpacityView in this case.Details:
We will apply this to both
PressableWithSecondaryInteractionofOptionRowLHNandPressableWithFeedbackofOptionRow. TheneedsOffscreenAlphaCompositingwill be true only if the icon's length is >= 2.PressableWithSecondaryInteractionusesPressableWithFeedbackinternally, so we will pass over theneedsOffscreenAlphaCompositingprops toPressableWithFeedback.In
PressableWithFeedback, we will pass theneedsOffscreenAlphaCompositingprops toOpacityView, and inOpacityView, pass theneedsOffscreenAlphaCompositingprops toAnimated.Viewwith the added condition of&& shouldRenderOffscreenlike we do inOfflineWithFeedback.App/src/components/OfflineWithFeedback.js
Line 117 in 95c9e47
narefyev91 commentedon Sep 15, 2023
Proposal from @bernhardoj looks good to me #27396 (comment) thanks for detail explanation!
🎀 👀 🎀 C+ reviewed
35 remaining items
laurenreidexpensify commentedon Oct 13, 2023
Bump for checklist @narefyev91
MonilBhavsar commentedon Oct 13, 2023
@laurenreidexpensify contributor that fixed the issue should be @bernhardoj ?
situchan commentedon Oct 13, 2023
There was regression - #28317
narefyev91 commentedon Oct 16, 2023
laurenreidexpensify commentedon Oct 16, 2023
@MonilBhavsar sorry typo! corrected
MonilBhavsar commentedon Oct 18, 2023
Looks like we're good to close this issue?
laurenreidexpensify commentedon Oct 18, 2023
@MonilBhavsar - can you confirm is this is correct - #28317
if no regression feel free to close
MonilBhavsar commentedon Oct 18, 2023
@laurenreidexpensify yes, there was a regression coming from this PR which was fixed by @bernhardoj