-
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 2023-10-12] [$500] DEV: Web - Draft icon show even there is not any thing in input field #27362
Comments
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?
What alternative solutions did you explore? (Optional)
ResultScreencast.from.06-09-2023.16.48.47.webm |
Job added to Upwork: https://www.upwork.com/jobs/~01e6da2ca5e140fdb7 |
Triggered auto assignment to @kadiealexander ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 ( |
Not overdue, please get your proposals in 📢 |
ProposalPlease re-state the problem that we are trying to solve in this issue.In LHN, a draft icon shows when there is no text in the input field. What is the root cause of that problem?The App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js Lines 206 to 207 in e2a1343
App/src/libs/ComposerUtils/debouncedSaveReportComment.js Lines 9 to 11 in 8000576
The problem occurs when a user types in a message in one report chat, switches to another report and enters another message within one second. The new debounced function call happens, and the previous call becomes overridden, but a report menu item in LHN displays that it was edited. What changes do you think we should make in order to solve the problem?Move the debounced comment save function on the component level. So, every report will have it's own instance of that function. We need to do it in // ReportActionCompose.js
const debouncedSaveReportComment = useMemo(function () {
return _.debounce((reportID, comment) => {
Report.saveReportComment(reportID, comment || '');
}, 5000);
}, []);
...
<ComposerWithSuggestions
...
debouncedSaveReportComment={debouncedSaveReportComment} // new property
/> What alternative solutions did you explore? (Optional)N/A |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@abdulrahuman5196 any thoughts on the above? |
Bumped in Slack. |
ProposalPlease re-state the problem that we are trying to solve in this issueIn LHN, a draft icon shows when there is no text in the input field. What is the root cause of that problem?
The draft icon is shown based on Line 299 in 09a0118
and immediately set when user type in composer : App/src/pages/home/report/ReportActionCompose/ComposerWithSuggestions.js Lines 222 to 224 in 09a0118
When user type in composer and continuously typing without pause within 1 second of the next character input, the draft is not saved for the current opened report, because of the What changes do you think we should make in order to solve the problem?We could check if App/src/pages/home/report/ReportActionsList.js Lines 138 to 144 in 09a0118
We could add check on the draft and set const draftComment = getDraftComment(prevReportID);
Report.setReportWithDraft(prevReportID, draftComment && draftComment.length > 0); What alternative solutions did you explore? (Optional)If the expected result is to make the current draft text input persist for the previously opened report when user switching/opening other report while typing, we could use Result:draft_icon_lhn_d.mp4 |
Reviewing now |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@abdulrahuman5196 did you have any feedback for the proposals? |
Checking again. |
@DylanDylann @needpower @tsa321 Hi folks, thank you for the proposal. But I am unable to fully understand the root cause. The display of draft icon is dependent on the Line 299 in 09a0118
But that flag is updated via |
@abdulrahuman5196 |
@DylanDylann 's proposal here #27362 (comment) looks good and works well. 🎀 👀 🎀 |
Triggered auto assignment to @MariaHCD, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@tsa321 Please follow the steps to reproduce this bug which was reported by reporter. If not, maybe the above is another bug, and you can report it. Thanks. Also, the proposal just contains the RCA and the main idea to resolve the issue. Every related case and edge case will be covered in the PR |
📣 @abdulrahuman5196 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
📣 @niravkakadiya25 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app! |
@abdulrahuman5196 PR #28574 is ready for review |
🎯 ⚡️ Woah @abdulrahuman5196 / @DylanDylann, great job pushing this forwards! ⚡️ The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.77-7 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 2023-10-12. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
https://github.com/Expensify/App/pull/25758/files#r1352852646
No. Not beneficial for a minor bug |
Payouts due:
Eligible for 50% #urgency bonus? Yes |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
Draft icon not shows if not have any text in input field
Actual Result:
Draft icon is shows even input field is empty
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: Dev 1.3.57-5.
Reproducible in staging?: no
Reproducible in production?: no
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
Notes/Photos/Videos: Any additional supporting documentation
Screen.Recording.2023-08-28.at.10.40.07.AM.mov
Expensify/Expensify Issue URL:
Issue reported by: @niravkakadiya25
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1693199645599589
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: