-
Notifications
You must be signed in to change notification settings - Fork 14
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
Design systems search #405
base: main
Are you sure you want to change the base?
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.
@@ -22,6 +21,8 @@ import { SelectableForTable } from "zapatos/schema"; | |||
import emptyState from "../../public/img/empty-state.png"; | |||
import Container from "@mui/material/Container"; | |||
import Image from "next/image"; | |||
import { SearchBar } from "../design_system/searchBar/SearchBar"; |
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.
curious the relative path imports here? i would tend more toward @components/design_system/searchBar/SearchBar, which then makes table.tsx moveable.
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 can definitely change that...I found that usage in another part of the app...but the @ makes more sense
> | ||
<SearchBar | ||
id="search-input" | ||
placeholder="Search" |
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 think 'Filter' is more applicable to this UX. I know the figma design calls for 'Search', but this is filtering a list, not doing a traditional search, which would return a new list of search results. Just a comment, no big deal.
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 didn't build the search functionality, just the UI component. Do you think it would benefit us more to build a traditional search rather than the filtering?
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.
No, I was just saying we should change the placeholder text from 'Search' to 'Filter', but I'm aware that you didn't create that placeholder value in this PR.
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.
Do you think my listing error has to do with my version of node I’m using? It keeps saying prettier is not run, but I’ve even run it separate from the push check and says it’s ok
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.
@BeeSeeWhy do you mean the linting errors above? I added some comments ... I think they are valid for the most part b/c of "unused" rule.
If you're referring to the linting warnings at the bottom of the PR, getting latest from main
ought to fix those.
btw if you're having issues w/prettier
(as opposed to eslint
), try to nuke node_modules
and try again. my guess is that there must be something misconfigured in the project b/c a few of us have run into a similar issue.
margin: 2px 4px; | ||
padding: 4px 2px; | ||
} | ||
/* moved to Form.module.css since this was not styling input, but was styling the form */ |
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.
maybe remove this comment? it only makes sense if you know what used to be here.
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.
Will do. Thanks.
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.
@BeeSeeWhy @nickvisut , @chengtchris1 , and I have run into this before where the behavior of prettier on local doesn’t match the GitHub check. What fixed it for us was: Removenode_modules
and re-runnpm install
. (npm ci
would probably work too.) After that, re-run prettier, and it will undo some changes that it introduced incorrectly (mainly trailing commas).
Also, as noted in another comment I think you need to restore the lines you removed from the prettier ignore file.
The styling of the Search component looks ok to me on Desktop. Mobile could be better, as @thomhickey noted.
src/backend/db/zapatos/schema.d.ts
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.
Are we sure we want to reformat this file with prettier? It's autogenerated.
.prettierignore
Outdated
src/backend/db/zapatos | ||
.next | ||
.nsm | ||
.terraform | ||
*.css.d.ts |
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 think you need to restore these lines. The lint check is failing with "Code style issues found in 262 files" due to their removal. I'm not sure about some of these rules, but at least the zapatos and css ones are for auto-generated files that shouldn't be manually edited.
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.
Ugh...this what I get for trying to work after getting a COVID vax ... I'll try working on the mobile search as well
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.
left a few comments wrt lint errors and step theming, as well as a Q about prettier
}), | ||
}, | ||
}, | ||
MuiStepLabel: { |
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.
hi @BeeSeeWhy, was it intentional to remove the step theming?
> | ||
<SearchBar | ||
id="search-input" | ||
placeholder="Search" |
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.
@BeeSeeWhy do you mean the linting errors above? I added some comments ... I think they are valid for the most part b/c of "unused" rule.
If you're referring to the linting warnings at the bottom of the PR, getting latest from main
ought to fix those.
btw if you're having issues w/prettier
(as opposed to eslint
), try to nuke node_modules
and try again. my guess is that there must be something misconfigured in the project b/c a few of us have run into a similar issue.
@@ -1,3 +1,4 @@ | |||
import { BorderAllRounded, BorderColor } from "@mui/icons-material"; |
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.
are these two imports being used?
@@ -93,7 +93,7 @@ | |||
"lint-staged": "^13.1.0", | |||
"nextjs-server-modules": "^4.7.0", | |||
"nodemailer-mock": "^2.0.1", | |||
"prettier": "^2.8.8", | |||
"prettier": "2.8.8", |
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.
are you having issues w/prettier?
declare module 'zapatos/schema' { | ||
|
||
import type * as db from 'zapatos/db'; | ||
declare module "zapatos/schema" { |
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.
hmm looks like prettier was accidentally run on this file
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.
(could you revert?)
@@ -1 +1,30 @@ | |||
export {}; | |||
import React from "react"; |
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.
seems like this is unneeded
import TextField, { TextFieldProps } from "@mui/material/TextField"; | ||
import { styled } from "@mui/material/styles"; | ||
|
||
export const TextInput = styled(TextField)<TextFieldProps>(({ theme }) => ({ |
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.
can either use theme
colors from theme.ts
instead of var(...)
below or remove it altogether
import React from "react"; | ||
import TextField, { TextFieldProps } from "@mui/material/TextField"; | ||
import { styled } from "@mui/material/styles"; | ||
import { Input, InputBase, InputBaseProps } from "@mui/material"; |
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 like some of these imports are extraneous and can be removed
Closes #274
Seach Bar component created
Component Example:
Hover Example:
Focused Example:
Component In Action:
Screen.Recording.2024-09-05.at.1.19.52.PM.mov