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

[Search v2.4] Update Search results page (Search bar only) #49462

Merged

Conversation

cdOut
Copy link
Contributor

@cdOut cdOut commented Sep 19, 2024

Details

Reuses SearchRouterInput inside Search results page to display the result search query with a filters button inside itself (it is currently disabled as autocomplete and support for typed queries will be part of Search 2.5).

Fixed Issues

$ #49121
PROPOSAL:

Tests

  1. Log into an account that preferably has data to be searched / create some expenses
  2. Go into the Search tab
  3. Using the filters button create any search query you want and confirm it with View results
  4. Confirm that the entire search query in a string format displays properly in the top bar of search results page, with a filters button to the right of itself which is accessible to modify the query.
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

MacOS: Chrome / Safari
CHROME.mov

Copy link

melvin-bot bot commented Sep 19, 2024

Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers!

@luacmartins luacmartins self-requested a review September 19, 2024 23:45
@luacmartins
Copy link
Contributor

I'm really excited for this one. It's looking good so far!

Copy link
Contributor

@Kicu Kicu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good 👍 I left several small comment, please fix them and it's ready to go

import BaseTextInput from '@components/TextInput/BaseTextInput';
import useThemeStyles from '@hooks/useThemeStyles';
import variables from '@styles/variables';
import CONST from '@src/CONST';

