Select tag, change category, tag still selected


#1

I’ve been getting lots of amazing help from @cpradio today, and i came across an issue with tags.

I’m unsure if it is a bug or working as intended, so i’m going to post this here to get a bit of discourse team feedback on it.

When i select a category, then a subcategory, then a tag, everything filters properly. However, if i change category from the category selector, the tag is still present in the new category results.

the url changes like this:

select category: .com/c/soccer
select subcategory: .com/c/soccer/mancity
select tag: .com/tags/c/soccer/mancity/sergioaguero
select a different category: .com/tags/c/swimming/sergioaguero

i was wondering if the tag selection should reset on entering a new category?, like it does if you go ‘home’ and select a new category.


Only 30 topics appear when filtering by category, subcategory, and no tags
(Neil Lalonde) #2

Not sure what people want to happen when they change the category filter while the tag filter is set. I tend to agree with you that the tag filter should reset.

There are other issues, like this one, that may be related to this bug.


(cpradio) #3

I think the nail in the coffin to support that is the fact that you can have category specific tags, so when changing to another category, the prior selected tag might not be valid anymore. Which brings up a really good reason to reset it on that condition.


#4

Yes Neil, changing categories with a tag set, means you are stuck in .com/tags/c/ mode, no matter how many times you change category or change tags or even with tags: none, until you go home and begin again.

Changing category should, i think, reset the url to .com/c/


#5

Does the Discourse team this will get changed in the future?

I would go as far to say that even if you change sub-category,
the tag filter should reset.


(Neil Lalonde) #6

Yes, sorry that I keep dropping this one down my todo list. The ugly ember.js router code I wrote scares me every time I look at it. Will try to get this one done.


#7

absolutely no problem at all, just making sure i can plan ahead knowing something will happen eventually.

good luck mate

:fonzie:


(Neil Lalonde) #8

jk, easiest bug fix ever! Removing the ugly router code that implements that behaviour was the solution.


(Jeff Atwood) #9