-
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-02-26] [$500] Workspace name in Distance request flow is wrong color #33976
Comments
Triggered auto assignment to @JmillsExpensify ( |
Job added to Upwork: https://www.upwork.com/jobs/~015105603136672151 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.the workspace item under What is the root cause of that problem?in the confimration list, the to participants items are listed as disabled if the target participant is App/src/components/MoneyTemporaryForRefactorRequestConfirmationList.js Lines 439 to 442 in 5b0ceb2
and here the What changes do you think we should make in order to solve the problem?we need to add a check that the report is not a workspace or in case of the worksapce we can pass the const formattedSelectedParticipants = _.map(selectedParticipants, (participant) => {
const accountID = ReportUtils.isPolicyExpenseChat(participant) ? participant?.ownerAccountID : participant?.accountID;
// or
//const accountID = participant?.accountID === 0 ? participant?.ownerAccountID : participant?.accountID;
return {...participant, isDisabled: ReportUtils.isOptimisticPersonalDetail(accountID)};
}); this needs to be updated also here , here and here POC: |
ProposalPlease re-state the problem that we are trying to solve in this issue.Workspace name in Distance request flow is wrong color What is the root cause of that problem?Because that workspace is disabled here What changes do you think we should make in order to solve the problem?Option1: We can make isDisabled: participant.accountID? ReportUtils.isOptimisticPersonalDetail(participant.accountID) : false Option2: we can keep What alternative solutions did you explore? (Optional) |
. |
ProposalPlease re-state the problem that we are trying to solve in this issue.The workspace name in the Distance request flow is the wrong color What is the root cause of that problem?The following condition is true because the
Therefore, the App/src/components/OptionRow.tsx Line 131 in 5b0ceb2
What changes do you think we should make in order to solve the problem?Just like how
Firstly, we can change the line, which brought the issue, to something similar to the code below.
Secondly, to navigate back to the request page, we will have to set Therefore, we will change the
Futhermore, introduce the
Finally, we need to ensure the Edit the props of the
What alternative solutions did you explore? (Optional)We could also use the prop |
ProposalPlease re-state the problem that we are trying to solve in this issue.the workspace item under What is the root cause of that problem?Because of the check below we set
What changes do you think we should make in order to solve the problem?We should fix // Option 1: Return false if accountID is a falsy value.
function isOptimisticPersonalDetail(accountID: number): boolean {
if (!accountID) {
return false;
}
return isEmptyObject(allPersonalDetails?.[accountID]) || !!allPersonalDetails?.[accountID]?.isOptimisticPersonalDetail;
}
// Option 2: Return false if isPolicyExpenseChat is true.
function isOptimisticPersonalDetail(accountID: number, reportId: number): boolean {
const report = allReports?.[`${ONYXKEYS.COLLECTION.REPORT}${reportId}`] ?? null;
if (isPolicyExpenseChat(report)) {
return false;
}
return isEmptyObject(allPersonalDetails?.[accountID]) || !!allPersonalDetails?.[accountID]?.isOptimisticPersonalDetail;
} We already have functions related to personal account details where we return early if Lines 1475 to 1478 in 6fad557
Lines 1452 to 1455 in 6fad557
Option 2If we don't want to make workspace name appear disabled in any case then we can just remove the Result |
Yeah, something to consider is that I don't think we need to make the workspace name appear disabled. |
Will review over the weekend. |
All proposals have been reviewed. So far, I lean towards @Tony-MK's proposal, using @abzokhattab's proposal does not explicitly state how to check if the report is not a workspace. The condition in @yh-0218's proposal is not as easy to understand as As for @Krishna2323's proposal, I feel it's unnecessary to modify the logic of |
Hi @ntdiary
I am already mentioned in the code snippet to use const accountID = ReportUtils.isPolicyExpenseChat(participant) ? participant?.ownerAccountID : participant?.accountID; this will give the for your information here is the Lines 704 to 706 in 8aec07c
last thing: please also keep mind that this needs to be updated in mutliple locations as i am mentioning in my proposal |
@ntdiary as for the navigation issue we should add an optional then we add this new new Navigation.navigate(ROUTES.REPORT_WITH_ID_DETAILS.getRoute(option.reportID,activeRoute)); Thanks |
@ntdiary, the logic for Also I don't think it will cause any regression. Line 780 in 6fad557
|
Thanks for reviewing my proposal and also for the feedback, @ntdiary. I have retested and updated my proposal based on your comments from #33976 (comment). It works like a charm. Thank you. 😄 |
Thanks for all the responses. So far, I still need to do some investigations to confirm there won't be any regressions when navigating back. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Proposals and on-going discussion still in progress. |
@dangrous, I believe we can finalize it before Tuesday. 👍 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.42-5 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-02-26. 🎊 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:
|
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results. If a regression has occurred and you are the assigned CM follow the instructions here. If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future. |
Regression test steps:
BTW, I'm applying to switch to NewDot for payment, so it might be better to hold this temporarily if possible. :) |
Even though it's small I think it's pretty quick to check, it would just be adding a line confirming the color to whatever existing test creates the workflow. I think it's worth adding! If you want to do a quick test, I'm sure QA can roll it in to what they already have and simplify |
Makes sense, have updated the testing steps. 😄 |
@ntdiary Let's use the Slack thread to align on next steps, I just commented there. I'm going to close this issue for now, though I can re-open if you need to be paid via Upwork. |
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: v1.4.22-0
Reproducible in staging?: yes
Reproducible in production?: yes
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: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1704218630440349
Action Performed:
Create a distance request, send it to a workspace
Expected Result:
The workspace name under the "To" label should use our standard text color.
Actual Result:
The workspace name under the "To" field uses our supporting text color
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: