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(api): added search_recursive prop to menus #655

Merged
merged 3 commits into from
Sep 30, 2023
Merged

Conversation

tomasklaen
Copy link
Owner

search_recursive makes user search look into submenus as well, effectively flattening the menu for the duration of the search.

With this, we don't need a new menu-palette command anymore. It's just built into the default one:

search_recursive

`search_recursive` makes user search look into submenus as well, effectively flattening the menu for the duration of the search.
@tomasklaen
Copy link
Owner Author

Maybe we should use / as a separator. > doesn't look good in non-monospace fonts, and takes too much space.

search_recursive_sep

@christoph-heinrich
Copy link
Contributor

| might be a good symbol for that, as it takes up even less space and people are less likely to have item titles with it.
But / is a commonly used path separator, so it's good from a semantic pov...

@tomasklaen
Copy link
Owner Author

tomasklaen commented Sep 30, 2023

I went with /. It's pretty much a standard to separate categories anywhere.

Also, should it be search_recursive, or search_submenus?

@dyphire
Copy link
Contributor

dyphire commented Sep 30, 2023

LGTM

@christoph-heinrich
Copy link
Contributor

search_recursive makes more sense because it doesn't only search submenus, although with the description that shouldn't really be a problem.

search_all maybe? But that's also not good because it doesn't search parent menus.

My personal favorite is search_submenus, even if search_recursive is technically more correct.

@tomasklaen tomasklaen merged commit cbfb2a6 into main Sep 30, 2023
tam1m pushed a commit to tam1m/uosc that referenced this pull request Oct 2, 2023
`search_submenus` makes uosc's internal search handler (when no `on_search` callback is defined) look into submenus as well, effectively flattening the menu for the duration of the search.
@tomasklaen tomasklaen deleted the search_recursive branch October 9, 2023 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants