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-10-25] [$250] Room-Description with mentions shown in preview but after saved disappeared #49407
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
@greg-schroeder 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
changed the title [-]Room-Description with mentions shown in preview but after saved disappeared[/-][+][$250] Room-Description with mentions shown in preview but after saved disappeared[/+]on Sep 19, 2024
This is not a bug. If we mention a correct room the BE sets the description to the mention of that room and it is a correct clickable mention but if the BE doesn't get a room with that name it will consider it a normal text so the mention will disappear. In compose we have a option to deal with this case with a whisper message explaining that the room doesn't exist and ask if the user wants to create it but in this case I think it is unnecessary.
@greg-schroeder Can you confirm the expected behavior here? In the preview, should we always highlight the text #any-text, or we just highlight it if #any-text is the reportName of the existing report?
changed the title [-][$250] Room-Description with mentions shown in preview but after saved disappeared[/-][+][HOLD for payment 2024-10-25] [$250] Room-Description with mentions shown in preview but after saved disappeared[/+]on Oct 18, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.50-8 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:
[@rayane-djouah] The PR that introduced the bug has been identified. Link to the PR:
[@rayane-djouah] 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:
[@rayane-djouah] 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:
[@rayane-djouah] Determine if we should create a regression test for this bug.
[@rayane-djouah] 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.
[@greg-schroeder] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
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. Yes
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.
Regression Test Proposal
1. Open a room chat.
2. Tap the header > description.
3. Enter a description with a room mention (ensure that the mentioned room does not exist).
4. Click on "Save."
5. Verify that the room mention is not highlighted in the description preview.
6. Open a room chat again.
7. Tap the header > description.
8. Enter a description with a room mention (ensure that the mentioned room exists).
9. Verify that the room mention is highlighted in the description preview.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2
Activity
melvin-bot commentedon Sep 18, 2024
Triggered auto assignment to @greg-schroeder (
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.IuliiaHerets commentedon Sep 18, 2024
@greg-schroeder 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
truph01 commentedon Sep 19, 2024
Edited by proposal-police: This proposal was edited at 2024-09-19 17:04:09 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
When we save description
"#123xxx", we sent to BE"<mention-report>#123xxx</mention-report>"but BE returns"#123xxx"- a MD string.And
shouldParseTitleis not added in this:App/src/pages/ReportDetailsPage.tsx
Line 729 in 0c618ac
while the description returned by BE is a MD string.
What changes do you think we should make in order to solve the problem?
When display
"#123xxx"we should check if"123xxx"isreportNamedata of any report in the current policy. If yes, highlight that text.First, update:
App/src/pages/ReportDetailsPage.tsx
Line 729 in 0c618ac
App/src/pages/RoomDescriptionPage.tsx
Line 82 in ace39e8
with:
to make sure the
reportMentionsmarkdown is only applied if the current report belongs to policy.App/src/components/HTMLEngineProvider/HTMLRenderers/MentionReportRenderer/index.tsx
Line 89 in ace39e8
to:
What alternative solutions did you explore? (Optional)
See
Fix the description preview
MenuItemWithTopDescriptionto:+ const mentionReportContextValue = useMemo(() => ({currentReportID: report.reportID}), [report.reportID]);Fix the description's form
Next, we need to fix the
RoomDescriptionPageso that it will send the markdown data to BE instead of HTML.First, update:
App/src/pages/RoomDescriptionPage.tsx
Line 36 in 0c618ac
App/src/libs/actions/Report.ts
Line 2053 in 0c618ac
[-]Room-Description with mentions shown in preview but after saved disappeared[/-][+][$250] Room-Description with mentions shown in preview but after saved disappeared[/+]melvin-bot commentedon Sep 19, 2024
Job added to Upwork: https://www.upwork.com/jobs/~021836660554703667076
melvin-bot commentedon Sep 19, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah (
External)FitseTLT commentedon Sep 19, 2024
This is not a bug. If we mention a correct room the BE sets the description to the mention of that room and it is a correct clickable mention but if the BE doesn't get a room with that name it will consider it a normal text so the mention will disappear. In compose we have a option to deal with this case with a whisper message explaining that the room doesn't exist and ask if the user wants to create it but in this case I think it is unnecessary.
truph01 commentedon Sep 19, 2024
@greg-schroeder Can you confirm the expected behavior here? In the preview, should we always highlight the text
#any-text, or we just highlight it if#any-textis the reportName of the existing report?32 remaining items
truph01 commentedon Oct 9, 2024
PR is ready
greg-schroeder commentedon Oct 14, 2024
@rayane-djouah is up for review!
[-][$250] Room-Description with mentions shown in preview but after saved disappeared[/-][+][HOLD for payment 2024-10-25] [$250] Room-Description with mentions shown in preview but after saved disappeared[/+]melvin-bot commentedon Oct 18, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 18, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.50-8 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-10-25. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Oct 18, 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:
rayane-d commentedon Oct 19, 2024
BugZero Checklist
Regression Test Proposal
Do we agree 👍 or 👎
greg-schroeder commentedon Oct 25, 2024
Payment summary:
Contributor: @truph01 - $250 via Upwork
C+: @rayane-djouah - $250 via Upwork