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 2024-06-03] [$250] mWeb - Chat - In edit comment, changed skin tone is not applied #42058
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
Version Number: 1.4.73 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail:https://expensify.testrail.io/index.php?/tests/view/4554707 Issue reported by: Applause - Internal Team
@garrettmknight 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
// Avoid defining within component due to an existing Onyx bug
preferredSkinTone={preferredSkinTone}
And ReportActionItem use a memo to optimize the rendering, but we haven't consider the case for the preferred skin tone, so even after it's updated, the component never re-renders.
What changes do you think we should make in order to solve the problem?
Check for preferred skin tone in the memo. prevProps.preferredSkinTone === nextProps.preferredSkinTone &&.
What alternative solutions did you explore? (Optional)
Move the preferred skin tone onyx connection to edit composer component.
as pointed out by the comment, the reason we pass the preferred skin tone from ReportActionItem to edit composer is because it causes a crash because the app tries to focus on the edit composer but it's not rendered yet because delayed by withOnyx (ref). However, I can't reproduce it anymore, but to be safe, we can set an initial value to it just like what we already did or use useOnxy to be safer.
changed the title [-]mWeb - Chat - In edit comment, changed skin tone is not applied[/-][+][$250] mWeb - Chat - In edit comment, changed skin tone is not applied[/+]on May 13, 2024
changed the title [-][$250] mWeb - Chat - In edit comment, changed skin tone is not applied[/-][+][HOLD for payment 2024-06-03] [$250] mWeb - Chat - In edit comment, changed skin tone is not applied[/+]on May 27, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.75-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@s77rt] The PR that introduced the bug has been identified. Link to the PR:
[@s77rt] 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:
[@s77rt] 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:
[@s77rt] Determine if we should create a regression test for this bug.
[@s77rt] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@garrettmknight] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
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 May 13, 2024
Triggered auto assignment to @garrettmknight (
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.lanitochka17 commentedon May 13, 2024
@garrettmknight 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
lanitochka17 commentedon May 13, 2024
We think that this bug might be related to #vip-vsp
bernhardoj commentedon May 13, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
The preferred skin tone doesn't update in edit composer, but updates in main composer.
What is the root cause of that problem?
The preferred skin tone value is passed from the ReportActionItem to the composer.
App/src/pages/home/report/ReportActionItem.tsx
Lines 1021 to 1025 in 3bdb08d
App/src/pages/home/report/ReportActionItem.tsx
Lines 675 to 676 in 3bdb08d
And ReportActionItem use a memo to optimize the rendering, but we haven't consider the case for the preferred skin tone, so even after it's updated, the component never re-renders.
App/src/pages/home/report/ReportActionItem.tsx
Lines 1053 to 1087 in 3bdb08d
What changes do you think we should make in order to solve the problem?
Check for preferred skin tone in the memo.
prevProps.preferredSkinTone === nextProps.preferredSkinTone &&.What alternative solutions did you explore? (Optional)
Move the preferred skin tone onyx connection to edit composer component.
as pointed out by the comment, the reason we pass the preferred skin tone from ReportActionItem to edit composer is because it causes a crash because the app tries to focus on the edit composer but it's not rendered yet because delayed by withOnyx (ref). However, I can't reproduce it anymore, but to be safe, we can set an initial value to it just like what we already did or use useOnxy to be safer.
[-]mWeb - Chat - In edit comment, changed skin tone is not applied[/-][+][$250] mWeb - Chat - In edit comment, changed skin tone is not applied[/+]melvin-bot commentedon May 13, 2024
Job added to Upwork: https://www.upwork.com/jobs/~013cd26a26b248adb5
melvin-bot commentedon May 13, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (
External)9 remaining items
bernhardoj commentedon May 15, 2024
PR is ready
cc: @s77rt
[-][$250] mWeb - Chat - In edit comment, changed skin tone is not applied[/-][+][HOLD for payment 2024-06-03] [$250] mWeb - Chat - In edit comment, changed skin tone is not applied[/+]melvin-bot commentedon May 27, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon May 27, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.75-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-06-03. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 27, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
s77rt commentedon May 29, 2024
ReportActionItemto use hooks #18809ReportActionItemto use hooks #18809 (comment)Regression Test Proposal
:+1::+1:garrettmknight commentedon Jun 3, 2024
All paid up and QA'd, closing!