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

Design systems search #405

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Design systems search #405

wants to merge 12 commits into from

Conversation

BeeSeeWhy
Copy link
Contributor

Closes #274

Seach Bar component created

Component Example:
Screenshot 2024-09-05 at 1 13 14 PM

Hover Example:
Screenshot 2024-09-05 at 1 13 52 PM

Focused Example:
Screenshot 2024-09-05 at 1 14 00 PM

Component In Action:

Screen.Recording.2024-09-05.at.1.19.52.PM.mov

@BeeSeeWhy BeeSeeWhy self-assigned this Sep 5, 2024
Copy link
Contributor

@thomhickey thomhickey left a comment

Choose a reason for hiding this comment

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

Nice work, filters great! Had a few comments and then on Mobile at iPhone 14 Pro Max, the flow kind of falls apart, it's too crowded and I would recommend we style it down in height/font-size for mobile, but maybe the designs didn't call for that.
image

@@ -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";
Copy link
Contributor

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.

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 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"
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 '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.

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 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?

Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor

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 */
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Will do. Thanks.

Copy link
Contributor

@mrabbitt mrabbitt left a 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.

Copy link
Contributor

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
Comment on lines 1 to 5
src/backend/db/zapatos
.next
.nsm
.terraform
*.css.d.ts
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 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.

Copy link
Contributor Author

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

Copy link
Contributor

@nickvisut nickvisut left a 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: {
Copy link
Contributor

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"
Copy link
Contributor

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";
Copy link
Contributor

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",
Copy link
Contributor

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" {
Copy link
Contributor

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

Copy link
Contributor

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";
Copy link
Contributor

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 }) => ({
Copy link
Contributor

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";
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Blocked / On hold
Development

Successfully merging this pull request may close these issues.

[Design System Components] Search
4 participants