Skip to content
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

feat: add smartcase and globless path searches #743

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

CyanVoxel
Copy link
Member

@CyanVoxel CyanVoxel commented Jan 28, 2025

Summary

This PR adds "smartcase" style path searches and allows for non-glob searches to still return results. Smartcase searches will act as case-insensitive when the entire query is lowercase, but will turn case-sensitive if one or more capital letters are present in the query. Meanwhile the glob detection is now based on whether or not a query starts or ends with a "*" character.

This PR also limits the number of results in the path autocomplete list to 100 items to avoid sluggish search typing that scales with the size of the library.

Smartcase Search (New)

path: temp

  • Returns all paths that have "temp" (Case insensitive) somewhere in the name.

path: Temp

  • Returns all paths that have "Temp" (Case sensitive) somewhere in the name.

Glob Patterns (Expanded)

path: *temp*

  • Returns all paths that have "temp" (Case insensitive) somewhere in the name.

path: *Temp*

  • Returns all paths that have "Temp" (Case sensitive) somewhere in the name.

path: temp*

  • Returns all paths start with "temp" (Case insensitive) somewhere in the name.

path: temp*

  • Returns all paths that end with "Temp" (Case insensitive) somewhere in the name.

@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Priority: High An important issue requiring attention TagStudio: Search The TagStudio search engine labels Jan 28, 2025
@CyanVoxel CyanVoxel added this to the Alpha v9.5 (Post-SQL) milestone Jan 28, 2025
@CyanVoxel CyanVoxel added the Type: QoL A quality of life (QoL) enhancement or suggestion label Jan 28, 2025
@CyanVoxel CyanVoxel added the Type: Performance An issue or change related to performance label Feb 7, 2025
@CyanVoxel CyanVoxel marked this pull request as ready for review February 7, 2025 06:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: High An important issue requiring attention TagStudio: Search The TagStudio search engine Type: Enhancement New feature or request Type: Performance An issue or change related to performance Type: QoL A quality of life (QoL) enhancement or suggestion
Projects
Status: 🏓 Ready for Review
Development

Successfully merging this pull request may close these issues.

1 participant