-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: add support for spaces in search & enable searching by display name in templates #19552
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
Conversation
Can we fallback to the |
To make sure I'm following would you like to search on That can be done. Since we would now support spaces in the search queries we'd probably need to update the |
Yes |
Sounds good! Defaulting to |
Nor directly related but is it possible to stop showing Can it be a hidden default filter that's always true. If someone wants deprecated templates they can set it to |
We could remove that from the frontend as the default query and update the query to always return Should we make a new issue for this work? |
Yes let's create a new issue. Thanks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally I think the UX of our workspace search needs a bit of an improvement, but I think this is a good solution given what we've got!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Summary
In this pull request we're updating search to support queries with spaces in addition to the
field:value
pattern that is currently supported.Additionally templates search now defaults to
display_name
(sincedisplay_name
is optional the search will fallback toname
) when searching without thefield:value
patternCloses: #14384
Downsides with searching on
name
anddisplay_name
Because the
name
field cannot include spaces, we end up in a situation where including a space in the query will result in no results since the query searches on bothname
ANDdisplay_name
. In the following example, we can see the results of searching by bothname
anddisplay_name
on these templates:name-and-display-name.mov
Proposal: Search on
display_name
by default and allow forname
using thefield:value
patternIf we remove
name
from the default template search, we're now able to search with spaces on templatedisplay_names
. Sincedisplay_names
are what users see in the templates list they might expect the search to work this way.Below is an example of
name
being removed from the default template search.display-name.mov
With this approach users would still be able to search on template names by specifying
exact_name:foo
.Testing
Added additional test cases to ensure spaces were handled as expected in combination with
field:value
patterns.