-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOLD for payment 2024-06-20] [HOLD for payment 2024-06-18] [$250] Room - Endless Loading of Header When Navigating to Thread of Mentioned Room #40928
Comments
Triggered auto assignment to @isabelastisser ( |
We think that this bug might be related to #vip-vsb |
@isabelastisser 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. |
Job added to Upwork: https://www.upwork.com/jobs/~0137b18b289d467863 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Room - Endless Loading of Header When Navigating to Thread of Mentioned Room What is the root cause of that problem?Here we set What changes do you think we should make in order to solve the problem?Update this line like below. It is not specified exactly what should be displayed, so I suggested еру
What alternative solutions did you explore? (Optional) |
@shahinyan11 I think the expected result should show the message in the header, but with your solution, it will show
Your root cause might not be correct, the issue is only reproduced if the message just contains the mention tag. Screen.Recording.2024-04-29.at.12.24.51.mp4 |
@mollfpr, any updates? Are we still waiting for proposals? |
@isabelastisser Still waiting for @shahinyan11 and other proposals. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Header of thread report displayed as skeleton view if the parent report action message is report mention. What is the root cause of that problem?In HeaderView the skeleton view will be displayed if isLoading: App/src/pages/home/HeaderView.tsx Line 220 in 035adb8
is true. It's value will be true in this issue because title variable What changes do you think we should make in order to solve the problem?In this line: Line 2949 in 035adb8
We could use reportAction?.message?.[0]?.html and detect all occurrence of pattern The code could be: Code:function embedMentionedReportName(reportAction){
const {html, text} = reportAction?.message?.[0];
if (!html) {
return text;
}
const mentionReportRegex = /(\<mention-report reportID\=\"(\d+)\"\/>)/gm;
if (!mentionReportRegex.test(html)) {
return text;
}
const splittedText = text.split(" ");
// Remove tags except for mention-report
const filteredHtml = html.replace(/(\<(?!mention-report).*?\>)/gm, "");
// Embed report name into html enclosed by tag, for exampple: <#announce>
const htmlWithReportName = filteredHtml.replace(/(\<mention-report reportID\=\"(\d+?)\"\/\>)/gm,
(match, p1, p2) => `<${getReportName(getReport(p2))}>`
);
const splittedHtmlWithReportName = htmlWithReportName.split(" ");
const taggedReportNameRegex = /\<(.+)\>/gm;
splittedHtmlWithReportName.forEach((str, index) => {
const match = taggedReportNameRegex.exec(str ?? "");
if (match) {
const cSpliitedText = splittedText[index] ?? "";
splittedText[index] = match.index > 0 ? cSpliitedText + match[1] : match[1] + cSpliitedText;
}
taggedReportNameRegex.lastIndex = 0;
})
return splittedText.join(" ");
} Then in here: Line 2949 in 035adb8
call it with: const embeddedMentionedReportName = embedMentionedReportName(reportAction);
return Str.removeSMSDomain( embeddedMentionedReportName ?? ''); What alternative solutions did you explore?We could use ExpensiMark htmlToText to parse the html string. |
@mollfpr can you please review the proposal above? Thanks! |
@tsa321 I'm incline with your approach, could you share the result of your proposal? |
Issue not reproducible during KI retests. (First week) |
The code could be: Code:function embedMentionedReportName(reportAction){
const {html, text} = reportAction?.message?.[0];
if (!html) {
return text;
}
const mentionReportRegex = /(\<mention-report reportID\=\"(\d+)\"\/>)/gm;
if (!mentionReportRegex.test(html)) {
return text;
}
const splittedText = text.split(" ");
// Remove tags except for mention-report
const filteredHtml = html.replace(/(\<(?!mention-report).*?\>)/gm, "");
// Embed report name into html enclosed by tag, for exampple: <#announce>
const htmlWithReportName = filteredHtml.replace(/(\<mention-report reportID\=\"(\d+?)\"\/\>)/gm,
(match, p1, p2) => `<${getReportName(getReport(p2))}>`
);
const splittedHtmlWithReportName = htmlWithReportName.split(" ");
const taggedReportNameRegex = /\<(.+)\>/gm;
splittedHtmlWithReportName.forEach((str, index) => {
const match = taggedReportNameRegex.exec(str ?? "");
if (match) {
const cSpliitedText = splittedText[index] ?? "";
splittedText[index] = match.index > 0 ? cSpliitedText + match[1] : match[1] + cSpliitedText;
}
taggedReportNameRegex.lastIndex = 0;
})
return splittedText.join(" ");
} Then in here: Line 2949 in 035adb8
call it with: const embeddedMentionedReportName = embedMentionedReportName(reportAction);
return Str.removeSMSDomain( embeddedMentionedReportName ?? ''); Result:macos-web-d.mp4 |
@mollfpr @isabelastisser 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! |
It looks like the PR was submitted here: #42504 |
#40928 (comment) I could still reproduce the issue just now. |
This comment was marked as resolved.
This comment was marked as resolved.
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.81-11 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-18. 🎊 For reference, here are some details about the assignees on 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:
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.82-4 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-20. 🎊 For reference, here are some details about the assignees on 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:
|
@mollfpr, please complete the BZ list. Thanks! |
Bump @mollfpr to complete the checklist. |
Payment summary: @mollfpr requires payment through NewDot Manual Requests Role C+ $250 |
Bump @mollfpr. I DM'd you for visibility. |
Sorry for the delay.
No offending PR. The issue seems a case that we missing to handle and how we should process the mentioned action message from BE.
The regression step should be enough.
|
$250 approved for @mollfpr |
All set! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: v1.4.65-0
Reproducible in staging?: y
Reproducible in production?: y
Issue reported by: Applause - Internal Testing
Action Performed:
Expected Result:
Upon entering the thread, the header enters an infinite loading state.
Actual Result:
The mentioned room should be displayed in the header as expected, without any endless loading.
Workaround:
n/a
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6460103_1713955694030.Screen_Recording_2024-04-24_at_3.45.34_AM.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @isabelastisserThe text was updated successfully, but these errors were encountered: