You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C+ Checklist Needs Completion] [$250] [Search v2.5] - Unable to perform search by hitting Enter on search bar when expense is selected #51427
Version Number: 9.0.53-1 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):applausetester+kh1610015@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Go to staging.new.expensify.com
Go to Search
Click Filters
Apply any filter that will return results
Select an expense via checkbox
Click on the search input field
Type anything and hit Enter
Expected Result:
App will perform a new search
Actual Result:
The dropdown button is expanded
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6644670_1729784811459.20241024_234027.mp4
@anmurali FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Through ref forwarding, we can get the input ref of the input in SearchRouterInput and then we can use textInputRef.current?.isFocused() to disabled the pressOnEnter prop. We might also need to use useEffect to keep the updated value of textInputRef.current?.isFocused().
If needed, we can also remove pressOnEnter prop from other pages like workspace categories, tags, etc.
What alternative solutions did you explore? (Optional)
In the useKeyboardShortcut config we can add captureOnInputs: false.
Please re-state the problem that we are trying to solve in this issue.
Search - Unable to perform search by hitting Enter on search bar when expense is selected
What is the root cause of that problem?
We have set pressOnEnter on the drop down button and in side the button we already have a code that disable the shortcut based on the active element role but it only disables it if the active element is presentation, which is correct
I don't think it's very clear how this should behave. You are changing the filter criteria, but there is a selected expense. Should the filter results update? What if the selected expense no longer matches the criteria? cc @luacmartins@trjExpensify@JmillsExpensify
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.62-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@eh2077@greg-schroeder@eh2077 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
changed the title [-][HOLD for payment 2024-11-22] [$250] [Search v2.5] - Unable to perform search by hitting Enter on search bar when expense is selected[/-][+][C+ Checklist Needs Completion] [$250] [Search v2.5] - Unable to perform search by hitting Enter on search bar when expense is selected[/+]on Nov 21, 2024
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
Regression Test Proposal Template
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon Oct 24, 2024
Triggered auto assignment to @anmurali (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.lanitochka17 commentedon Oct 24, 2024
@anmurali FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Krishna2323 commentedon Oct 24, 2024
Edited by proposal-police: This proposal was edited at 2024-10-24 19:31:51 UTC.
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search - Unable to perform search by hitting Enter on search bar when expense is selected
What is the root cause of that problem?
pressOnEnterprop is passed, so the enter press is caught by the button.App/src/components/Search/SearchPageHeader.tsx
Line 367 in 476ad6b
What changes do you think we should make in order to solve the problem?
We have several options to solve this.
pressOnEnterprop.useActiveElementRoleand pass false topressOnEnterwhenactiveElementRoleispresentation.SearchRouterInputand then we can usetextInputRef.current?.isFocused()to disabled thepressOnEnterprop. We might also need to useuseEffectto keep the updated value oftextInputRef.current?.isFocused().pressOnEnterprop from other pages like workspace categories, tags, etc.What alternative solutions did you explore? (Optional)
useKeyboardShortcutconfig we can addcaptureOnInputs: false.App/src/components/Button/index.tsx
Lines 175 to 184 in 32d4ddf
captureOnInputsand then pass it fromSearchPageHeader>ButtonWithDropdownMenu>Button.App/src/hooks/useKeyboardShortcut.ts
Line 31 in 32d4ddf
Result
FitseTLT commentedon Oct 24, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Search - Unable to perform search by hitting Enter on search bar when expense is selected
What is the root cause of that problem?
We have set
pressOnEnteron the drop down button and in side the button we already have a code that disable the shortcut based on the active element role but it only disables it if the active element is presentation, which is correctApp/src/components/Button/index.tsx
Line 163 in f46bce0
but we set our text inputs role as presentation
App/src/components/Search/SearchRouter/SearchRouterInput.tsx
Line 99 in f46bce0
What changes do you think we should make in order to solve the problem?
I propose two options
textboxWe will need to add the role here
App/src/components/ActiveElementRoleProvider/index.tsx
Lines 9 to 11 in f46bce0
then
App/src/components/Button/index.tsx
Line 163 in f46bce0
What alternative solutions did you explore? (Optional)
Krishna2323 commentedon Oct 24, 2024
PROPOSAL UPDATED
melvin-bot commentedon Oct 29, 2024
@anmurali Eep! 4 days overdue now. Issues have feelings too...
anmurali commentedon Oct 29, 2024
I don't think it's very clear how this should behave. You are changing the filter criteria, but there is a selected expense. Should the filter results update? What if the selected expense no longer matches the criteria? cc @luacmartins @trjExpensify @JmillsExpensify
luacmartins commentedon Nov 4, 2024
I imagine we'd just clear the selection and perform the new Search. cc @JmillsExpensify for your input as well.
40 remaining items
melvin-bot commentedon Nov 15, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Nov 15, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.62-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 2024-11-22. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Nov 15, 2024
@eh2077 @greg-schroeder @eh2077 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
greg-schroeder commentedon Nov 21, 2024
Payment summary:
Contributor: @Krishna2323 - $250 - Upwork
C+: @eh2077 - $250 - Paid via NewDot manual request
Next up @eh2077 can you complete the checklist? Thank you!
[-][HOLD for payment 2024-11-22] [$250] [Search v2.5] - Unable to perform search by hitting Enter on search bar when expense is selected[/-][+][C+ Checklist Needs Completion] [$250] [Search v2.5] - Unable to perform search by hitting Enter on search bar when expense is selected[/+]eh2077 commentedon Nov 24, 2024
BugZero Checklist:
Bug classification
Source of bug:
Where bug was reported:
Who reported the bug:
[Contributor] 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: https://github.com/Expensify/App/pull/49462/files#r1855460915
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue:
Regression Test Proposal
Precondition:
N/A
Test:
Do we agree 👍 or 👎
luacmartins commentedon Nov 25, 2024
We're adding tests as part of the project wrap up, so no need to do that now,
greg-schroeder commentedon Nov 26, 2024
Okay, thanks @luacmartins
eh2077 commentedon Nov 26, 2024
Requested payment in NewDot
JmillsExpensify commentedon Nov 27, 2024
$250 approved for @eh2077