Filter by user doesn't work (easily) in combination with category/tag/topic filters in new search

I am still adjusting to the new search, so if I’m just missing something please let me know.

With the old search, when you opened the search input while viewing a category, tag, or topic it would show a checkbox giving you the option to limit the search to the current category/tag/topic or make it a global search.

image

The new version doesn’t show this until you actually type something, but otherwise achieves the same goal.

image

The problem is, if what you are searching for is posts by a given user within that context, it doesn’t give you the option to search within the category/tag/topic. It just shows possible matching usernames to execute a global search for those users.
image

Even if I type in my full username, it still only gives me the option to search globally.

image

To me, this is a pretty significant loss of functionality. Sometimes I’m looking for an old post of mine in a specific topic. The easiest way to do this before was to navigate to that topic and then search by my username.

Now, as I’m looking more closely, I see that technically I can achieve the same thing by clicking the search in this topic button first, but this is unintuitive. After you’ve typed something, that option (with the text preceding it) actually executes the search, while here is just adds the topic id to the search box.

image

So regardless of the fact that I can apparently get what I want, it still seems odd to me that only searching by username would be limited in how you can execute a search filtered by the current category/tag/topic. Would it be possible to make this work the same as searching for text, where it gives you two options: Search within category/tag/topic and search globally? Even if this was limited to when you typed in an exact username, I think it would be a huge improvement.

For a quick mockup, this is what I would want to see:

image

1 Like

Any thoughts on this suggestion?

Yes, I think your suggestion makes sense and I am close to a PR that adds the functionality as described in your last mockup, i.e. when in a topic and searching using the @ keyword, we can show 2 suggestions: a) search the topic for the user match or b) search the whole site for the user match. I should be able to wrap up this work in a few days.

1 Like

I assume this would work for the category and tag scopes as well, right?

No, no plans to have a special case for this on category/tag contexts, because there the only target is global search. But I see this working fine under tag/category contexts, for example:

Step 1 - in feature category, click on the contextual option

Step 2 - append @username

Maybe I’m misunderstanding, but doesn’t this screenshot show that when opening search in the #feature category, that it provides options to search within that category and also globally?

image

You’re not misunderstanding, we could add this option to the category/tag contexts as well. Maybe we will revisit this later, but for now, users have several ways to search by username in a category/tag context: username (without @) will show both options and globally they can do @username #category from anywhere in the site. The in-topic search is special, the only way to show posts as results there is to use the suggestions.

Marking this for closing since the topic search scenario has been fixed in this PR.

1 Like

It looks like you missed the “or press Enter” text.

image

image


Understood. I think it would be nice if it worked in all those situations for consistency (since searching regular text works in all those situations), but it’s not a huge deal. Having it work in topics is definitely the most important use case. Thanks for taking care of that!

1 Like

I sure did, now fixed.

1 Like

This topic was automatically closed after 2 days. New replies are no longer allowed.