type SearchRouterInputProps = {
onChange?: (searchTerm: string) => void;

onSubmit?: () => void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add comments to these 2 props as well to be consistent

wrapperStyle?: StyleProp<ViewStyle>;

/** Should render component on the right */
shouldShowRightComponent?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand why we need both: rightComponent and shouldShow prop for it.
If rightComponent is passed and is nonNull then just display it, if it's undefined/not passed then don't show it.

@@ -66,6 +66,7 @@ function BaseTextInput(
isMarkdownEnabled = false,
excludedMarkdownStyles = [],
shouldShowClearButton = false,
shouldUseDisabledStyles = true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's quite unfortunate that we need to add yet another bool flag to this very big component, but I couldn't come up with anything better, so we keep it.
Would be cool to simplify BaseTextInput in future

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that this isn't perfect but there wasn't any other way to disable the default styling when disabling the input. I also second the simplification of BaseTextInput.

type HeaderWrapperProps = Pick<HeaderWithBackButtonProps, 'title' | 'subtitle' | 'icon' | 'children'> & {
subtitleStyles?: StyleProp<TextStyle>;
type HeaderWrapperProps = Pick<HeaderWithBackButtonProps, 'icon' | 'children'> & {
content: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rename this something more simple like text or message or similar.
Content suggests to me that this is a more complex structure, and at first I was confused why we have both children and content

@cdOut cdOut marked this pull request as ready for review September 20, 2024 09:49
@cdOut cdOut requested review from a team as code owners September 20, 2024 09:49
@melvin-bot melvin-bot bot requested review from rayane-djouah and removed request for a team September 20, 2024 09:49
Copy link

melvin-bot bot commented Sep 20, 2024

@rayane-djouah 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]

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Sep 22, 2024

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately and each prop has a /** comment above it */
    • The file is named correctly
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native
android_native.mp4
Android: mWeb Chrome
android_mweb_chrome.mp4
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-10-01.at.14.25.19.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-10-01.at.14.26.05.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-10-01.at.1.45.08.PM.mov
MacOS: Desktop
Screen.Recording.2024-10-01.at.1.45.40.PM.mov

Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it is currently disabled as autocomplete and support for typed queries will be part of Search 2.5)

@cdOut autocomplete is a 2.5 feature, but typed queries is part of the scope of v2.4. @Kicu already introduced that functionality here, so we need to enable the input on this page. We can handle enabling the input as a follow up if you'd like to keep it separate

Screen.Recording.2024-09-23.at.9.27.57.AM.mov

Copy link
Contributor

@rayane-djouah rayane-djouah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! I've left a few minor comments

onChangeText={onChangeText}
onSubmitEditing={onSubmit}
autoFocus
textInputContainerStyles={[{borderBottomWidth: 0}, styles.ph3, inputWidth]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug on web & desktop: The default cursor is displayed on the disabled text input; however, a text cursor appears on the 12px horizontal padding. I think the cursor should be consistent—either text or default—across the entire input box.

Screenshot 2024-09-23 at 12 09 36 AM
Screen.Recording.2024-09-23.at.12.09.48.AM.mov

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug on web: When the input is enabled, the cursor alternates between the default and text cursor as you move it around.

Screen.Recording.2024-09-23.at.1.33.51.AM.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be all fixed, none of those occured anymore when testing on chrome on the latest commit.

Comment on lines 40 to 42
if (onChange) {
onChange(text);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (onChange) {
onChange(text);
}
onChange?.(text);

Copy link
Contributor

@rayane-djouah rayane-djouah Sep 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug on web: On the web platform, scrolling through the input box to view the overflowing text is only possible when the cursor is directly over the text. However, on the desktop version, you can correctly scroll when the cursor is over the text or any vertical empty space within the input box.

Desktop:

Screen.Recording.2024-09-23.at.1.35.20.PM.mov

Web:

Screen.Recording.2024-09-23.at.1.26.33.AM.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What browser are you using here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cdOut I'm using Chrome

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI very soon in a separate PR we will make this input editable and not disabled. Can someone verify if this bug would also happen when the input is enabled? because if no then we could ignore this for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sigh, tested this myself and the same behavior is there if the input is not disabled.
How big of a bug do we consider this? Scrolling on text behaves ok, perhaps that is enough?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a blocker for this PR. We can definitely address it as a follow up.

@rayane-djouah
Copy link
Contributor

cc @Expensify/design to review the changes:

Video
Screen.Recording.2024-09-23.at.1.54.00.AM.mov
Video
Screen.Recording.2024-09-23.at.1.54.24.AM.mov

@Kicu
Copy link
Contributor

Kicu commented Sep 23, 2024

@luacmartins @cdOut
About this comment:

autocomplete is a 2.5 feature, but typed queries is part of the scope of v2.4. @Kicu already introduced that functionality #48785, so we need to enable the input on this page. We can handle enabling the input as a follow up if you'd like to keep it separate

I think doing this in a follow up PR is the way to go.
Right now we can create multiple complex queries using AdvancedFilters including filters like from:, to:, tag: etc.
When this input becomes editable, the query produced with values from advanced filters has to be made editable and work together with manually typed query. We're expecting that some weird bugs and edge cases might start to appear then, so it's better to turn it on separately and test throroughly.

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Sep 23, 2024

@Expensify/design Does the search input look good in both light and dark mode?

Screenshot 2024-09-23 at 1 38 28 PM Screenshot 2024-09-23 at 1 40 10 PM
Full Screen Screenshots Screenshot 2024-09-23 at 1 42 44 PM Screenshot 2024-09-23 at 1 40 28 PM

@dannymcclain
Copy link
Contributor

@rayane-djouah What color is being used for the background of the input? In Figma, we have it set to row-hover. In your screenshot it looks like maybe it's using highligh-background?

Also, for the text inside the input, if possible, we have it laid out in Figma where the name of the filter uses text-supporting and the value of the filter uses our standard text color. Is that something we can accomplish here? (so for example, type: would be set in text-supporting and expense would be set in text)

cc @dubielzyk-expensify for a gut check on all that—but that's what I'm seeing in Figma.

Also last little thing: can we make it to where when the query gets "cut off" or truncated by the field, we add a little ... to the end like we do elsewhere in the app?

@rayane-djouah
Copy link
Contributor

Also last little thing: can we make it to where when the query gets "cut off" or truncated by the field, we add a little ... to the end like we do elsewhere in the app?

@dannymcclain As demonstrated in this comment's recordings, we have enabled horizontal scrolling on the input field. This feature allows users to view and edit text that exceeds the boundaries of the input box. Therefore, adding an ellipsis ("...") at the end should be unnecessary, right?

@rayane-djouah
Copy link
Contributor

rayane-djouah commented Sep 23, 2024

What color is being used for the background of the input? In Figma, we have it set to row-hover. In your screenshot it looks like maybe it's using highligh-background?

@dannymcclain, Yes, it's using highlightBG, do we need to use theme.sidebarHover (colors.productLight300 and colors.productDark300)?.

Also, for the text inside the input, if possible, we have it laid out in Figma where the name of the filter uses text-supporting and the value of the filter uses our standard text color. Is that something we can accomplish here? (so for example, type: would be set in text-supporting and expense would be set in text)

@dannymcclain, I'm not sure if this is within the scope of this PR since it involves markdown formatting (@cdOut Could you please confirm?). Perhaps for now, we could use our standard text color for all the text input instead of the text-supporting color?


@cdOut, Based on the Figma mockups I think we need to:

  1. Change the text color of the "Filters" button to styles.textSupporting.
  2. Change the font size from 13px to 15px.
  3. Change the "Filters" icon size from 16*16px to 20*20px.
  4. Change the text input color from styles.textSupporting to our standard text color.
  5. Change the input background color from theme.highlightBG to theme.sidebarHover, Additionally, we need to update the default background color of the filter button to theme.sidebarHover to match the input color. @Expensify/design, which hover background color should we use for the button?
  6. Add a 1px solid border in "success" (green) when the input is actively focused. We might consider implementing this in a follow-up as discussed here: [Search v2.4] Update Search results page (Search bar only) #49462 (comment), since the input is currently disabled.

@Expensify/design could you please confirm the above?


Current:

Screenshot 2024-09-23 at 1 40 10 PM

Mockup:

Screenshot 2024-09-23 at 4 41 54 PM

image

@dannymcclain
Copy link
Contributor

Yes, it's using highlightBG, do we need to use theme.sidebarHover (colors.productLight300 and colors.productDark300)?

I'm not sure what the variable is called in the code. We call it row-hover in Figma and it maps to this hex code: #0A2E25

I'm not sure if this is within the scope of this PR since it involves markdown formatting

Totally fair, let's just leave it all as text-supporting for now.

Change the text color of the "Filters" button to styles.textSupporting
Change the font size from 13px to 15px
Change the "Filters" icon size from 1616px to 2020px

I actually don't think we need to mess with this Filters button right now. I think we can leave the current colors/sizes of everything as is and just add in the hover state. I think for hover, all we need to do is update the background color. And also, I mentioned this in Figma, but can we add a tiny bit of space to the right of the filters button so that when it's hovered there's equal space around it on all sides? Looks like maybe right now it's about 8px away from the top and bottom, but it touches the edge of the input on the right.

which hover background color should we use for the button?

We should be able to use our standard button hover color. We call it button-hover in Figma, but it translates to the hex code #224F41.

For the focused outline, we can totally do that as a follow up and wait until this field isn't disabled.

@dubielzyk-expensify
Copy link
Contributor

Aligned to everything @dannymcclain is saying

As demonstrated in #49462 (comment), we have enabled horizontal scrolling on the input field. This feature allows users to view and edit text that exceeds the boundaries of the input box. Therefore, adding an ellipsis ("...") at the end should be unnecessary, right?

Just clarifying that this doesn't show any sort of scroll bar on any platforms right? I agree that we shouldn't use ellipsis for the input field.

@cdOut
Copy link
Contributor Author

cdOut commented Sep 30, 2024

@rayane-djouah ready for a re-review, also merged with the latest main

<Button
innerStyles={!isCannedQuery && [styles.searchRouterInputResults, styles.borderNone]}
text={translate('search.filtersHeader')}
textStyles={styles.textSupporting}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The styles.textSupporting should be applied to the "Filters" button on the results page only.

Screenshot 2024-09-30 at 11 32 49 AM
Suggested change
textStyles={styles.textSupporting}
textStyles={!isCannedQuery && styles.textSupporting}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct, thank you for catching it!

disabled={disabled}
shouldUseDisabledStyles={false}
textInputContainerStyles={[{borderBottomWidth: 0}]}
inputStyle={[styles.searchInputStyle, inputWidth, styles.pl3, styles.pr3]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB

Suggested change
inputStyle={[styles.searchInputStyle, inputWidth, styles.pl3, styles.pr3]}
inputStyle={[styles.searchInputStyle, inputWidth, styles.ph3]}

Copy link
Contributor Author

@cdOut cdOut Sep 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer leaving it this way, since using paddingHorizontal here gets overwritten by internal styling of TextInput (it sets individual paddingLeft to 0 by default, which has priority over the more generic horizontal styling), leaving only the right padding intact and nullifying the left one. When specifying the paddings directly they get presented correctly.

autoCapitalize="none"
disabled={disabled}
shouldUseDisabledStyles={false}
textInputContainerStyles={[{borderBottomWidth: 0}]}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
textInputContainerStyles={[{borderBottomWidth: 0}]}
textInputContainerStyles={styles.borderNone}

@cdOut
Copy link
Contributor Author

cdOut commented Sep 30, 2024

@rayane-djouah I've added the changes and also specified why I'd leave one of the parts of styling as is, let me know if anything else needs fixing before approve

@cdOut
Copy link
Contributor Author

cdOut commented Sep 30, 2024

Resolved merge conflicts with SearchPageHeader

Copy link
Contributor

@rayane-djouah rayane-djouah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM and tests well

@melvin-bot melvin-bot bot requested a review from luacmartins October 1, 2024 13:31
@rayane-djouah
Copy link
Contributor

@luacmartins all yours!

luacmartins
luacmartins previously approved these changes Oct 1, 2024
Copy link
Contributor

@luacmartins luacmartins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luacmartins
Copy link
Contributor

NAB we might wanna add some right padding to the button
Screenshot 2024-10-01 at 7 55 57 AM

@dannymcclain
Copy link
Contributor

NAB we might wanna add some right padding to the button

Big agree! I pointed this out somewhere else. But ideally we'd have equal padding on all sides. Definitely NAB though.

@cdOut
Copy link
Contributor Author

cdOut commented Oct 1, 2024

NAB we might wanna add some right padding to the button Screenshot 2024-10-01 at 7 55 57 AM

Ah that’s right, I can add it in a moment if we can hold off on merging it right away.

@cdOut
Copy link
Contributor Author

cdOut commented Oct 1, 2024

Alright, added the padding whenever we also pass the rightComponent into the SearchRouterInput, now it's equal on both sides of the component.

Screenshot 2024-10-01 at 16 12 22

@rayane-djouah
Copy link
Contributor

LGTM!

@Expensify/design Here is the current result for your reference:

Screen.Recording.2024-10-01.at.3.15.28.PM.mov
Screen.Recording.2024-10-01.at.3.16.01.PM.mov

@luacmartins luacmartins merged commit 12e2808 into Expensify:main Oct 1, 2024
17 checks passed
@OSBotify
Copy link
Contributor

OSBotify commented Oct 1, 2024

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

Copy link
Contributor

github-actions bot commented Oct 2, 2024

🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.43-0 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

1 similar comment
Copy link
Contributor

github-actions bot commented Oct 2, 2024

🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.43-0 🚀

platform result
🤖 android 🤖 failure ❌
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Copy link
Contributor

github-actions bot commented Oct 3, 2024

🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.43-6 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants