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-03-09] [$4000] Opening search using the keyboard shortcut (ctrl+k) while options for adding payment method are visible, options overlap with search. #14889

Closed
1 task
kavimuru opened this issue Feb 6, 2023 · 64 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Feb 6, 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:

  1. navigate to settings ->payments
  2. Click on "Add payment method"
  3. Press (ctrl+k) on the keyboard

Expected Result:

options for adding payment method should not appear (Overlap) on search page

Actual Result:

options for adding payment method appear (Overlap) on search page

Workaround:

unknown

Platforms:

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

  • MacOS / Chrome / Safari

Version Number: 1.2.66-0
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

2023-02-07.00-39-17.mp4
Recording.1457.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Harshdeepjoshi
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1675711618695179

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0106757eb17dcdb76c
  • Upwork Job ID: 1622740955154911232
  • Last Price Increase: 2023-02-20
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 6, 2023
@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot locked and limited conversation to collaborators Feb 6, 2023
@MelvinBot
Copy link

MelvinBot commented Feb 6, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Feb 6, 2023
@melvin-bot melvin-bot bot unlocked this conversation Feb 6, 2023
@melvin-bot melvin-bot bot changed the title Opening search using the keyboard shortcut (ctrl+k) while options for adding payment method are visible, options overlap with search. [$1000] Opening search using the keyboard shortcut (ctrl+k) while options for adding payment method are visible, options overlap with search. Feb 6, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~0106757eb17dcdb76c

@MelvinBot
Copy link

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

@MelvinBot
Copy link

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

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

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

@allroundexperts
Copy link
Contributor

allroundexperts commented Feb 7, 2023

Proposal

RCA

When a stack navigator route is opened, it does not unmount the previous stack navigator route. Instead, the previous route remains open. In this case, the Popover component of the previous route has a z-Index of 99999 which is higher than the z-index of the new stack navigator screen. Since there is no click involved in opening the search screen and popover menu has a z-index too high, the popover menu keeps on showing up even when the search page is opened.

Solutions

There can be multiple solutions here depending on the testing effort we want to put into this.

  1. We can add another KeyboardShortcut listener for CMD+K and CMD+SHIFT+K in the BasePaymentsPage where when called, it will set the shouldShowAddPaymentMenu to false. This will cause the popup to close whenever the shortcut is pressed. This is the most failsafe approach as it will not impact any other place.
diff --git a/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js b/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js
index 9a480454ea..36a65d23a0 100644
--- a/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js
+++ b/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js
@@ -34,6 +34,7 @@ import OfflineWithFeedback from '../../../../components/OfflineWithFeedback';
 import ConfirmContent from '../../../../components/ConfirmContent';
 import Button from '../../../../components/Button';
 import themeColors from '../../../../styles/themes/default';
