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

[HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP #27449

Closed
2 tasks done
stephanieelliott opened this issue Sep 14, 2023 · 41 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Design External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.

Comments

@stephanieelliott
Copy link
Contributor

stephanieelliott commented Sep 14, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

Click CMD + J to open the keyboard shortcuts menu

Expected Result:

The keyboard shortcuts menu opens in the RHP

image

Actual Result:

The keyboard shortcuts menu opens as a modal in the middle of the browser window like this:

image

Workaround:

n/a

Platforms:

  • Web
  • Desktop App
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018fa7bda44a6beb13
  • Upwork Job ID: 1704930075112583168
  • Last Price Increase: 2023-09-21
  • Automatic offers:
    • samh-nl | Contributor | 26988957
@stephanieelliott stephanieelliott added Daily KSv2 NewFeature Something to build that is a new item. Design labels Sep 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

@melvin-bot
Copy link

melvin-bot bot commented Sep 14, 2023

Triggered auto assignment to @shawnborton (Design), see these Stack Overflow questions for more details.

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Sep 14, 2023
@stephanieelliott
Copy link
Contributor Author

Tagging in @shawnborton for mockup of what the shortcut menu should look like in the RHP

@samh-nl
Copy link
Contributor

samh-nl commented Sep 14, 2023

Proposal

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

Display keyboard shortcuts menu in the RHP

What is the root cause of that problem?

The keyboard shortcuts modal uses a deviating implementation compared to other pages.

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

  1. Remove <KeyboardShortcutsModal /> from Expensify.js
  2. In main.js, rename showKeyboardShortcutsModal to showKeyboardShortcutsPage
  3. In main.js, rename ELECTRON_EVENTS.SHOW_KEYBOARD_SHORTCUTS_MODAL to SHOW_KEYBOARD_SHORTCUTS_PAGE
  4. Make a new page component KeyboardShortcutsPage and add it to both ModalStackNavigators and RightModalNavigator
  5. In AuthScreens, listen to the keyboard shortcut and navigate to the page when triggered, in a similar fashion to how we do so for the search page. We should define a new route, e.g. ROUTES.KEYBOARD_SHORTCUTS.

this.unsubscribeSearchShortcut = KeyboardShortcut.subscribe(
searchShortcutConfig.shortcutKey,
() => {
Modal.close(() => {
if (Navigation.isActiveRoute(ROUTES.SEARCH)) {
return;
}
return Navigation.navigate(ROUTES.SEARCH);
});
},
searchShortcutConfig.descriptionKey,
searchShortcutConfig.modifiers,
true,
);

  1. Similar to the current modal, we fetch the shortcuts from KeyboardShortcut.getDocumentedShortcuts() upon mount and set this to state. Subsequently, we iterate and render the shortcuts. E.g.:
const renderShortcut = (shortcut) => (
    <View key={shortcut.displayName} style={styles.mb5}>
        <View style={styles.mb1}>
            <Text>{shortcut.displayName}</Text>
        </View>
        <View>
            <Text style={styles.textLabelSupporting}>{translate(`keyboardShortcutModal.shortcuts.${shortcut.descriptionKey}`)}</Text>
        </View>
    </View>
);
  1. Finally, we cleanup various things that are no longer relevant, including:
  • StyleUtils.getKeyboardShortcutsModalWidth
  • Style definitions: styles.keyboardShortcutModalContainer, styles.keyboardShortcutTableWrapper, styles.keyboardShortcutTableContainer
  • ONYXKEYS.IS_SHORTCUTS_MODAL_OPEN
  • The file KeyboardShortcuts.js in libs/actions/

What alternative solutions did you explore? (Optional)

Alternatively, we can implement it as a right-docked modal. However, this does not inherently add a backdrop (<Overlay />). This could be added, but extra logic would have to be put in place to ensure it does not cause a double backdrop in the case that the RHP was already open.

  1. In KeyboardShortcutsModal, we change modalType to CONST.MODAL.MODAL_TYPE.RIGHT_DOCKED.
  2. Remove the isSmallScreenWidth prop
  3. Remove the innerContainerStyle prop that is passed to the Modal component
  4. To render the left-arrow rather than close button, remove shouldShowCloseButton and shouldShowBackButton={false} from HeaderWithBackButton. Furthermore, replace onCloseButtonPress with onBackButtonPress.
  5. Remove the <View style={[styles.keyboardShortcutTableWrapper]}> wrapper.
  6. Remove the styles (i.e. styles.keyboardShortcutTableContainer) applied to the inner View component.
  7. Update renderRow (same as step 6 above).
  8. In styles.js/StyleUtils, cleanup the removed styles.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Sep 14, 2023
@stephanieelliott stephanieelliott changed the title [$500] Display keyboard shortcuts menu in the RHP [HOLD] Display keyboard shortcuts menu in the RHP Sep 14, 2023
@shawnborton
Copy link
Contributor

I think something simple like this would do the trick, cc @Expensify/design

image

@samh-nl
Copy link
Contributor

samh-nl commented Sep 15, 2023

We currently toggle the modal if CMD+J is pressed again. Is it the intention to maintain this behavior (strictly speaking, the description only states that it will open it)?

I have also updated my proposal with some additional details.

@puneetlath
Copy link
Contributor

I think it'd be like CMD+K. It opens the page, but doesn't close it.

@melvin-bot melvin-bot bot added the Overdue label Sep 18, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 20, 2023

@shawnborton, @stephanieelliott Eep! 4 days overdue now. Issues have feelings too...

@shawnborton
Copy link
Contributor

I think we can take this off hold and start moving things forward.

@melvin-bot melvin-bot bot removed the Overdue label Sep 21, 2023
@stephanieelliott
Copy link
Contributor Author

Thanks for the mock @shawnborton! Taking this off hold and adding the External label

@stephanieelliott stephanieelliott added the External Added to denote the issue can be worked on by a contributor label Sep 21, 2023
@melvin-bot melvin-bot bot changed the title [HOLD] Display keyboard shortcuts menu in the RHP [$500] [HOLD] Display keyboard shortcuts menu in the RHP Sep 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 21, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018fa7bda44a6beb13

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 21, 2023

Current assignee @stephanieelliott is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Oct 11, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @samh-nl got assigned: 2023-10-02 22:17:46 Z
  • when the PR got merged: 2023-10-11 22:20:24 UTC
  • days elapsed: 7

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 13, 2023
@melvin-bot melvin-bot bot changed the title [$500] Display keyboard shortcuts menu in the RHP [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP Oct 13, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-20. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 13, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP Oct 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 13, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.83-11 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-20. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-23. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Oct 16, 2023
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-23] [HOLD for payment 2023-10-20] [HOLD for payment 2023-10-20] [$500] Display keyboard shortcuts menu in the RHP Oct 16, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 16, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.84-10 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2023-10-23. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

For reference, here are some details about the assignees on this issue:

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Oct 20, 2023
@eVoloshchak
Copy link
Contributor

Requested the payment via NewDot

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@stephanieelliott
Copy link
Contributor Author

Summarizing payment on this issue:

  • Issue reporter: N/A
  • Contributor: @samh-nl $500 (pay via Upwork)
  • Contributor+: @eVoloshchak $500 (request via NewDot)

Upwork job is here, no bonus is included on final payout

@JmillsExpensify
Copy link

$500 payment approved for @eVoloshchak based on summary above.

@stephanieelliott
Copy link
Contributor Author

All paid!

Copy link

melvin-bot bot commented Feb 2, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Design External Added to denote the issue can be worked on by a contributor NewFeature Something to build that is a new item.
Projects
None yet
Development

No branches or pull requests

8 participants