App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2021-12-15] Search - Arrow navigation on search stops working

Open isagoico opened this issue 5 years ago • 17 comments

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:

  1. Press ctrl +k
  2. Enter something search
  3. Press the down arrow several times

Expected Result:

User should be able to navigate the search list with the arrow keys.

Actual Result:

Arrow keys stop working after some presses.

Workaround:

User needs to use cursor to select the desired user.

Platform:

Where is this issue occurring?

  • Web
  • Desktop App

Version Number: 1.1.10-0

Reproducible in staging?: Yes Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

https://user-images.githubusercontent.com/44479856/139509654-36406161-92e2-4e63-8798-ab40e724d50c.mp4

Expensify/Expensify Issue URL:

Issue reported by: @iwiznia Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1635526745251400

View all open jobs on GitHub

isagoico avatar Oct 29 '21 22:10 isagoico

Triggered auto assignment to @sketchydroide (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

MelvinBot avatar Oct 29 '21 22:10 MelvinBot

Hey, I found the root cause and here are some approaches to fix this issue!

Proposal

Root cause

We are dismissing the keyboard on scroll, and this has a side effect of unfocusing the TextInput (source here) which means our key presses for arrow keys cannot be handled by text input in OptionsSelector component.

https://github.com/Expensify/App/blob/973dcf4d6ef737630eeac61b57dbd95b183a092b/src/components/OptionsList.js#L243

Fix method 1

We can simply create index.native.js and index.js files for the OptionsList component.

The index.js file won't dismiss the keyboard on scroll, while the index.native.js would. i.e. Remove these props for index.js

https://github.com/Expensify/App/blob/973dcf4d6ef737630eeac61b57dbd95b183a092b/src/components/OptionsList.js#L242-L243 This is a straightforward solution and the one which I'm leaning towards.

Fix method 2

Instead of using Keyboard.dismiss(), create and use a new react native method Keyboard.hide() which hides the keyboard without losing focus onTextInput. But I highly doubt this would be merged into react native because on mobile, there is little utility in dismissing the keyboard and keeping text input focused.

rushatgabhane avatar Oct 31 '21 01:10 rushatgabhane

So I just confirmed this is happening on Desktop, and I think this is a bug and that it can be external.

sketchydroide avatar Nov 02 '21 11:11 sketchydroide

Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Nov 02 '21 11:11 MelvinBot

as a bug this should not be affected by our hold @arielgreen

sketchydroide avatar Nov 02 '21 11:11 sketchydroide

@sketchydroide, @arielgreen Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

MelvinBot avatar Nov 05 '21 19:11 MelvinBot

Triggered auto assignment to @Julesssss (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

MelvinBot avatar Nov 08 '21 19:11 MelvinBot

Posted job to Upwork - https://www.upwork.com/jobs/~01efbeab7e7a77a547

@Julesssss can you please also review @rushatgabhane's proposal above?

arielgreen avatar Nov 08 '21 19:11 arielgreen

Hi @rushatgabhane. I also think proposal 2 would be useful, but as it will be difficult to get merged let's go with 1. I think it's still a good solution.

@arielgreen please hire @rushatgabhane

Julesssss avatar Nov 08 '21 22:11 Julesssss

Pending hold lift.

arielgreen avatar Nov 18 '21 18:11 arielgreen

I am reviewing the PR, I have found one issue and I will let you know @Julesssss when this is ready for final review and possibly for merge. See More [extended for C+]

parasharrajat avatar Nov 18 '21 18:11 parasharrajat

Triggered auto assignment to @mallenexpensify (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

MelvinBot avatar Nov 19 '21 22:11 MelvinBot

@mallenexpensify reassigning, I'm off for mat leave!

arielgreen avatar Nov 19 '21 22:11 arielgreen

Merged, awaiting payment

Julesssss avatar Nov 30 '21 14:11 Julesssss

Whoops, the 7 day countdown doesn't start until deployment.

Julesssss avatar Nov 30 '21 17:11 Julesssss

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.18-3 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/6272
  • https://github.com/Expensify/App/pull/6272

If no regressions arise, payment will be issued on 2021-12-15. :confetti_ball:

botify avatar Dec 08 '21 19:12 botify

Paid @rushatgabhane , inc. $250 for Company Offsite Hold bonus.

mallenexpensify avatar Dec 18 '21 00:12 mallenexpensify