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

Initiatives search #109

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

Initiatives search #109

wants to merge 2 commits into from

Conversation

pecirep
Copy link
Collaborator

@pecirep pecirep commented Oct 29, 2024

Closes #55

reuses queries from #107 so probably makes sense to wait for it first.

I also centered the ApplyFilterButton for mobile.

sx={{ ...descriptionStyles, WebkitLineClamp: title?.length > 50 ? 1 : 2 }}
>
{summary}
{isLoading ? (
Copy link
Contributor

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[]>();
Copy link
Contributor

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

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

Choose a reason for hiding this comment

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

make sure the filter button is aligned well on mobile
image

@@ -43,6 +43,33 @@ export const ProjectFragment = graphql(
[InnoUserFragment],
);

// search in title, summary, author, description.text, description.tags.tag
export const SearchProjectsQuery = graphql(
Copy link
Contributor

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

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.

Implement search bar for initiatives on main page
2 participants