-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Search parser grammar update #47328
Search parser grammar update #47328
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@ikevin127 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
const keywords = allFilters.filter((filter) => filter.left === "keyword" || filter.right?.left === "keyword") | ||
const nonKeywords = allFilters.filter((filter) => filter.left !== "keyword" && filter.right?.left !== "keyword") | ||
if(!nonKeywords.length){ | ||
return keywords.reduce((result, filter) => buildFilter("or", result, filter)) | ||
} | ||
if(!keywords.length){ | ||
return nonKeywords.reduce((result, filter) => buildFilter("and", result, filter)) | ||
} | ||
|
||
return buildFilter("and", keywords.reduce((result, filter) => buildFilter("or", result, filter)), nonKeywords.reduce((result, filter) => buildFilter("and", result, filter))) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could implement this as part of a rule, instead of plain JS. Anyways, NAB for now.
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.webmAndroid: mWeb Chromeandroid-mweb.webmiOS: Nativeios.mp4iOS: mWeb Safariios-mweb.mp4MacOS: Chrome / Safariweb.movMacOS: Desktopdesktop.mov |
@289Adam289 I checked out the PR branch, ran web.movNot sure what causes this, the data is there, it's just not being displayed for some reason. Looks like something weird is happening with the URL when clicking on Expenses again after the initial search page load (this happens on staging as well though 🤔), I'm assuming this might be related to the search parser changes❔ Note: I made sure to check this with |
@ikevin127 I'm away from my computer so I can't test right now. Do you see any console errors? If the parser is failing it should output an error to the console |
Ah maybe it's because we update the API to send the type as expense instead of transaction/report and this branch is not up to date with main to handle the expense type |
❌ No console errors or warnings that are not on staging as well. My thinking was to suggest a sync w/ main as well, to make sure we're up to date 👍
Wouldn't this mean that staging would be broken as well ? 🤔 |
I think it's working now |
Nice! @ikevin127 ready for you to test this again. |
This comment was marked as outdated.
This comment was marked as outdated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀 tests well -> issue was fixed ✅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Congrats, that’s your 5th PR merged! 🎉 Do you know about the ContributorPlus role? It’s an opportunity to earn more in the Expensify Open Source community. Keep up the great work - thanks! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.23-0 🚀
|
🚀 Deployed to production by https://github.com/chiragsalian in version: 9.0.23-0 🚀
|
Details
Fixed Issues
$#47095
$#46993
PROPOSAL:
Tests
/search/filters
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2024-08-14.at.13.09.18.mp4
MacOS: Desktop
desktop.mp4