Repository navigation
[Search v1] Add SearchFilters component - #40419
luacmartins merged 4 commits into
Conversation
luacmartins
left a comment
There was a problem hiding this comment.
Nice, looking good. @Kicu when do you think this will be ready for review?
62572d6 to
30dc162
Compare
|
@dukenv0307 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] |
|
@luacmartins ready for review |
|
@JmillsExpensify @trjExpensify @Expensify/design before it's too late, do we want to consider using the different style from Search v2 here? |
I would be up for transitioning to the v2 style now. It seems like we're pretty certain this pattern is not going to hold up. Curious for everyone else's thoughts too though. |
|
@Kicu I think we might be missing the TopBar changes part of the doc section, to include the workspace switcher. Additionally, I see the button as full width on small screens, but I think it should hug the text instead |
luacmartins
left a comment
There was a problem hiding this comment.
Left a comment, but I think we're missing the TopBar changes and there's a minor style change that needs to be made as well.
|
@dukenv0307 this is a high value PR, so please prioritize reviewing it when you're online 😄 |
|
@luacmartins I'm reviewing... |
|
There're some points we need to complete before reviewing
|
Aligned with that as well. |
|
@luacmartins Can you share the design doc to me? Here is my email: dukenv0307@gmail.com. Thanks |
|
@luacmartins @dukenv0307 I will also fix styling for buttons, however I wanted to share why I created the button to take full width in the first place. However I can update they styling to make this only as big as the text. |
|
Also @dannymcclain what does it mean specifically to go for the v2 styling. Should I restyle this to look differently? If you can point me to any figma sketches that would be useful |
8d7b3b1 to
f205e68
Compare
|
Here's how this looks after update: @dukenv0307 ready for re-review |
There was a problem hiding this comment.
Why do we need minWidth: 200? Is flexBasis enough?
There was a problem hiding this comment.
the source of the problem is that Text inside TabSelectorItem is positioned absolute, so the parent tab does not stretch to fit the text.
because of that I need basis so the button/tab doesn't grow to 100% and also mindWidth so that the tab doesn't get too small - otherwise it would alway be 33% which may be too small and look bad.
minWidth is not crucial but I think it makes it look better.
There was a problem hiding this comment.
Yes I'm 100% aware of that, however I wanted to use existing component (that is also used when starting a new chat and new expense) instead of adding new code.
However Im not sure whether the scope of this task (Search related) should also contain fixing this existing button. Perhaps we should create a separate task for taking a look at this TabSelectorItem? I would prefer not to affect other views when working on this PR.
There was a problem hiding this comment.
I agree with @Kicu that we should keep the changes in this PR contained to the Search page. If we need to make style changes to TabSelectorItem, let's create a separate issue that focuses on that and takes into account all views using TabSelectorItem.
|
@Kicu Lint check is failing |
|
lint fixed |
|
Basically the V2 style uses a dropdown button instead of our segmented control. Tapping it opens up a standard menu that let's you select between the various LHN options. The button should "fill" it's parent container, as we'll be adding more buttons next to it to accommodate V2 functionality. @Expensify/design @JmillsExpensify @trjExpensify does this look right? I tried to grab the latest from the Search file but I want to make sure we're all agreed this is what it should look like. Also let's decide definitively if we want to transition to this style now or not. Questions:
|
|
Looks pretty good to me! I don't think we need an "Apply" button to the jumper personally, the same way that we wouldn't ask for your confirmation on desktop when you navigate through the subnav items. |
762ccf2 to
66c8f86
Compare
|
@luacmartins @dukenv0307 Here's how this is supposed to look right now |
Or any context menu (long press on a comment for example). I think the only difference here is that these items can have an active/selected state. |
|
As far as I understand the only difference is the icon missing which I will add. It probably looks bad to you on the screenshot because:
The PR is stil ready for review, I will just push 1 small comment later that adds icons to the left of text :) |
|
does this look better? web narrow screeniosI'm using darkmode, but like I said - it is the same component as the other popover menus so everything should be according to current designs. |
|
@Kicu yeah that looks great. Are we going to be able to support the selected state shown in Shawn's comment? |
| // More tabs prepared for final version but in v1 we support only "All" | ||
| // { | ||
| // title: 'Sent', | ||
| // icon: Expensicons.Send, | ||
| // route: ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.SENT), | ||
| // }, | ||
| // { | ||
| // title: 'Drafts', | ||
| // icon: Expensicons.Pencil, | ||
| // route: ROUTES.SEARCH.getRoute(CONST.TAB_SEARCH.DRAFTS), | ||
| // }, |
There was a problem hiding this comment.
NAB I think we can remove this since it'll be added as part of phase 2.
| textDecorationLine: 'line-through', | ||
| }, | ||
|
|
||
| searchFiltersButtonText: { |
There was a problem hiding this comment.
Instead of declaring this specific style, let's reuse what we currently have, i.e. [styles.mh1, styles.textStrong]
We can add |
There was a problem hiding this comment.
@Kicu is out for the day. I'm gonna get this PR merged to unblock development of other features given the tight deadline. I'll address the following issues in a follow up:
-
Popover should show selected state
-
[Remove commented code]
(#40419 (comment)) -
Translate the filter name
Reviewer Checklist
Screenshots/VideosAndroid: NativeEmulator is broken. Trying to fix it for the follow up PR.Android: mWeb Chrome  |
|
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. |
|
PR to fix the issues above here |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.66-0 🚀
|
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.4.66-0 🚀
|
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.66-5 🚀
|
| </Animated.View> | ||
| )} | ||
| </PressableWithFeedback> | ||
| <PopoverMenu |
There was a problem hiding this comment.
Looks like the way the PopoverMenu was styled here led to this issue:
which we fixed by passing innerContainerStyle as styles.pv0 and scrollContainerStyle as styles.pv4 here to the PopoverMenu. More details in the issue's proposal.
























Details
"All"tab, butIm rendering 3 tabs for testing purposesrendering only 1 tab right nowFixed Issues
$ #39881
PROPOSAL:
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Details
Android: mWeb Chrome
iOS: Native
rec-search-navv22-ios.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
rec-search-navv2-web.mp4
MacOS: Desktop