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

Implement browse all filters #158

Merged
merged 19 commits into from
Nov 21, 2023
Merged

Implement browse all filters #158

merged 19 commits into from
Nov 21, 2023

Conversation

codemonkey800
Copy link
Contributor

#25

Implements the browse all filters component for the browse all page. Overall the implementation of the filters works keeping state in sync with the query parameters. This is ideal because it:

  1. Makes the application "stateless"
    • Even though state is stored in the query parameters, the application itself does not rely on any local state to have the filters working
  2. Allows us to create permalinks of the filter page with every filter specified
    • Since the data is stored in the URL, opening the URL in another tab will init the local data with the query parameters, effectively creating a permalink
  3. Leverages browser history API
    • This will allow us to go back / forward in the browser since the filter state is stored in query parameters

The components implemented in components/Filters should be generic enough to be used in other places as well, so it should be straightforward to re-use the components when we implement filters on other pages.

Demo

Filters demo

filter-demo.mp4

No results page

image

@codemonkey800 codemonkey800 merged commit f85c4fe into main Nov 21, 2023
3 checks passed
@codemonkey800 codemonkey800 deleted the jeremy/browse-all-filters branch November 21, 2023 16:48
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.

1 participant