Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rafrdz merged 4 commits intomainfromrafrdz/templates-search
Sep 8, 2025

Conversation

rafrdz
Copy link

@rafrdzrafrdz commentedAug 26, 2025
edited
Loading

Summary

In this pull request we're updating search to support queries with spaces in addition to thefield:value pattern that is currently supported.

Additionally templates search now defaults todisplay_name (sincedisplay_name is optional the search will fallback toname) when searching without thefield:value pattern

Closes:#14384

Downsides with searching onname anddisplay_name

Because thename 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:

NameDisplay Name
dockerDocker Template
faketemplateA Fake Template
azureFake Azure Template
anotherfakeAnother Fake Template
azurefakeAnother Fake Fake Azure Template
name-and-display-name.mov

Proposal: Search ondisplay_name by default and allow forname using thefield:value pattern

If we removename 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 ofname being removed from the default template search.

display-name.mov

With this approach users would still be able to search on template names by specifyingexact_name:foo.

Testing

Added additional test cases to ensure spaces were handled as expected in combination withfield:value patterns.

@rafrdzrafrdz requested a review fromEmyrkAugust 26, 2025 14:33
@rafrdzrafrdz changed the titlefix: support spaces in search and search by display name in templatesfix: add support for spaces in search and enable searching by display name in templatesAug 26, 2025
@rafrdzrafrdz changed the titlefix: add support for spaces in search and enable searching by display name in templatesfix: add support for spaces in search & enable searching by display name in templatesAug 26, 2025
@matifali
Copy link
Member

matifali commentedAug 26, 2025
edited
Loading

Can we fallback to thename for Templates, whendisplay_name is empty?

rafrdz reacted with eyes emoji

@rafrdz
Copy link
Author

Can we fallback to the name for Templatesdisplay_name is empty, as it's optional?

To make sure I'm following would you like to search ondisplay_name by default and fallback toname ifdisplay_name is empty?

That can be done. Since we would now support spaces in the search queries we'd probably need to update thename query to filter out any spaces sincename cannot have any spaces 🤔

@matifali
Copy link
Member

To make sure I'm following would you like to search on display_name by default and fallback to name if display_name is empty?

Yes

rafrdz reacted with thumbs up emoji

@rafrdz
Copy link
Author

To make sure I'm following would you like to search on display_name by default and fallback to name if display_name is empty?

Yes

Sounds good! Defaulting todisplay_name and falling back toname (with spaces removed from query) in8c780dc

matifali reacted with rocket emoji

@matifali
Copy link
Member

Nor directly related but is it possible to stop showingdeprecated:false in the search nar?

Can it be a hidden default filter that's always true. If someone wants deprecated templates they can set it todeprecated:true

@rafrdz
Copy link
Author

Nor directly related but is it possible to stop showingdeprecated:false in the search nar?

Can it be a hidden default filter that's always true. If someone wants deprecated templates they can set it todeprecated:true

We could remove that from the frontend as the default query and update the query to always returndeprecated:false unless a user specifically asked fordeprecated:true. The frontend already has a "Deprecated templates" filter that setsdeprecated:true.

Should we make a new issue for this work?

matifali reacted with thumbs up emoji

@matifali
Copy link
Member

matifali commentedAug 28, 2025
edited
Loading

Yes let's create a new issue. Thanks

rafrdz reacted with thumbs up emoji

@github-actionsgithub-actionsbot added the staleThis issue is like stale bread. labelSep 5, 2025
Copy link
Contributor

@brettkolodnybrettkolodny left a 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!

Copy link
Contributor

@brettkolodnybrettkolodny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thank you!

@rafrdzrafrdz merged commit1677a30 intomainSep 8, 2025
31 checks passed
@rafrdzrafrdz deleted the rafrdz/templates-search branchSeptember 8, 2025 22:13
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsSep 8, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@brettkolodnybrettkolodnybrettkolodny approved these changes

@EmyrkEmyrkAwaiting requested review from Emyrk

Assignees

@rafrdzrafrdz

Labels
staleThis issue is like stale bread.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

cannot search template name with spaces
3 participants
@rafrdz@matifali@brettkolodny

[8]ページ先頭

©2009-2025 Movatter.jp