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 2024-11-26] [$250] Company cards - Error appears after tapping the explanation link for the first time #52144
Version Number: 9.0.58-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team
Create a workspace and enable Company cards feature.
Go to Company cards page.
Tap Add company cards button to start add feed flow.
Select Amex provider (or Visa/Mastercard providers in Others). Tap Next 3 times.
On the details screen, below input field tap the explanation link.
Expected Result:
After tapping the explanation link under the input field user is redirected to the relevant web page
Actual Result:
Error appears under the input field "This field is required" after tapping the explanation link for the first time. User is successfully redirected to the relevant page after tapping the link second time
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6656970_1730926601363.Company_cards.mp4
Edited by proposal-police: This proposal was edited at 2024-11-07 03:52:51 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Validation error appears when pressing the link in company card step.
What is the root cause of that problem?
The validation shows every time the input is blurred. When we press the text link, the text input blurs. This doesn't happen in web because by default, we preventDefault it.
In native, pressing a button normally doesn't blur the active input. But in our case, the page is wrapped with a ScrollView with no keyboardShouldPersistTaps. So, if we tap inside the scroll view, then it will close the keyboard.
What changes do you think we should make in order to solve the problem?
We can add keyboardShouldPersistTaps='handled' to the ScrollView.
OR
We can just remove the ScrollView and move the Text inside FormProvider because FormProvider already uses a ScrollView which already has keyboardShouldPersistTaps="handled".
Let's get eyes from @mountiny@allgandalf@DylanDylann on the approach here. What technical approach do we take on native for other links in forms, like a terms link in a RHP form?
Nice one QA. @allgandalf@DylanDylann which one of you wants to take this one and review the proposals so its in line with how we handle it elsewhere in the app?
changed the title [-]Company cards - Error appears after tapping the explanation link for the first time[/-][+][$250] Company cards - Error appears after tapping the explanation link for the first time[/+]on Nov 12, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.63-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@DylanDylann@trjExpensify@DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
$250 to @bernhardoj for the fix (go ahead and request!)
@DylanDylann can we get the checklist, please? I believe regression tests will be added centrally for the project, but it would be good to identify where this error was missed to give the author(s) a heads up.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Open any workspace and enable Company cards feature
Go to Company cards page
Tap Add company cards button to start add feed flow
Select Amex provider. Tap Next 3 times
On the details screen, below the input field tap the explanation link
Verify no error and you are redirected to help web page
Activity
melvin-bot commentedon Nov 6, 2024
Triggered auto assignment to @trjExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.bernhardoj commentedon Nov 7, 2024
Edited by proposal-police: This proposal was edited at 2024-11-07 03:52:51 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Validation error appears when pressing the link in company card step.
What is the root cause of that problem?
The validation shows every time the input is blurred. When we press the text link, the text input blurs. This doesn't happen in web because by default, we preventDefault it.
App/src/components/TextLink.tsx
Line 35 in afa7b33
In native, pressing a button normally doesn't blur the active input. But in our case, the page is wrapped with a ScrollView with no
keyboardShouldPersistTaps. So, if we tap inside the scroll view, then it will close the keyboard.App/src/pages/workspace/companyCards/addNew/DetailsStep.tsx
Lines 175 to 208 in afa7b33
What changes do you think we should make in order to solve the problem?
We can add
keyboardShouldPersistTaps='handled'to the ScrollView.OR
We can just remove the ScrollView and move the Text inside FormProvider because FormProvider already uses a ScrollView which already has
keyboardShouldPersistTaps="handled".App/src/pages/workspace/companyCards/addNew/DetailsStep.tsx
Lines 175 to 190 in afa7b33
App/src/components/Form/FormWrapper.tsx
Lines 163 to 177 in afa7b33
(we need to remove the padding from text because FormProvider already has the horizontal margin.)
OR
Don't use the ScrollView (remove it).
trjExpensify commentedon Nov 12, 2024
Let's get eyes from @mountiny @allgandalf @DylanDylann on the approach here. What technical approach do we take on native for other links in forms, like a terms link in a RHP form?
mountiny commentedon Nov 12, 2024
Nice one QA. @allgandalf @DylanDylann which one of you wants to take this one and review the proposals so its in line with how we handle it elsewhere in the app?
DylanDylann commentedon Nov 12, 2024
I can help on this issue
trjExpensify commentedon Nov 12, 2024
Assigned! Sending
Externalthen.[-]Company cards - Error appears after tapping the explanation link for the first time[/-][+][$250] Company cards - Error appears after tapping the explanation link for the first time[/+]21 remaining items
melvin-bot commentedon Nov 19, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Nov 19, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.63-3 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-11-26. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 19, 2024
@DylanDylann @trjExpensify @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
mountiny commentedon Nov 20, 2024
$250 to @bernhardoj and $125 to @DylanDylann
For Dylan the payment is less as he is working on this as a project and we agreed for lower base price
trjExpensify commentedon Nov 26, 2024
Cool, sounds good! Payment summary as follows:
@DylanDylann can we get the checklist, please? I believe regression tests will be added centrally for the project, but it would be good to identify where this error was missed to give the author(s) a heads up.
DylanDylann commentedon Nov 27, 2024
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: Feat: Add company card feed flow #48119 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Test:
Do we agree 👍 or 👎
bernhardoj commentedon Nov 27, 2024
Requested in ND.
JmillsExpensify commentedon Nov 27, 2024
$250 approved for @bernhardoj
trjExpensify commentedon Nov 27, 2024
Great, thanks. Closing!