Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: adding active and hover states to search input #2741

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

Merged
merged 4 commits into from
Jun 30, 2022

Conversation

Kira-Pilot
Copy link
Member

Couple of improvements:

  1. get rid of highlight when autosuggestions are on.
    Before:
    Screen Shot 2022-06-29 at 5 11 22 PM

After:
Screen Shot 2022-06-29 at 4 56 33 PM

  1. add hover and active states
    Kapture 2022-06-29 at 17 05 42

@Kira-Pilot Kira-Pilot requested a review from a team as a code owner June 29, 2022 21:12
@@ -106,19 +106,15 @@ export const SearchBarWithFilter: React.FC<SearchBarWithFilterProps> = ({
)}

<form onSubmit={form.handleSubmit} className={styles.filterForm}>
<TextField
<OutlinedInput
Copy link
Member Author

Choose a reason for hiding this comment

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

Changed this because TextField is a nightmare to style.

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

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

This is pretty!

Copy link
Contributor

@AbhineetJain AbhineetJain left a comment

Choose a reason for hiding this comment

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

This is nice! Does OutlinedInput also have an error state? Maybe we can use a reddish border when the query is erroneous.

@Kira-Pilot
Copy link
Member Author

This is nice! Does OutlinedInput also have an error state? Maybe we can use a reddish border when the query is erroneous.

Yes, it should! Working on that now after looking at the test failures.

@Kira-Pilot
Copy link
Member Author

Kira-Pilot commented Jun 29, 2022

@AbhineetJain
Screen Shot 2022-06-29 at 5 37 48 PM

@AbhineetJain
Copy link
Contributor

@AbhineetJain Screen Shot 2022-06-29 at 5 37 48 PM

Nice addition! I checked that other form fields (like on the Account page) have the error outline and error message using the color #f44336. Just wanted to confirm if we are using the same. I think the outline looks similar to me, but the message here might be a different color.

@Kira-Pilot
Copy link
Member Author

@AbhineetJain We are using the same outline colors! I think it's a standard for MUI inputs but idk the whole palette history, tbh:
Screen Shot 2022-06-30 at 11 05 27 AM
You're right about the error text - that is a bit darker - but I think that's okay. I actually tried to change it to match, but it showed up white? Idk what they're doing behind the scenes at MUI but considering we might move away from that library in the future, I'm not too worried about it.

@@ -152,29 +149,39 @@ export const SearchBarWithFilter: React.FC<SearchBarWithFilterProps> = ({
)
}

const useStyles = makeStyles((theme) => ({
interface StyleProps {
error?: unknown
Copy link
Contributor

Choose a reason for hiding this comment

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

nit This could just be a boolean.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! I'm putting up another PR right after this one with more style improvements and I promise I'll fix it there. 🀞

@Kira-Pilot Kira-Pilot merged commit 6499770 into main Jun 30, 2022
@Kira-Pilot Kira-Pilot deleted the search-bar-style-improv/kira-pilot branch June 30, 2022 15:57
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.

3 participants