App icon indicating copy to clipboard operation
App copied to clipboard

[$500] [LOW] IOS - Keypad appears for a moment in details page on saving Private notes

Open lanitochka17 opened this issue 1 year ago • 8 comments

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: Reproducible in staging?: Reproducible in production?: If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): [email protected] Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Slack conversation:

Action Performed:

Precondition: User has not saved Private notes

  1. Open a workspace #announce room
  2. Tap header link to go details page
  3. Select Private notes
  4. Enter notes & tap on Save button

Expected Result:

Keypad should not appear in details or settings page while saving Private notes

Actual Result:

Keypad appears for a moment in details/settings page while saving Private notes

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [ ] Android: Native
  • [ ] Android: mWeb Chrome
  • [ ] iOS: Native
  • [ ] iOS: mWeb Safari
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/92cf7644-89a5-462f-b5bc-242f2db291ff

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01d02b0565c21176af
  • Upwork Job ID: 1754200247556661248
  • Last Price Increase: 2024-02-04

lanitochka17 avatar Feb 04 '24 17:02 lanitochka17

Job added to Upwork: https://www.upwork.com/jobs/~01d02b0565c21176af

melvin-bot[bot] avatar Feb 04 '24 17:02 melvin-bot[bot]

Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)

melvin-bot[bot] avatar Feb 04 '24 17:02 melvin-bot[bot]

Triggered auto assignment to @bfitzexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

melvin-bot[bot] avatar Feb 04 '24 17:02 melvin-bot[bot]

We think that this bug might be related to #vip-vsp CC @quinthar

lanitochka17 avatar Feb 04 '24 17:02 lanitochka17

Proposal

Please re-state the problem that we are trying to solve in this issue.

iOS - Keypad appears for a moment in details page on saving Private notes

What is the root cause of that problem?

https://github.com/Expensify/App/blob/3ab4e6e12d9ff38e69493321f0d31f032481b373/src/pages/PrivateNotes/PrivateNotesEditPage.tsx#L158-L164 This happens because ref callback is called every time user inputs value, which triggers updateMultilineInputRange

What changes do you think we should make in order to solve the problem?

As this is supposed to call only once when page is first opened, add more condition in early return here:

     if (!el || privateNotesInput.current) { 
         return; 
     } 

mkhutornyi avatar Feb 04 '24 18:02 mkhutornyi

Looks like a very minor issue, @bfitzexpensify i think we can close it, wdyt?

getusha avatar Feb 06 '24 19:02 getusha

@getusha Agreed that it's very minor, but assuming there is a clear and easy solution, we should address this. What do you think of @mkhutornyi's proposal?

bfitzexpensify avatar Feb 06 '24 21:02 bfitzexpensify

Thanks! will test @mkhutornyi's proposal.

getusha avatar Feb 06 '24 22:02 getusha

@mkhutornyi are you able to reproduce this issue?

https://github.com/Expensify/App/assets/75031127/d811ed93-8b8e-4579-bde5-50c2c672a7b2

getusha avatar Feb 07 '24 19:02 getusha

@getusha yes, still reproducible on latest main

https://github.com/Expensify/App/assets/97676131/989d74d0-373b-49fb-8eba-59a0286d9a29

mkhutornyi avatar Feb 07 '24 20:02 mkhutornyi

Still not able to repro, what's the your iOS version?

getusha avatar Feb 07 '24 20:02 getusha

Still not able to repro, what's the your iOS version?

iOS 16.4 iPhone 14 Plus Simulator

mkhutornyi avatar Feb 07 '24 20:02 mkhutornyi

asked for other c+ https://expensify.slack.com/archives/C02NK2DQWUX/p1707408881410369

getusha avatar Feb 08 '24 16:02 getusha

@getusha this is reproducible not only on this page but also other pages which have multiline input

i.e. on room description page:

https://github.com/Expensify/App/assets/108292595/2bb4c861-51d9-4987-8cb1-05aeb1afb178

situchan avatar Feb 08 '24 16:02 situchan

The proposed solution doesn't fix issue completely

situchan avatar Feb 08 '24 16:02 situchan

Another reproducible case: (swipe left to go back)

This even doesn't require text input change.

https://github.com/Expensify/App/assets/108292595/0ec5e69f-3b63-4209-9713-e0589b238b6b

situchan avatar Feb 08 '24 16:02 situchan

Please let me know if it's still not reproducible for you. If still, I can take over.

situchan avatar Feb 08 '24 16:02 situchan

@situchan I missed your comment there! @mananjadhav offered to take over.

I'm still unable to reproduce

https://github.com/Expensify/App/assets/75031127/90b0160b-de89-4576-b7a1-3f722a3c40d0

getusha avatar Feb 08 '24 16:02 getusha

I am able to reproduce. Will check the proposal in a while.

mananjadhav avatar Feb 08 '24 16:02 mananjadhav

Were you able to review the proposal @mananjadhav?

bfitzexpensify avatar Feb 12 '24 10:02 bfitzexpensify

Based on the previous comment it looks like the proposal doesn't work. Open for proposals.

mananjadhav avatar Feb 12 '24 13:02 mananjadhav

No proposals yet - will leave this open for another week, but if we get no traction, I'll raise it in Slack before we double the price given how minor it is.

bfitzexpensify avatar Feb 15 '24 04:02 bfitzexpensify

@mananjadhav @bfitzexpensify this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

melvin-bot[bot] avatar Feb 18 '24 15:02 melvin-bot[bot]

Still awaiting proposals

bfitzexpensify avatar Feb 19 '24 05:02 bfitzexpensify

Same update - still awaiting proposals

bfitzexpensify avatar Feb 21 '24 05:02 bfitzexpensify

Doubling this - I think the behaviour in https://github.com/Expensify/App/issues/35779#issuecomment-1934479361 is worse than the scenario in the OP and makes this something worth addressing.

bfitzexpensify avatar Feb 23 '24 05:02 bfitzexpensify

Upwork job price has been updated to $1000

melvin-bot[bot] avatar Feb 23 '24 05:02 melvin-bot[bot]

Proposal

Please re-state the problem that we are trying to solve in this issue.

IOS - Keypad appears for a moment in details page on saving Private notes

What is the root cause of that problem?

We are dismissing the keyboard and immediately navigating without waiting for the dismissing of the keyboard here https://github.com/Expensify/App/blob/29ad8787c7c889271c117dd4420109f9be8e180d/src/pages/PrivateNotes/PrivateNotesEditPage.tsx#L103-L108

What alternative solutions did you explore? (Optional)

We need to navigate under runAfterInteraction, change it to

        Keyboard.dismiss();
        InteractionManager.runAfterInteractions(() => {
            if (!Object.values<Note>({...report.privateNotes, [route.params.accountID]: {note: editedNote}}).some((item) => item.note)) {
                ReportUtils.navigateToDetailsPage(report);
            } else {
                Navigation.goBack(ROUTES.PRIVATE_NOTES_LIST.getRoute(report.reportID));
            }
        });

But to avoid unnecessary delay of navigation where there is no on screen keyboards (like for web and desktop) we will only use it only if canUseTouchScreen is true. (Or if we want it to apply to ios only we can also use it as the condition) BTW we have already used this method here https://github.com/Expensify/App/blob/29ad8787c7c889271c117dd4420109f9be8e180d/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js#L225-L230

FitseTLT avatar Feb 23 '24 13:02 FitseTLT

@mananjadhav @bfitzexpensify this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

melvin-bot[bot] avatar Feb 25 '24 15:02 melvin-bot[bot]

@mananjadhav, @bfitzexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] avatar Feb 26 '24 15:02 melvin-bot[bot]