Skip to content

Entity search function should support PascalCase-sensitive searches #25029

Description

@viridia

What problem does this solve or what need does it fill?

ECS components are required to have PascalCase names, since they are Rust types. In the past, I have found it very handy to have the search function know about PascalCase names, similar to what VSCode does.

This would work in parallel with the normal fuzzy and prefix search function, the user would not have to explicitly choose PascalCase mode.

Searching should happen as you type into the search box, which means that all searches should implicitly be prefix searches: each character you type narrows the search further.

Thus, typing the string "do" would match all of the following component names:

  • door (because it's a prefix match)
  • Door (because searches are case-insensitive)
  • DangerousOoze (because the words start with "d" and "o")
  • DangerousOozeRed (because PascaleCase searches are also prefix searches)

On the other hand, if you type the string "Do", then the search algorithm, detecting a mixed-case string, would automatically switch to case sensitive mode and disable PascalCase mode, so only "Door" would match.

What solution would you like?

PascalCase matching can be done easily by transforming the input string into a regular expression.

@alice-i-cecile

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-Dev-ToolsTools used to debug Bevy applications.C-FeatureA new feature, making something new possibleD-ModestA "normal" level of difficulty; suitable for simple features or challenging fixesS-BlockedThis cannot move forward until something else changesX-UncontroversialThis work is generally agreed upon

    Type

    No type

    Projects

    • Status
      Needs SME Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions