-
Notifications
You must be signed in to change notification settings - Fork 225
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
feat: Merge categories/tags and improve filtering #541
feat: Merge categories/tags and improve filtering #541
Conversation
✅ Deploy Preview for sveltesociety-preview ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Honestly, I'm not a big fan of this as implemented. We commonly do things like link to https://sveltesociety.dev/packages#svelte-kit-adapters. There's no way to do that now as everything's just mixed together and that filter doesn't exist. It's also going to break tons of links that we have across svelte.dev and kit.svelte.dev. We could clean those up, but we'd need ways to keep the existing functionality for that to be possible |
This looks great! |
@benmccann oh wow fair enough, I had no idea it was referenced extensively in the svelte/kit docs. For that above link, with this change it would become https://sveltesociety.dev/packages?tag=svelte-kit-adapters. I guess the worst case scenario for old links is that users get taken to the top of the page rather than the category ID that was linked. I would argue this new solution is more robust than since it only loads the contents of the specific category/tag in the link. Either way, I'm not too fussed if this proposal isn't feasible since it was fun to implement! |
There is a feature in Cloudflare to do bulk redirects - maybe that's something we can explore? |
Given that we get the same functionality as before - would it be fine to merge this if we updated all the links on the Svelte site? @benmccann |
Let me give this another look to verify whether things like the |
I think so. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi @benmccann , would you be able to give this another look? Thanks! |
💭 Problem
This was prompted in part by discussion on #443. Tags are effectively unlimited and unregulated right now; however, categories are also quite limited since each entry can only have one. Filtering based on category/tags via the select fields is an okay experience - but it could be better!
🎯 Changes
Heavily inspired by bestofjs.org. Each item will be allowed multiple, pre-defined categories (or tags, the name doesn't matter). This would be a merge of current categories and useful tags to keep. By default, all entries are displayed. A collection of buttons let you choose which categories/tags you want displayed. When you select a category/tag, the list of available categories/tags narrows based on your current selection. This utilises a server load function, and the URL is shareable due to search params.
Before
After
✅ Checklist
pnpm run lint
locally on my changes