+import KeyboardShortcut from '../../../../libs/KeyboardShortcut';
 
 class BasePaymentsPage extends React.Component {
     constructor(props) {
@@ -73,6 +74,18 @@ class BasePaymentsPage extends React.Component {
 
     componentDidMount() {
         this.fetchData();
+        const searchShortcutConfig = CONST.KEYBOARD_SHORTCUTS.SEARCH;
+        const groupShortcutConfig = CONST.KEYBOARD_SHORTCUTS.NEW_GROUP;
+
+        // Listen for the key K being pressed so that focus can be given to
+        // the chat switcher, or new group chat
+        // based on the key modifiers pressed and the operating system
+        this.unsubscribeSearchShortcut = KeyboardShortcut.subscribe(searchShortcutConfig.shortcutKey, () => {
+            this.hideAddPaymentMenu();
+        }, searchShortcutConfig.descriptionKey, searchShortcutConfig.modifiers, true, true, undefined, false);
+        this.unsubscribeGroupShortcut = KeyboardShortcut.subscribe(groupShortcutConfig.shortcutKey, () => {
+            this.hideAddPaymentMenu();
+        }, groupShortcutConfig.descriptionKey, groupShortcutConfig.modifiers, true, true, undefined, false);
     }
 
     componentDidUpdate(prevProps) {
@@ -95,6 +108,15 @@ class BasePaymentsPage extends React.Component {
         this.fetchData();
     }
 
+    componentWillUnmount() {
+        if (this.unsubscribeSearchShortcut) {
+            this.unsubscribeSearchShortcut();
+        }
+        if (this.unsubscribeGroupShortcut) {
+            this.unsubscribeGroupShortcut();
+        }
+    }
+
     setShouldShowLoadingSpinner() {
         // In order to prevent a loop, only update state of the spinner if there is a change
         const shouldShowLoadingSpinner = this.props.isLoadingPaymentMethods || false;
  1. z-Index of the popover can be decreased such that when the new screen opens, the popover menu stays behind it. We'll decrease the z-index for popover only (not the modal). This will require more QA effort to make sure that we did not break anything elsewhere.

Result

Screen.Recording.2023-02-07.at.5.44.36.AM.mov

@priyeshshah11
Copy link
Contributor

priyeshshah11 commented Feb 7, 2023

Proposal

Problem

This issue occurs for all the modals i.e. all modals stay open when any keyboard shortcuts are triggered.

Solution

We should close all the modals/popovers before opening any new modals or navigating to new routes by calling Navigation.dismissModal(). Currently, the places I can think of are before navigating to Search, New Group & Shortcut Modal.

diff --git a/src/components/KeyboardShortcutsModal.js b/src/components/KeyboardShortcutsModal.js
index c45ced82f..1f4c39b42 100644
--- a/src/components/KeyboardShortcutsModal.js
+++ b/src/components/KeyboardShortcutsModal.js
@@ -15,6 +15,7 @@ import compose from '../libs/compose';
 import KeyboardShortcut from '../libs/KeyboardShortcut';
 import * as KeyboardShortcutsActions from '../libs/actions/KeyboardShortcuts';
 import ONYXKEYS from '../ONYXKEYS';
+import Navigation from '../libs/Navigation/Navigation';
 
 const propTypes = {
     /** prop to set shortcuts modal visibility */
@@ -35,6 +36,7 @@ class KeyboardShortcutsModal extends React.Component {
     componentDidMount() {
         const shortcutConfig = CONST.KEYBOARD_SHORTCUTS.SHORTCUT_MODAL;
         this.unsubscribeShortcutModal = KeyboardShortcut.subscribe(shortcutConfig.shortcutKey, () => {
+            Navigation.dismissModal();
             KeyboardShortcutsActions.showKeyboardShortcutModal();
         }, shortcutConfig.descriptionKey, shortcutConfig.modifiers, true);
     }
diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js
index 58fae5f8b..f32694d08 100644
--- a/src/libs/Navigation/AppNavigator/AuthScreens.js
+++ b/src/libs/Navigation/AppNavigator/AuthScreens.js
@@ -113,9 +113,11 @@ class AuthScreens extends React.Component {
         // the chat switcher, or new group chat
         // based on the key modifiers pressed and the operating system
         this.unsubscribeSearchShortcut = KeyboardShortcut.subscribe(searchShortcutConfig.shortcutKey, () => {
+            Navigation.dismissModal();
             Navigation.navigate(ROUTES.SEARCH);
         }, searchShortcutConfig.descriptionKey, searchShortcutConfig.modifiers, true);
         this.unsubscribeGroupShortcut = KeyboardShortcut.subscribe(groupShortcutConfig.shortcutKey, () => {
+            Navigation.dismissModal();
             Navigation.navigate(ROUTES.NEW_GROUP);
         }, groupShortcutConfig.descriptionKey, groupShortcutConfig.modifiers, true);
     }

@MelvinBot
Copy link

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@bernhardoj
Copy link
Contributor

Proposal

Yes, it is indeed happening to all modal, except for FAB. We already have a fix only for FAB and we can use that by moving the part of the logic to the modal component instead. The logic that we need move to the modal component is when the screen focus is changed, we then close the modal. We can't move the drawer state logic from FAB because not all modal is inside a drawer navigator, so that logic is still there on the FAB component.

componentDidUpdate(prevProps) {
if (!this.didScreenBecomeInactive(prevProps)) {
return;
}
// Hide menu manually when other pages are opened using shortcut key
this.hideCreateMenu();
}
/**
* Check if LHN status changed from active to inactive.
* Used to close already opened FAB menu when open any other pages (i.e. Press Command + K on web).
*
* @param {Object} prevProps
* @return {Boolean}
*/
didScreenBecomeInactive(prevProps) {
// When the Drawer gets closed and ReportScreen is shown
if (!this.props.isDrawerOpen && prevProps.isDrawerOpen) {
return true;
}
// When any other page is opened over LHN
if (!this.props.isFocused && prevProps.isFocused) {
return true;
}
return false;
}

diff --git a/src/components/Modal/BaseModal.js b/src/components/Modal/BaseModal.js
index 1b58579f93..c3bf01e25e 100644
--- a/src/components/Modal/BaseModal.js
+++ b/src/components/Modal/BaseModal.js
@@ -10,9 +10,13 @@ import {propTypes as modalPropTypes, defaultProps as modalDefaultProps} from './
 import * as Modal from '../../libs/actions/Modal';
 import getModalStyles from '../../styles/getModalStyles';
 import variables from '../../styles/variables';
+import compose from '../../libs/compose';
+import withNavigationFocus, {withNavigationFocusPropTypes} from '../withNavigationFocus';
+import withNavigationFallback from '../withNavigationFallback';
 
 const propTypes = {
     ...modalPropTypes,
+    ...withNavigationFocusPropTypes,
 
     /** The ref to the modal container */
     forwardedRef: PropTypes.func,
@@ -31,6 +35,13 @@ class BaseModal extends PureComponent {
     }
 
     componentDidUpdate(prevProps) {
+        if (this.didScreenBecomeInactive(prevProps)) {
+            // Hide popover manually when other pages are opened using shortcut key
+            if (this.props.isVisible) {
+                this.props.onClose();
+            }
+        }
+
         if (prevProps.isVisible === this.props.isVisible) {
             return;
         }
@@ -43,6 +54,22 @@ class BaseModal extends PureComponent {
         this.hideModal(this.props.isVisible);
     }
 
+    /**
+     * Check if page status changed from active to inactive.
+     * Used to close already opened popover when open any other pages (i.e. Press Command + K on web).
+     *
+     * @param {Object} prevProps
+     * @return {Boolean}
+     */
+    didScreenBecomeInactive(prevProps) {
+        // When any other page is opened over the page
+        if (!this.props.isFocused && prevProps.isFocused) {
+            return true;
+        }
+
+        return false;
+    }
+
     /**
      * Hides modal
      * @param {Boolean} [callHideCallback=true] Should we call the onModalHide callback
@@ -166,7 +193,10 @@ class BaseModal extends PureComponent {
 BaseModal.propTypes = propTypes;
 BaseModal.defaultProps = defaultProps;
 
-export default React.forwardRef((props, ref) => (
+export default compose(
+    withNavigationFallback,
+    withNavigationFocus,
+)(React.forwardRef((props, ref) => (
     // eslint-disable-next-line react/jsx-props-no-spreading
     <BaseModal {...props} forwardedRef={ref} />
-));
+)));
diff --git a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
index 6fe0447ef4..c999e68275 100644
--- a/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
+++ b/src/pages/home/sidebar/SidebarScreen/FloatingActionButtonAndPopover.js
@@ -99,11 +99,6 @@ class FloatingActionButtonAndPopover extends React.Component {
             return true;
         }
 
-        // When any other page is opened over LHN
-        if (!this.props.isFocused && prevProps.isFocused) {
-            return true;
-        }
-
         return false;
     }
 

However, it does not cover the case for keyboard shortcut modal. When open the keyboard shortcut from Settings > About and we press ctrl+k for example, the keyboard shortcut modal will not be closed because the screen focus where the keyboard shortcut modal resides does not change. That is because KeyboardShortcutModal is placed inside SidebarScreen component.

When we open Settings > About, the sidebar screen isFocused will be changed to false already and when we open another page from the shortcut, the focus state will not be changed. So, we need to manually hide the keyboard shortcut modal when the new group/chat shortcut is executed.

render() {
return (
<ScreenWrapper
includeSafeAreaPaddingBottom={false}
style={[styles.sidebar]}
>
{({insets}) => (
<>
<View style={[styles.flex1]}>
<SidebarLinks
onLinkClick={this.startTimer}
insets={insets}
onAvatarClick={this.navigateToSettings}
isSmallScreenWidth={this.props.isSmallScreenWidth}
isDrawerOpen={this.props.isDrawerOpen}
reportIDFromRoute={this.props.reportIDFromRoute}
onLayout={this.props.onLayout}
/>
</View>
<KeyboardShortcutsModal />

diff --git a/src/libs/Navigation/AppNavigator/AuthScreens.js b/src/libs/Navigation/AppNavigator/AuthScreens.js
index 58fae5f8b4..bf44befe49 100644
--- a/src/libs/Navigation/AppNavigator/AuthScreens.js
+++ b/src/libs/Navigation/AppNavigator/AuthScreens.js
@@ -30,6 +30,7 @@ import defaultScreenOptions from './defaultScreenOptions';
 import * as App from '../../actions/App';
 import * as Download from '../../actions/Download';
 import * as Session from '../../actions/Session';
+import * as KeyboardShortcutsActions from '../../actions/KeyboardShortcuts';
 
 let currentUserEmail;
 Onyx.connect({
@@ -114,9 +115,11 @@ class AuthScreens extends React.Component {
         // based on the key modifiers pressed and the operating system
         this.unsubscribeSearchShortcut = KeyboardShortcut.subscribe(searchShortcutConfig.shortcutKey, () => {
             Navigation.navigate(ROUTES.SEARCH);
+            KeyboardShortcutsActions.hideKeyboardShortcutModal();
         }, searchShortcutConfig.descriptionKey, searchShortcutConfig.modifiers, true);
         this.unsubscribeGroupShortcut = KeyboardShortcut.subscribe(groupShortcutConfig.shortcutKey, () => {
             Navigation.navigate(ROUTES.NEW_GROUP);
+            KeyboardShortcutsActions.hideKeyboardShortcutModal();
         }, groupShortcutConfig.descriptionKey, groupShortcutConfig.modifiers, true);
     }
 

Result

Screen.Recording.2023-02-06.at.19.31.36.mov

@onceLearner
Copy link

Proposal

Problem

When a popover menus are opened, triggering the search with keyboard shortcuts keep them opened.

Solution

Attach Keyboard listeners to close the popover menu once the keyboard is triggered.
Changes will be made to src/components/PopoverMenu/index.js.
So joining @allroundexperts proposal while adding more customization.

image

Then a method to remove the listeners:
image

Screen

Screen.Recording.2023-02-07.at.05.25.07.1.mov

@Snehal-Techforce
Copy link

Proposal

Problem:
Modals stay open when any keyboard shortcuts are triggered.

Root Cause: In the AuthScreens.js file, the code is missing to dismiss the previously opened modal in the keyboard shortcut listeners.

image

Solution: Navigation.dismissModal() needs to add on below place in AuthScreens.js file, in order to close old modal when new modal arise.

image

@melvin-bot melvin-bot bot added the Overdue label Feb 9, 2023
@aimane-chnaif
Copy link
Contributor

reviewing proposals today

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Feb 9, 2023
@situchan
Copy link
Contributor

Proposal

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

Press Ctrl+K on keyboard when any popover modal shows. Search page opens but it's behind popover and not active until popover is closed manually.

What is the root cause of that problem?

There are 3 keyboard shortcuts to open new page: Search, New group, Shortcut modal.
Since keyboard shortcut works everywhere, this also works when any modal is open.
Modal is always top priority in view hierarchy so new page which is opened later is still behind modal.
We didn't handle this case from the beginning when keyboard shortcut is implemented.

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

The solution is to close any popover open which prevents new page being being active.

1. Close any popover when Search page (Ctrl+K) or New group page (Ctrl+Shift+K) is opening
The ideal component to handle this case is PopoverMenu.
There's already existing code of handling ENTER shortcut key in attachKeyboardListener when visible, removeKeyboardListener when invisible.

attachKeyboardListener() {
const shortcutConfig = CONST.KEYBOARD_SHORTCUTS.ENTER;
this.unsubscribeEnterKey = KeyboardShortcut.subscribe(shortcutConfig.shortcutKey, () => {
if (this.state.focusedIndex === -1) {
return;
}
this.selectItem(this.props.menuItems[this.state.focusedIndex]);
this.setState({focusedIndex: -1}); // Reset the focusedIndex on selecting any menu
}, shortcutConfig.descriptionKey, shortcutConfig.modifiers, true);
}
removeKeyboardListener() {
if (!this.unsubscribeEnterKey) {
return;
}
this.unsubscribeEnterKey();
}

We can use similar approach for NEW_GROUP, SEARCH shortcuts. So in subscribe callback, just call this.props.onClose() to close modal.

2. Close any popver when Shortcut modal is opening
We can use same approach as 1. but there's already existing flag saved in Onyx so we can use this without subscribing another listener: isShortcutsModalOpen: {key: ONYXKEYS.IS_SHORTCUTS_MODAL_OPEN},

componentDidUpdate(prevProps) {
if (this.props.isVisible === prevProps.isVisible) {
return;
}
if (this.props.isVisible) {
this.attachKeyboardListener();
} else {
this.removeKeyboardListener();
}
}

We can catch shortcut modal opened state in componentDidUpdate of PopoverMenu and call this.props.onClose() to close popover.

3. Close shortcut modal when Search page or New group page is opening
SEARCH, NEW_GROUP shortcut key event listeners are added in AuthScreens so we can use this to hide keyboard shortcut modal.

this.unsubscribeSearchShortcut = KeyboardShortcut.subscribe(searchShortcutConfig.shortcutKey, () => {
Navigation.navigate(ROUTES.SEARCH);
}, searchShortcutConfig.descriptionKey, searchShortcutConfig.modifiers, true);
this.unsubscribeGroupShortcut = KeyboardShortcut.subscribe(groupShortcutConfig.shortcutKey, () => {
Navigation.navigate(ROUTES.NEW_GROUP);
}, groupShortcutConfig.descriptionKey, groupShortcutConfig.modifiers, true);

Just call KeyboardShortcutsActions.hideKeyboarShortcutModal() in subscribe callbacks.

Demo:

demo.mov

@priyeshshah11
Copy link
Contributor

@aimane-chnaif any updates/feedback on the proposals above?

@aimane-chnaif
Copy link
Contributor

No acceptable proposal found yet for general solution. I will answer to each proposal today

@melvin-bot melvin-bot bot removed the Overdue label Feb 13, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Opening search using the keyboard shortcut (ctrl+k) while options for adding payment method are visible, options overlap with search. [$2000] Opening search using the keyboard shortcut (ctrl+k) while options for adding payment method are visible, options overlap with search. Feb 13, 2023
@priyeshshah11
Copy link
Contributor

priyeshshah11 commented Feb 21, 2023

@aimane-chnaif why do you think adding a new ONYK key is not a good/better solution when we already use ONYX keys even for something as simple as displaying a particular modal e.g. Keyboard shortcuts modal

@situchan
Copy link
Contributor

Using onyx value to get modal open/closed status is not recommended at all.
We don't guarantee that this weird issue won't happen on all modals.

bug.mov

2 issues in this video:

  • Currently open modal is still open after refreshing page or visit same url on another tab on same browser (Is this a bug?)
  • Some contents of keyboard shortcut modal are hidden until refresh

@priyeshshah11
Copy link
Contributor

@situchan yes that looks like a weird bug, but I still don't understand what does that have to do with using onyx or not? Are you saying that using onyx is the cause of this weird issue?

@priyeshshah11
Copy link
Contributor

Updated Proposal

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

Avoid the popovers & modals from being displayed over the most recently opened modal.

What is the root cause of that problem?

The root cause of the problem is that we don't dismiss those popovers & modals before opening the new modal thus it appears over it.

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

If we are really concerned about adding new onyx keys then we can can use the lib actions approach where we keep track of BaseModal's & Popover's onClose function & call it before we trigger the keyboard shortcuts for search & new group.

@aimane-chnaif This proposal doesn't close the context menu, it still appears over the side panels.

@aimane-chnaif
Copy link
Contributor

@aimane-chnaif why do you think adding a new ONYK key is not a good/better solution when we already use ONYX keys even for something as simple as displaying a particular modal e.g. Keyboard shortcuts modal

ONYXKEYS.IS_SHORTCUTS_MODAL_OPEN was introduced for another purpose (not to solve modal overlap issue) - to open shortcut modal from anywhere across the app, especially from shortcut key event.
Any other modals don't need visible state to be saved in Onyx since their lifecycle exists only on specific pages.

@priyeshshah11 If we introduce new onyx key for every modal, I am curious what will be key and what will be value?

Then we just update the Popover component to replace the isShortcutsModalOpen key with our new key

This should be in BaseModal component. Just Popover still doesn't handle this case.

#14889 (comment) doesn't close the context menu, it still appears over the side panels.

What do you mean? Can you share video? Also, don't post proposal similar to previous ones.

@priyeshshah11
Copy link
Contributor

@aimane-chnaif I got your point about the shortcuts modal open key, thanks for explaining.

@priyeshshah11 If we introduce new onyx key for every modal, I am curious what will be key and what will be value?

The new key can be called isClosableModalOrPopoverOpen or some better word than close, the value should simply be a boolean. And yes, you're correct it should be applied to both BaseModal & Popover as per my latest proposal.

What do you mean? Can you share video? Also, don't post proposal similar to previous ones.

I am talking about this

Screen Shot 2023-02-22 at 1 26 16 AM

With the new approach a lot of proposals are going to be similar with some differences, so what do you want me to do when I see issues/improvements with current proposals? we're definitely not supposed to edit proposals once posted.

@situchan
Copy link
Contributor

I am talking about this

Screen Shot 2023-02-22 at 1 26 16 AM

It's working well for me. I already tested this case as well before posing proposal.
Even though it's not working, it can be fixed while working on PR if it's a minor issue. Proposal is just POC.

@puneetlath
Copy link
Contributor

I think @situchan's proposal sounds good too. Let's do it.

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

📣 @situchan You have been assigned to this job by @puneetlath!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@MelvinBot
Copy link

@puneetlath, @aimane-chnaif, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@aimane-chnaif
Copy link
Contributor

Not overdue. Waiting for PR to hit production

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Mar 2, 2023
@melvin-bot melvin-bot bot changed the title [$4000] Opening search using the keyboard shortcut (ctrl+k) while options for adding payment method are visible, options overlap with search. [HOLD for payment 2023-03-09] [$4000] Opening search using the keyboard shortcut (ctrl+k) while options for adding payment method are visible, options overlap with search. Mar 2, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 2, 2023
@MelvinBot
Copy link

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

@MelvinBot
Copy link

MelvinBot commented Mar 2, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.77-4 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-03-09. 🎊

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.

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

@MelvinBot
Copy link

MelvinBot commented Mar 2, 2023

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@aimane-chnaif / @puneetlath] The PR that introduced the bug has been identified. Link to the PR: n/a
  • [@aimane-chnaif / @puneetlath] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: n/a
  • [@aimane-chnaif / @puneetlath] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: n/a
  • [@situchan] Propose regression test steps to ensure the same bug will not reach production again.
  • [@puneetlath] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: added to general testing guidelines doc, since I think it makes more sense there than in a regression test

@puneetlath
Copy link
Contributor

@situchan @Harshdeepjoshi can you please apply to the Upwork job? https://www.upwork.com/jobs/~0106757eb17dcdb76c

@aimane-chnaif can you please help with the checklist?

Thanks!

@aimane-chnaif
Copy link
Contributor

I don't think any PR caused regression.
This issue existed from the beginning when payment method popover is implemented here.
Modal is on top of view hierarchy and we should have handled opening another page behind modal cases when we implement this.

@puneetlath
Copy link
Contributor

@Harshdeepjoshi @situchan sent you hiring offers!

@aimane-chnaif paid!

@puneetlath
Copy link
Contributor

All paid. Thanks everyone!

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 Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests