Closed lanitochka17 closed 3 weeks ago
Triggered auto assignment to @kevinksullivan (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.
@kevinksullivan 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
The use recovery code/use 2fa code blinks when pressing it.
The text button for use recovery code/2fa code use the same Pressable. We just conditionally render the text depends on whether we want to use recovery/2fa code. https://github.com/Expensify/App/blob/9affb1384815fa8155fe23c523127c1e72b1120d/src/pages/signin/ValidateCodeForm/BaseValidateCodeForm.tsx#L347-L357
So, when we press the text button, the press dim is applied, which reduces the opacity to 0.2 and because it uses the same Pressable, the dim affects the 2nd text too. For example, if the text is initially Use recovery code, when we press it, the text is switched to Use 2FA code and the dim is applied briefly to Use 2FA code too, so it looks like the text is blinking. The 0.2 opacity makes the "blink" obvious.
We can remove the 0.2 dim value and just let it use the default value (0.8), just like the Go back text button but I don't think it solves the root cause.
So, to solve the root cause, we can set a key to the pressable so a new instance of pressable is created every time we switch between codes.
We can use the boolean value (and convert it to string) as the key or use the text itself or any other value.
key={isUsingRecoveryCode}
key={isUsingRecoveryCode ? translate('recoveryCodeForm.use2fa') : translate('recoveryCodeForm.useRecoveryCode')}
@bernhardoj Your proposal will be dismissed because you did not follow the proposal template.
@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
@kevinksullivan Eep! 4 days overdue now. Issues have feelings too...
Job added to Upwork: https://www.upwork.com/jobs/~021834200655136685716
Triggered auto assignment to Contributor-plus team member for initial proposal review - @brunovjk (External
)
Looping in another BZ as I am going OOO
Triggered auto assignment to @VictoriaExpensify (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.
I will review the proposals once I am done with another PR.
Reviewing.
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
@lanitochka17 Is this issue only reproducible on Android? I couldn’t reproduce it on any platform. @bernhardoj Were you able to reproduce this without any issues? Thanks!
Yes, you can see that when the text switches, the text dims.
https://github.com/user-attachments/assets/17b0f1f3-d6e6-4316-a3d6-6e16cc916e06
@kevinksullivan @VictoriaExpensify @brunovjk this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@bernhardoj is this blinking?
https://github.com/user-attachments/assets/74d3e740-4894-4684-8da5-be025c96a2a2
Judging by the archive history, it doesn't seem like a regression to me, it's been like that for a long time.
I believe that here we can just remove pressDimmingValue={0.2}
and leave as Go back
, mentioned in your proposal.
https://github.com/user-attachments/assets/cdf2e88c-6fe3-416c-b762-4692537d1d8b
What do you mean by "I don't think it solves the root cause."? Thank you :D
is this blinking?
not really.
I think it's reproducible when the app is a bit lagging. When you press the text, the dims effect is applied to the switched text, so it looks like its blinking.
Use recovery code Press Switched to Use 2FA code Dims applied to Use 2FA code
So, reducing the dims doesn't solve the issue. We need to prevent the dim effect to be applied to the switched text.
Hey @bernhardoj, I tested the changes and noticed only a small improvement with the key
addition, maybe because my emulator isn’t lagging now.
Without key
:
https://github.com/user-attachments/assets/89d48875-3dfa-4dbf-a0d9-7080d008d90d
With key
:
https://github.com/user-attachments/assets/7f4b2116-daa5-4dd1-a4a6-024af4a27caf
Before proceeding, I’ll ask an internal to confirm whether we should remove pressDimmingValue={0.2}
here for consistency.
With key
and without pressDimmingValue={0.2}
:
https://github.com/user-attachments/assets/20e450c1-6a9b-4b8c-8aaf-88b05e3c27af
Once confirmed, we can move forward with your proposal and test thoroughly. Thanks for your work!
🎀👀🎀 C+ reviewed
Triggered auto assignment to @NikkiWines, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Hey @NikkiWines, could you please check my previous comment and confirm if we should remove pressDimmingValue={0.2}
here for consistency? Let me know if anything needs clarification!
Thanks!
Removing the dimming value sounds right to me 👍
Removing the dimming value sounds right to me 👍
Great, so we can go with @bernhardoj's proposal :D
Yep! @bernhardoj proposal looks good 👍
📣 @brunovjk 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
PR is ready
cc: @brunovjk
Regression Test Proposal:
Prerequisite: 2FA is enabled; Plataform: Android native.
Do we agree 👍 or 👎?
cc: @VictoriaExpensify
Payment summary: Contributor: @bernhardoj owed $250 via NewDot Contributor+: @brunovjk paid $250 via Upwork
Thanks for your work on this!
Requested in ND.
$250 approved for @bernhardoj
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.30-2 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 Email or phone of affected tester (no customers): applausetester+gm103086@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
User have 2-FA established
Expected Result:
"Use two-factor authentication code" and "Use recovery codes" options should not blink
Actual Result:
Options "Use two-factor authentication code" and "Use recovery codes" blinks
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/user-attachments/assets/021b2145-e566-4a6c-915b-352e07864c0f
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @brunovjk