[HOLD for payment 2024-12-09] [$250] iOS - Accounting - Confirm button jumps when entering user ID for Sage Intacct
If you havenβt already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.59.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: https://expensify.testrail.io/index.php?/tests/view/5195617 Issue reported by: Applause Internal Team
Action Performed:
Precondition: user has saved credentials
- Open the app and log in
- Create a workspace if there is no any
- Navigate to the workspace settings > More features and enable the Accounting option
- Open Accounting and select Intacct
- Upgrade the policy if it has not been done yet
- Proceed to the step to enter credentials
- Tap the user ID field and start entering the credentials
Expected Result:
The Confirm button does not jump
Actual Result:
The Confirm button jumps when entering user ID. It does not happen when entering a password even though the password auto-fill is present.
Workaround:
Unknown
Platforms:
- [ ] Android: Standalone
- [ ] Android: HybridApp
- [ ] Android: mWeb Chrome
- [ ] iOS: Standalone
- [x] iOS: HybridApp
- [x] iOS: mWeb Safari
- [ ] MacOS: Chrome / Safari
- [ ] MacOS: Desktop
Screenshots/Videos
https://github.com/user-attachments/assets/5660998b-2f01-4e33-827d-bfd9605b5f88
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021859980122209615794
- Upwork Job ID: 1859980122209615794
- Last Price Increase: 2024-11-22
- Automatic offers:
- suneox | Reviewer | 105074090
- huult | Contributor | 105074091
Issue Owner
Current Issue Owner: @johncschuster
Triggered auto assignment to @slafortune (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.
Issue is repro on newest iOS devices (iPhone 15 Pro Max and iPhone 16)
Proposal
Please re-state the problem that we are trying to solve in this issue.
Confirm button jumps when entering user ID for Sage Intacct
What is the root cause of that problem?
We do not pass any ref to the InputWrapper this makes the state to always change.
What changes do you think we should make in order to solve the problem?
Pass a ref to InputWrapper:
const {inputCallbackRef} = useAutoFocusInput();
<InputWrapper
InputComponent={TextInput}
inputID={formItem}
label={translate(`common.${formItem}`)}
aria-label={translate(`common.${formItem}`)}
role={CONST.ROLE.PRESENTATION}
spellCheck={false}
secureTextEntry={formItem === INPUT_IDS.PASSWORD}
ref={inputCallbackRef}
/>
What alternative solutions did you explore? (Optional)
@slafortune Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Proposal
Please re-state the problem that we are trying to solve in this issue.
The Confirm button jumps when entering user ID. It does not happen when entering a password even though the password auto-fill is present.
What is the root cause of that problem?
It's an issue with the Passwords option in the Keyboard toolbar. We already notice it in https://github.com/facebook/react-native/issues/39411#issuecomment-1744962420
We should fix it since it can affect on users experience (button jumps unexpectedly on non-password input)
What changes do you think we should make in order to solve the problem?
We can use textContentType='oneTimeCode'
textContentType='oneTimeCode'
What alternative solutions did you explore? (Optional)
We can show the Confirm button right below the inputs by updating the styles.justifyContentEnd here
https://github.com/Expensify/App/blob/5b1ee3f2b07ed6e9f46915d07574cb3ee8e0d8a3/src/components/FormAlertWithSubmitButton.tsx#L100
containerStyles={[shouldShowConfirmButtonAtTheEnd && styles.justifyContentEnd, safePaddingBottomStyle, containerStyles]}
https://github.com/user-attachments/assets/7c3c1403-76a2-47f5-8b07-0fb371858eb9
@slafortune Huh... This is 4 days overdue. Who can take care of this?
@slafortune 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
@slafortune 10 days overdue. Is anyone even seeing these? Hello?
Triggered auto assignment to @johncschuster (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.
Stevie has been and will be ooo - reapplying label
@johncschuster this issue was created 2 weeks ago. Are we close to a solution? Let's make sure we're treating this as a top priority. Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
Job added to Upwork: https://www.upwork.com/jobs/~021859980122209615794
Triggered auto assignment to Contributor-plus team member for initial proposal review - @suneox (External)
Edited by proposal-police: This proposal was edited at 2024-11-24 14:17:29 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Confirm button jumps when entering user ID for Sage Intacct
What is the root cause of that problem?
This is our ticket related to the discussion on the React Native issue: https://github.com/facebook/react-native/issues/39411
https://github.com/facebook/react-native/issues/39411#issuecomment-1726601414
They identified the problem in this comment
https://github.com/facebook/react-native/issues/39411#issuecomment-1744962420
It confirms that this is an OS-specific issue that emerged with iOS 17.x
What changes do you think we should make in order to solve the problem?
https://github.com/facebook/react-native/issues/39411#issuecomment-2467008120
We can use the workaround solution mentioned in this comment to resolve the issue. Something like that:
// src/pages/workspace/accounting/intacct/EnterSageIntacctCredentialsPage.tsx#L81
<InputWrapper
InputComponent={TextInput}
inputID={formItem}
label={translate(`common.${formItem}`)}
aria-label={translate(`common.${formItem}`)}
role={CONST.ROLE.PRESENTATION}
spellCheck={false}
secureTextEntry={formItem === INPUT_IDS.PASSWORD}
+ autoCorrect={false}
+ textContentType={formItem === INPUT_IDS.USER_ID ? 'none' : undefined}
/>
As mentioned in this StackOverflow comment, it explains why we shouldn't use textContentType="oneTimeCode". I think we should use autoCorrect={false} as well. The flickering only occurs the first time, so I believe it's okay and doesn't significantly impact the user experience.
Note: If we want to target a specific iOS version, we can use Platform.OS === 'ios' or create an index.ios.ts file. We will discuss this in the PR phase.
POC
https://github.com/user-attachments/assets/0acdf500-8cf4-4075-99cb-3f276a1ac5b4
What alternative solutions did you explore? (Optional)
Thank you for all the proposals. This issue is related to iOS issue when we have multiple fields with secureTextEntry. @huult proposal can fix the flashing issue while typing. Although it still flashes once on the first input, but I think itβs acceptable as it prevents the flashing noise on every keystroke. Therefore, I think we can proceed with @huult proposal.
π π π C+ reviewed
Triggered auto assignment to @grgia, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
Although it still flashes once on the first input, but I think itβs acceptable as it prevents the flashing noise on every keystroke.
@suneox @huult can we prevent the flash on first input as part of this issue?
@grgia , With this approach, we can't prevent the flash on the first input. However, aside from that, we don't encounter issues like the one mentioned in this StackOverflow comment.
It looks like we have a limitation with this issue. I also checked a few apps has multiple field using the iOS password hint feature, and they also have the same flashing issue.
Notion / DaiChi / Booking
https://github.com/user-attachments/assets/5de3a1fe-6bf8-4a51-96c5-daa544aeffe3
https://github.com/user-attachments/assets/f0222846-d2f3-49cb-8fb7-a288526dff9e
https://github.com/user-attachments/assets/ca32f876-8957-4838-95c4-6b183896860d
Here is the behavior before and after the fix for this issue. If we agree with this behavior, we can proceed by disabling the max height for this screen to avoid height changes on iOS.
Before fix
https://github.com/user-attachments/assets/cc314248-c90e-40f2-9a3c-626fbbf9d868
After fix
https://github.com/user-attachments/assets/073d24ae-c7a2-4b70-aba0-af8a73fe9b94
@suneox hmm yeah it's not perfect, but I see the limitations. It's definitely an improvement from every input, I'll assign for now
π£ @suneox π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @huult π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
Reviewing label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.69-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
- https://github.com/Expensify/App/pull/53131
If no regressions arise, payment will be issued on 2024-12-09. :confetti_ball:
For reference, here are some details about the assignees on this issue:
- @suneox requires payment automatic offer (Reviewer)
- @huult requires payment automatic offer (Contributor)
@suneox @johncschuster @suneox 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]
BugZero Checklist:
- [ ] [Contributor] Classify the bug:
Bug classification
Source of bug:
- [ ] 1a. Result of the original design (eg. a case wasn't considered)
- [ ] 1b. Mistake during implementation
- [ ] 1c. Backend bug
- [ ] 1z. Other:
Where bug was reported:
- [ ] 2a. Reported on production
- [ ] 2b. Reported on staging (deploy blocker)
- [ ] 2c. Reported on both staging and production
- [ ] 2d. Reported on a PR
- [ ] 2z. Other:
Who reported the bug:
- [ ] 3a. Expensify user
- [ ] 3b. Expensify employee
- [ ] 3c. Contributor
- [ ] 3d. QA
- [ ] 3z. Other:
-
[ ] [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:
-
[ ] [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.
Regression Test Proposal Template
-
[ ] [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
Precondition:
Test:
Do we agree π or π
BugZero Checklist:
- [x] [Contributor] Classify the bug:
Bug classification
Source of bug:
- [ ] 1a. Result of the original design (eg. a case wasn't considered)
- [ ] 1b. Mistake during implementation
- [ ] 1c. Backend bug
- [x] 1z. Other: Existing issue on iOS
Where bug was reported:
- [x] 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
- [ ] 2b. Reported on staging (eg. found during regression or PR testing)
- [ ] 2d. Reported on a PR
- [ ] 2z. Other:
Who reported the bug:
- [ ] 3a. Expensify user
- [ ] 3b. Expensify employee
- [ ] 3c. Contributor
- [x] 3d. QA
- [ ] 3z. Other:
-
[x] [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: This issue related to ios issue, so we donβt have an offending PR.
-
[x] [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: N/A
-
[x] [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. N/A: It isn't an impactful bug
Payment has been issued. Thanks for your contributions! π