You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-10-16] [$500] Attachment - Red error message appears briefly when closing password protected PDF #28195
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Click close button, Observe error message appears briefly
Expected Result:
No error message after close
Actual Result:
Error message appears briefly after closing password protected PDF
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android / native
Android / Chrome
iOS / native - did not provided yet, requested
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: 1.3.74.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 Notes/Photos/Videos: Any additional supporting documentation
changed the title [-]Attachment - Red error message appears briefly when closing password protected PDF[/-][+][$500] Attachment - Red error message appears briefly when closing password protected PDF[/+]on Sep 25, 2023
In the function validateAndNotifyPasswordBlur we call validate function. That means when we click outside the input> it will tricker and show an error.
This function will be triggered, even though user click on close button or put app in background
What changes do you think we should make in order to solve the problem?
We should trigger the validate function on blur only when the current app is visible and has focus. And then we can use setTimeOut to delay validation like this
const validateAndNotifyPasswordBlur = () => {
// Only run validation when user proactively blurs the input.
if (!Visibility.isVisible() || !Visibility.hasFocus()) {
return
}
setTimeout(() => {
validate();
onPasswordFieldFocused(false);
}, 300);
}
This is the way we did in Form Component and used in many places
changed the title [-][$500] Attachment - Red error message appears briefly when closing password protected PDF[/-][+][HOLD for payment 2023-10-16] [$500] Attachment - Red error message appears briefly when closing password protected PDF[/+]on Oct 9, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-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 2023-10-16. 🎊
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.
External issue reporter
Contributor that fixed the issue
Contributor+ that helped on the issue and/or PR
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:
[@jjcoffee] The PR that introduced the bug has been identified. Link to the PR:
[@jjcoffee] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
[@jjcoffee] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
[@jjcoffee] Determine if we should create a regression test for this bug.
[@jjcoffee] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
[@NicMendonca] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
The PR that introduced the bug has been identified. Link to the PR: N/A - behaviour always existed
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Determine if we should create a regression test for this bug. No - not really impactful enough
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
[-]Attachment - Red error message appears briefly when closing password protected PDF[/-][+][$500] Attachment - Red error message appears briefly when closing password protected PDF[/+]melvin-bot commentedon Sep 25, 2023
Triggered auto assignment to @michaelhaxhiu (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Sep 25, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b3fbc4b9a33f9413
melvin-bot commentedon Sep 25, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)melvin-bot commentedon Sep 25, 2023
Triggered auto assignment to @NicMendonca (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.melvin-bot commentedon Sep 25, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (
External)kbecciv commentedon Sep 25, 2023
Proposal by: @namhihi237
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1695551022734439
Proposal
Please re-state the problem that we are trying to solve in this issue.
Error message appears briefly after closing password-protected PDF, It also when we click download
What is the root cause of that problem?
We call the function check error when blur input:
App/src/components/PDFView/PDFPasswordForm.js
Line 129 in 5217721
In the function
validateAndNotifyPasswordBlurwe callvalidatefunction. That means when we click outside the input> it will tricker and show an error.App/src/components/PDFView/PDFPasswordForm.js
Lines 98 to 101 in 5217721
App/src/components/PDFView/PDFPasswordForm.js
Lines 81 to 89 in 5217721
What changes do you think we should make in order to solve the problem?
I think we can remove validation when blur input. We only check when click confirm.
What alternative solutions did you explore? (Optional)
N/A
DylanDylann commentedon Sep 26, 2023
Proposal
Please re-state the problem that we are trying to solve in this issue.
We have 2 bugs:
Screen.Recording.2023-09-26.at.17.09.37.mov
What is the root cause of that problem?
App/src/components/PDFView/PDFPasswordForm.js
Lines 98 to 102 in 3486648
This function will be triggered, even though user click on close button or put app in background
What changes do you think we should make in order to solve the problem?
We should trigger the validate function on blur only when the current app is visible and has focus. And then we can use setTimeOut to delay validation like this
This is the way we did in Form Component and used in many places
App/src/components/Form.js
Line 301 in 4af18f6
result
Screen-Recording-2023-09-26-at-17.06.09.mp4
35 remaining items
[-][$500] Attachment - Red error message appears briefly when closing password protected PDF[/-][+][HOLD for payment 2023-10-16] [$500] Attachment - Red error message appears briefly when closing password protected PDF[/+]melvin-bot commentedon Oct 9, 2023
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Oct 9, 2023
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-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 2023-10-16. 🎊
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:
melvin-bot commentedon Oct 9, 2023
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:
NicMendonca commentedon Oct 16, 2023
@jjcoffee bump on the BZ check list ^
NicMendonca commentedon Oct 16, 2023
everyone has been paid 🎉 @jjcoffee @namhihi237
jjcoffee commentedon Oct 17, 2023
NicMendonca commentedon Oct 17, 2023
all set here then!