-
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
Add card advanced filter for Search #46666
Add card advanced filter for Search #46666
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.
Looks good, left you small comments
.filter((card) => card.cardID) | ||
.sort((a, b) => a.bank.localeCompare(b.bank)) | ||
.map((card) => { | ||
const icon = getBankIcon({bankName: card.bank as BankName, isCard: true, styles}); |
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.
This cast as BankName
looks fishy and I'd rather we didn't have it. But I also did a search in the project and it seems that it is done similarly in a few places so maybe thats ok.
Leaving this comment for other people to see
@cristipaval 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] |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid.webmAndroid: mWeb Chromeandroid-mweb.webmiOS: Nativeios.mp4iOS: mWeb Safariios-mweb.mp4MacOS: Chrome / Safariweb.movMacOS: Desktop |
@Kicu Navigation and selection of the cards is pristine 🚀
@luacmartins @Expensify/design If you guys think these are not within the immediate scope of this PR and will be handled in a follow-up / or when all the filters will be linked together then let me know and I'll 🟢 Approve right away. |
I think both of these needs to be fixed. I'm a bit unsure if we want an empty state for the card or if we wanna remove the filter option altogether when there are no cards. If we did the empty state route, we could do something like this: Perhaps it's nice to have the filter option in there purely for education purposes, but I'm not sure it makes sense. cc @Expensify/design and @JmillsExpensify for thoughts |
I agree that we need to fix both issues. I like the idea of simplifying the UI and only showing relevant filters to the user, so I'd be in favor of removing the card filter if the user doesn't have any cards. |
The issue with card labels in the filters section, I believe, is a result of a discrepancy between the key in the search parser grammar: "card", and the key in the |
Remind the option from the advanced filter page if the user doesn't have any cards would be my preference, but we should wait on more input from the design team. |
The parser wasn't regenerated after the last grammar change, which is why the |
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 left just 1 tiny comment :D
I think I lean towards just removing the filter option entirely if there are no cards to filter on. |
I'm down with this approach. |
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.
🟢 Thanks for addressing the issues!
-
1. Missing design for when no cards are present (empty state)
Addressed by the team and decided to go with removing the
Card
category from the filters list when no cards are present. Fixed by commit 1f000e4.
-
2. Card filter labels are not added in the Filters section even though they are present in the URL
Addressed by author and fixed by commit f26e0d9. This is how it looks now (comma in-between cards):
🎯 @ikevin127, thanks for reviewing and testing this PR! 🎉 An E/App issue has been created to issue payment here: #46827. |
Regarding the commas in-between the cardID, this might be addressed in another issue / PR as per #46566 (comment). I wouldn't consider it a blocker for this PR. @Kicu should be able to confirm if the fix mentioned in the comment will cover all filters (including |
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
✋ 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.17-0 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
2 similar comments
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
🚀 Deployed to production by https://github.com/marcaaron in version: 9.0.17-2 🚀
|
Details
Fixed Issues
$46042
PROPOSAL:
Tests
add cards to account
visit route
/search/filters
test card filter and whether navigation behaves correctly
Verify that no errors appear in the JS console
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.mov
Android: mWeb Chrome
web_and.mov
iOS: Native
IOS.mov
iOS: mWeb Safari
web_ios.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov