PR for Tag and Post Time
https://github.com/discourse/discourse/pull/4496
So I just took my first detailed look at the new UI, and have a question/concern. How can you select multiple Only return topics/posts that...
options? It seems that clicking on another option replaces the current option in search, as opposed to appending it.
For a specific case to test, I wanted to search for this:
in:wiki in:watching in:likes
Right now, you canāt. You can add additional ones to the search input field at the top and it will retain it, but the UI doesnāt add them.
I believe some of the more high value options in that drop down should be standalone checkboxes.
Which ones in particular? I can try tackling that later tonight.
Granted, select2 supports Multiple (which is used for the dropdown), so it might be simple to convert it to a multiple container. I can play with either approach.
Donāt do multiple select that is a usability nightmare. Use your judgment as to which ones are high value, likely to be useful and thus used reasonably often, and make those checkboxes.
Sorry, when I say multiple select, Iām talking similar UI as Tags, but it is a finite list and will then show as boxes like the tags selector does to for easy removal.
Example located at
https://select2.github.io/examples.html#multiple
I donāt think that UI metaphor fits well here.
Okay, fair enough, checkboxes will be my main focus then as I donāt have a strong opinion on the matter and both are likely the same amount of work.
What doesnāt fit? I agree that we donāt need the boldface headers, but the multiple selectability fits perfectly.
I didnāt get to the multiple in:
scenario last night, like I had hoped. I had to do a refactor and improve how it finds matches before I could sustain this feature. I completed the refactor and it should get merged sometime today (now that Iāve squashed the commits)
https://github.com/discourse/discourse/pull/4495
The biggest hurdle that I had to get around was the ability to know ALL of the matching blocks at the time that I update the UI and the search-term field. Otherwise, it would have been extremely difficult to know which match I was supposed to update/remove.
Iām hopeful I will find time to work on this request today.
Okay, here is a mockup of it using checkboxes (it is actually functional too, but I want to play with it a bit before commiting it ā plus I need to update the acceptance tests still)
Mobile Layout, which needed a lot of love
Now that I can see it live here on meta I think that UI is major improvement! I very appreciate it and my members will too!
Just a question, āIn Categoryā allows only single category? I donāt know how difficult would be to allow selecting more categoriesā¦ Is it easily doable?
I donāt think that request makes sense, as right now, it would mean nothing gets returned. As it is filtering the results by the first category and then it would filter them again by the second. And topics canāt exist in two categories (which is how the existing search works ā keep in mind, I didnāt do any improvements to existing search, I simply built a UI to handle the advanced search parameters).
Ok, no problemā¦ I was not aware of that conjunction ā¦
Hmm right now āanyā can be selected in the combobox while the checkboxes are still checked. I find that having two different ways of selecting options under a single label is confusing.
Perhaps we can just make all the options check-boxes but dynamically disabling options so that we can protect users from checking options that donāt go well together. Examples:
- āin:privateā and āin:wikiā will always not return any results since you canāt wiki a private message.
- Disable āin:pinnedā when
in:unpinned
is checked and vice versa
I defer to @codinghorror. I really do not have a strong opinion on the matter, it was suggested that 3 be choosen to be checkboxes to permit the multiple in:
possibilities, not all of them. The ones left in the drop down can still be used so this gives 4 quick possibilities to choose.
Although Iām not against adding precautions to prevent people from mixing conflicting possibilities, Iām not sure it is worth the added effort to code and maintain it when the worst that can happen is zero search results. The user will alter their query when that happens automatically, they donāt need to be told to do it. /shrug
I think the way it is now is fine. If someone wants to make the case that option X is also common enough to be elevated to discrete checkbox that is fine.
The checkboxes were merged in today.
There was a lot of refactoring done to help lessen the complexity of the code and a few more acceptance tests were added to cover some edge cases uncovered.
Iām trying the new advanced search and if I try to search without login it is impossible choose a category (but I can choose a @user). Is it normal?
If you use the category box and you have a category + sub-category (not short but not too long) the sub-category goes in a new line. Is it possible make the container a bit longer? Take a look on the category box for new topic.