-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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-07-17] [$250] Actionable whisper - Whisper options are interactable when the expense is deleted offline #43560
Comments
Triggered auto assignment to @CortneyOfstad ( |
@CortneyOfstad 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 |
We think that this bug might be related to #vip-vsb |
ProposalPlease re-state the problem that we are trying to solve in this issue.Actionable whisper - Whisper options are interactable when the expense is deleted offline What is the root cause of that problem?We don't have any logic to disable the buttons when the transaction is deleted. App/src/pages/home/report/ReportActionItem.tsx Lines 401 to 417 in 79e619a
What changes do you think we should make in order to solve the problem?We should get the transaction using transactionID and if the transaction doesn't exist, we will disable the buttons. In order to make this work we need to follow few steps.
const [transactions] = useOnyx(ONYXKEYS.COLLECTION.TRANSACTION);
const transactionID = action?.originalMessage?.transactionID;
const transaction = transactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${transactionID}`] ?? null; App/src/pages/home/report/ReportActionItem.tsx Lines 401 to 410 in 79e619a
3. Add isDisabled property in the objects in actionableItemButtons array.
{
text: 'actionableMentionTrackExpense.submit',
key: `${action.reportActionID}-actionableMentionTrackExpense-submit`,
onPress: () => {
ReportUtils.createDraftTransactionAndNavigateToParticipantSelector(transactionID, report.reportID, CONST.IOU.ACTION.SUBMIT, action.reportActionID);
},
isMediumSized: true,
isDisabled: !transactions,
},
<Button
key={item.key}
onPress={item.onPress}
text={translate(item.text)}
small={!item.isMediumSized}
medium={item.isMediumSized}
success={item.isPrimary}
isDisabled={item.isDisabled}
/> Optional: We can wrap the Whisper message with
<OfflineWithFeedback pendingAction={ReportActionsUtils.isActionableTrackExpense(action) && !transaction && 'delete'}> Note: We also need to update the type files. What alternative solutions did you explore? (Optional)
ResultMonosnap.screencast.2024-06-12.21-08-45.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~0102bf6b299104a911 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rojiphil ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
and What alternative solutions did you explore? (Optional)
It will mark the
It will do not return
It will disable user from interacting with the whisper action. We also need to add the grey out style to it, to indicate that the action is disabled.
|
I updated the solution to add more detail about the implementation |
I added the alternative solution |
@rojiphil, @CortneyOfstad Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Thanks for your proposals. Whereas @truph01 proposed to prevent displaying the whisper action which goes in sync with online behavior. The main solution of optimistically setting the "resolution": "nothing" to the whisper action LGTM. |
Triggered auto assignment to @cristipaval, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@jasperhuangg could you please help me triage this issue? I'm not sure what is the expected behavior here. |
@rojiphil @jasperhuangg, I think hiding the whisper will result in weird behavior when the expense deletion fails. When deleting an expense in offline mode, the whisper will be removed. If the deletion fails, the whisper will pop up again as if it was created for a new expense. |
I agree with what @Krishna2323 is saying. In this case I think it's better to just disable the buttons rather than optimistically setting a field that is technically unrelated to this particular flow. Just to confirm, if the user comes back online and the expense is deleted, then the buttons should disappear on their own, correct? cc @rojiphil |
|
Thanks for jumping into this one, @jasperhuangg 🙇 |
PR is actively being reviewed! |
Has been committed to main, just waiting on staging and production! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.5-13 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-07-17. 🎊 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 9.0.6-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-07-22. 🎊 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:
|
So the title is incorrect and this needs to be paid. @rojiphil can you please complete the checklist by EOD? Thank you and sorry for the short notice! |
Test Steps |
@CortneyOfstad Checklist is done. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Issue found when validating #43020
Version Number: 1.4.82-0
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: Applause internal team
Slack conversation:
Action Performed:
Expected Result:
The actionable whisper should not be interactable when the expense is deleted offline.
Actual Result:
The actionable whisper is interactable when the expense is deleted offline and the options (except Nothing for now) lead to not here page.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6510127_1718153439897.20240612_084634.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @CortneyOfstadThe text was updated successfully, but these errors were encountered: