-
Notifications
You must be signed in to change notification settings - Fork 1
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
Initiatives search #109
base: main
Are you sure you want to change the base?
Initiatives search #109
Conversation
8d01a5e
to
b5e1b08
Compare
sx={{ ...descriptionStyles, WebkitLineClamp: title?.length > 50 ? 1 : 2 }} | ||
> | ||
{summary} | ||
{isLoading ? ( |
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.
Try using the CardSkeleton from PR#107
@@ -18,10 +21,39 @@ export type ProjectProps = { | |||
}; | |||
|
|||
export const ProjectSection = ({ projects }: ProjectProps) => { | |||
const [inputValue, setInputValue] = useState(''); | |||
const [searchResults, setSearchResults] = useState<BasicProject[]>(); |
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.
Try creating a project-section-context to store: searchResults, isLoading, refetchProjects, etc
export const ResponsiveSearchInput = (props: SearchInputProps) => { | ||
const isWideScreen = useMediaQuery((theme: Theme) => theme.breakpoints.up('md')); | ||
|
||
return isWideScreen ? <FullSearchInput {...props} /> : <MobileSearchInput {...props} />; |
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.
use the FullSearchInput as default (to avoid the layout shift)
|
||
return ( | ||
<> | ||
<SecondaryIconButton |
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.
@@ -43,6 +43,33 @@ export const ProjectFragment = graphql( | |||
[InnoUserFragment], | |||
); | |||
|
|||
// search in title, summary, author, description.text, description.tags.tag | |||
export const SearchProjectsQuery = graphql( |
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.
get query and request from PR#107
Closes #55
reuses queries from #107 so probably makes sense to wait for it first.
I also centered the ApplyFilterButton for mobile.