-
Notifications
You must be signed in to change notification settings - Fork 3k
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-03-07] [$500] Wrong header is shown for 2nd and 3rd level of child threads #37111
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01d99f7344fe2e0a2c |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @paultsimura ( |
Triggered auto assignment to @sakluger ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Wrong header is displayed when you navigate into a thread. It also shows the room as being the parent. What is the root cause of that problem?Lines 2639 to 2650 in 0a2ece8
Lines 2590 to 2593 in 0a2ece8
What changes do you think we should make in order to solve the problem?Add a check for if (isChildReport(report) && !isMoneyRequestReport(report) && !isTaskReport(report) && !isChatReport(report)) {
const parentReport = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${report?.parentReportID}`] ?? null;
return getRootReportAndWorkspaceName(parentReport);
} Screen.Recording.2024-02-22.at.5.28.40.PM.movWhat alternative solutions did you explore? (Optional)Get rid of if (isChildReport(report) && !isMoneyRequestReport(report) && !isTaskReport(report) && !isChatReport(report)) {} The condition above (as proposed) seems to always return false now that we added chat to the list. TYPE: {
CHAT: 'chat',
EXPENSE: 'expense',
IOU: 'iou',
TASK: 'task',
}, So unless I'm missing something, we can rename Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
I see that @chiragsalian once mentioned that it's an expected behavior: #27986 (comment) @puneetlath @chiragsalian did the expected behavior change, and we should proceed with the proposals review here? |
ProposalPlease re-state the problem that we are trying to solve in this issue.Wrong header title shown in chat threads What is the root cause of that problem?On the HeaderView component, we are using the App/src/pages/home/HeaderView.js Line 108 in cd14830
but this function Lines 2639 to 2643 in cd14830
As you can see from the name of the function What changes do you think we should make in order to solve the problem?We need to get the title from the parent and not from the root. We can use
This will turn the title of the parent and not the title of the root. POC video: 20240223_135951.mp4What alternative solutions did you explore? (Optional)I can see that the function |
Not overdue. Waiting for a decision from @puneetlath and @chiragsalian. Also asked in Slack. |
We've agreed on the expected behavior here: we should show the parent report (comment) title in the navigation. |
@dragnoir thanks for your proposal. It's essentially not different from the proposal from @barros001. Your alternative solution doesn't make much sense because we want the navigation subtitle to be consistent across the places it's used: report headers and the "share code" page (here only the workspace name is used). |
@paultsimura the proposal from @barros001 will change a main function with the goal to return a root. Mine is not touching this function and keep it always turn a root. |
The |
Eventually, I think we can get rid of the Since @barros001 was the first to give the correct RCA and the correct fix (removing the recursion) – we can proceed with his proposal. @barros001 just a friendly note for you: I see your proposal was modified a ton of times. Since all the edits were made before other proposals were posted, it's OK, but in such a case, I would recommend just copying your final proposal, posting it again, and removing the edited one. This way, you're not losing the priority since there are no other proposals yet, but it looks much cleaner. |
Triggered auto assignment to @cristipaval, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
This was my alternative solution. I respect your decision. But updating a root calling function to get the parent is not something professional at all. Another developer in the future may be confused with the name. Also asking if it's a chat to stop the loop inside a root function is not helpful for an utility that can be used in the future. |
Respectfully, it wasn't. Yours was to have 2 functions and adjust different components to use both of these functions.
Could you please elaborate on why it's not professional, and how one should be confused with the |
the function getParentNavigationSubtitle is already used by other component. I suggested to update it as it's a call for the root and adjust the components that already are using it. I also suggested having as final result a function that is for root and a second for parent. This will give make a good use for utility function. Also it will be easy for developers iin the future to use those function clearly. What @barros001 was suggesting is:
I don't see any idea about having two seperate clean functions. |
Sorry about that, I'll keep this in mind next time. I'm ware of the speed run proposals issue we're dealing with and I assure you that wasn't my idea here. I try to make the initial proposal as complete as possible but a lot of times I keep digging and end up finding little gaps on the proposal and go back and fix, or I just think of adding more context that I did not think at first. I'll make an effort to keep my edits to a minimum. |
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @barros001 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
I understand that, no worries. That was just some advice 👍 |
I understand your way of thinking. But the form in which you presented your proposal did not have any evident benefits over the other proposal.
This way, I would have easily chosen your proposal. But I did not see any of those points, just "this function is used elsewhere, we may want to leave it so that other developers can use it". Now that neither of your proposals was perfect, I decided to go with the first one that gave a correct RCA and a sufficient solution. |
@paultsimura thank you. I will make it better in the next issue :) |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.45-6 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-03-07. 🎊 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:
|
Regression Test Proposal
Do we agree 👍 or 👎 |
Paid everyone out and created the regression test GH issue. Thanks everyone! |
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: 1.4.43-13
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @puneetlath
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1708622339587649
Action Performed:
message 1
message 2
message2
Expected Result:
Header should show only the thread which is 1 level up
Actual Result:
Shows "room name" and clicking on that takes to 1 level up
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Recording.2767.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: