Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New keyboard shortcut for new Group chat #3754

Merged
merged 5 commits into from
Jun 28, 2021
Merged

New keyboard shortcut for new Group chat #3754

merged 5 commits into from
Jun 28, 2021

Conversation

rushatgabhane
Copy link
Member

@rushatgabhane rushatgabhane commented Jun 25, 2021

cc @Beamanator

Details

OS specific shortcut using libs/getOperatingSystem
To open new group chat.
Command + shift + K for MacOS
Control + shift + K for Windows/Linux.

To not allow extra key modifiers being pressed

const extraModifiers = _.difference(['shift', 'control', 'alt', 'meta'], callback.modifiers);
And then return early if they're being pressed.

Subscribe K to open new group chat.

On subscribing the key K

KeyboardShortcut.subscribe('K', () => {
    Navigation.navigate(ROUTES.NEW_GROUP);
}, ['control', 'shift'], true);

Contains of eventCallbacks are shown below. Which is why I loop over it.

image

I also changed shortcut for search on Windows,
from Win + K to Control + K as per the discussion on Slack.

Fixed Issues

$ #3349

Tests / QA

  1. Login
    • On Windows/ Linux, press Cltr + Shift + K to give focus to new group chat.
    • On MacOS, press Command + Shift + K to give focus to new group chat.

Tested On

Don't have a Mac to test Desktop app.

  • Web Windows
  • Web MacOS
  • Desktop

Not applicable (Mobile Web, iOS, Android)

Screenshots

Web

Screencast.from.25-06-21.03_00_46.PM.+03.mp4

Desktop

Don't have a mac :)

@rushatgabhane rushatgabhane requested a review from a team as a code owner June 25, 2021 12:34
@MelvinBot MelvinBot requested review from ctkochan22 and removed request for a team June 25, 2021 12:34
@ctkochan22 ctkochan22 merged commit eff095b into Expensify:main Jun 28, 2021
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging in version: 1.0.74-1🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants