ckolderup / postmarks

a single-user bookmarking website designed to live on the Fediverse
https://postmarks.glitch.me
MIT License
459 stars 38 forks source link

enhance tag filter view to do tag intersection #55

Closed ckolderup closed 10 months ago

ckolderup commented 10 months ago

/tagged/music/youtube would show just bookmarks that are music + youtube

ckolderup commented 10 months ago

The person who reached out about this in the first place pointed out on Mastodon that we may want some way to do tag unions as well, in which case we may want to consider the URL schema that would support both.

Looking at other bookmarking sites (or even just things that have tags + good URL hygiene) may be informative here.

steve-bate commented 10 months ago

I added experimental support for tag intersection on my instance. If you go to one of the tag views, you'll see a "+" next to the tags. Clicking the "+" will add the tag to the query/view. When there are multiple tags selected, the selected tags will have a "-" next to them, and nonselected tags will have a "+". For a single tag view, the current tag will be disabled with no "+/-" control next to it. I'm not claiming this is the optimal UX (I'm more of a backend developer), but it seems to work reasonably well.

I didn't try to implement tag unions because I can't think of a personal use case for them.

ckolderup commented 10 months ago

It's looking good to me! I don't think there's a strong need to do unions right now (only context you'll hear me say that). If you have the time, are you cool with setting up a PR for it?

ckolderup commented 10 months ago

Closed by #96, thanks again!