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

Add option to also filter by category #105

Merged
merged 13 commits into from
Jun 6, 2021
Merged

Add option to also filter by category #105

merged 13 commits into from
Jun 6, 2021

Conversation

laymonage
Copy link
Member

@laymonage laymonage commented Jun 6, 2021

This PR adds an option to also use the selected category in the discussion search query, meaning that giscus will only search in the specified category. As a result, we also need to pass the category name because we cannot use categoryId for querying.

Also includes major refactoring for how config is handled. I should've made a separate PR for that, but oh well!

  • All handling of query params is now placed in widget.tsx (page component).
  • The Widget component uses ConfigContext.Provider to provide config values down the tree.
  • The Configuration component uses an object state to manage the configuration values.

@vercel
Copy link

vercel bot commented Jun 6, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/laymonage/giscus/7kpvnsixXQE8oUtt6HUVuzQjDCGS
✅ Preview: https://giscus-git-filter-category-laymonage.vercel.app

@laymonage laymonage merged commit d1b2ed5 into main Jun 6, 2021
@laymonage laymonage deleted the filter-category branch June 6, 2021 07:27
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