App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD #11768] [$16000] Desktop - The Back ⌘[ and Forward ⌘] shortcuts keys are not working as expected in LHN

Open isagoico opened this issue 5 years ago • 204 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


This issue has been split in two. This one is solely focused on the back/forward actions in LeftHandNav (LHN), the other https://github.com/Expensify/App/issues/8657 is focused on back/forward actions in the main chat window.

Action Performed:

  1. Open desktop app
  2. Navigate to several conversations
  3. Use the back ⌘[ and Forward ⌘] shortcuts

Expected Result:

Back ⌘[ and Forward ⌘] shortcuts should work and navigate through the previously navigated conversations and show correctly in LHN.

Actual Result:

Shortcuts are not working as expected.

Workaround:

User has to manually navigate through the conversations.

Platform:

Where is this issue occurring?

  • Desktop App

Version Number: 1.0.82-7

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

Notes/Photos/Videos: Any additional supporting documentation Unable to get a video atm. Will update with video later. Other issue for back/forward working correctly in the main chat window https://github.com/Expensify/App/issues/8657

Expensify/Expensify Issue URL:

View all open jobs on Upwork


From @mallenexpensify https://expensify.slack.com/archives/C01GTK53T8Q/p1628722621224600

The Back ⌘[ and Forward ⌘] shortcuts keys don't work properly on Desktop Version 1.0.82-7

isagoico avatar Aug 12 '21 18:08 isagoico

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

MelvinBot avatar Aug 12 '21 18:08 MelvinBot

@joelbettner Eep! 4 days overdue now. Issues have feelings too...

MelvinBot avatar Aug 17 '21 19:08 MelvinBot

@joelbettner , do you think this can be worked on by a contributor? If so, can you add the External label? Thx

mallenexpensify avatar Aug 17 '21 22:08 mallenexpensify

Sorry, I've been nose down in allocations. Yes, I think this can be worked on by a contributor.

joelbettner avatar Aug 18 '21 18:08 joelbettner

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

MelvinBot avatar Aug 18 '21 18:08 MelvinBot

Proposal

Here we have two options to configure this.

  1. the First Option is to register the keyboard short to with these keys to navigate back/forth in history using the History API 's back and forward methods.

for this, we have KeyboardShortcut lib. https://github.com/Expensify/App/blob/2b57f0fac59d007441fb170fd05445d83392ed86/src/libs/KeyboardShortcut/index.js

but we only have to activate these shortcuts for the desktop.

  1. the second option is to handle these shortcuts from the Main.js desktop file, it is a little involved but does the same this. First, we have to tap the keyboard events from the browserWindow using before-input-event event.
win.webContents.on('before-input-event', (event, input) 

Then we have to call web-contents#contentsgoback and web-contents#contentsgoforward to navigate. https://www.electronjs.org/docs/api/web-contents#contentsgoback

I think the first one is going to be easier.

parasharrajat avatar Aug 18 '21 18:08 parasharrajat

Upwork job

MitchExpensify avatar Aug 23 '21 16:08 MitchExpensify

@MitchExpensify I think this needs Exported label so that an engineer can review proposals.

parasharrajat avatar Aug 25 '21 00:08 parasharrajat

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

MelvinBot avatar Aug 25 '21 00:08 MelvinBot

@parasharrajat's proposal (Option 1) looks good, @MitchExpensify please hire them for this issue! 🙇

NikkiWines avatar Aug 25 '21 04:08 NikkiWines

Hired!

MitchExpensify avatar Aug 25 '21 16:08 MitchExpensify

@mallenexpensify Since you faced this issue. I would like to ask about your experience with it. I found out that the app already has these shortcuts in place.

parasharrajat avatar Aug 25 '21 17:08 parasharrajat

I don't know why it doesn't work consistently for me on desktop. It's via the keyboard shortcuts and also my back/forth keys on my logitech trackbacll, when don't have issues in other applications, mainly Chrome.
Any thoughts why that might be the case @parasharrajat ?

mallenexpensify avatar Aug 25 '21 21:08 mallenexpensify

There was a misunderstanding here. The app is already configured with these shortcuts in main.js so my proposal is invalid now. But, I would like to request @mallenexpensify to provide more concrete reproduction steps or information.

  1. When the keys don't work for you?
  2. What steps you followed when the keys stop working for you? e.g. went to grab a coffee, petting the cat, and then suddenly...
  3. Keys are working but there is someting wrong with the navigation order?

etc.

parasharrajat avatar Aug 26 '21 23:08 parasharrajat

went to grab a coffee, petting the cat, and then suddenly... hahahah, love it.

Here are some examples on Desktop

  • ⌘+k to chat with Mitch, type nothing
  • ⌘+k to go to chat with Scott, type nothing
  • ⌘[ goes back to a chat with Michelle, type nothing
  • ⌘] does nothing

Example 2

  • in chat with James, sending messages back/forth
  • ⌘+k to chat with my test account, type a message
  • ⌘[ goes back to chat with Michelle
  • ⌘] goes to chat with my test account
  • ⌘[ does nothing

ooooh, it might have to do with chat switcher, seems to work as expected when accessing chats via LHN

  • click Rajat in LHN
  • click Mitch in LHN
  • click Monte in LHN
  • ⌘[ goes to Mitch
  • ⌘[ goes to Rajat.
  • ⌘] goes to Mitch
  • ⌘] goes to Monte
  • ⌘[ goes nowhere (hahahhahahah)

Need/want more examples?

mallenexpensify avatar Aug 27 '21 00:08 mallenexpensify

Thank you for the steps. I will try 'em all.

parasharrajat avatar Aug 27 '21 00:08 parasharrajat

Feel free to send me test messages too

mallenexpensify avatar Aug 27 '21 00:08 mallenexpensify

I still have to dig more into this. I will update soon

parasharrajat avatar Sep 07 '21 13:09 parasharrajat

Hi @parasharrajat, I've placed this issue on hold as per this update, as we are prioritising issues related to a feature release scheduled for 9/24. As an apology for the delay, we will add a $100 bonus as a thank you for waiting.

kadiealexander avatar Sep 16 '21 04:09 kadiealexander

MevlinBot this isn't overdue

NikkiWines avatar Sep 16 '21 11:09 NikkiWines