Skip to content

add searchable kwarg to Menu for use with lots of options#5642

Open
bjarthur wants to merge 8 commits into
MakieOrg:masterfrom
bjarthur:bja/filtermenu
Open

add searchable kwarg to Menu for use with lots of options#5642
bjarthur wants to merge 8 commits into
MakieOrg:masterfrom
bjarthur:bja/filtermenu

Conversation

@bjarthur

@bjarthur bjarthur commented May 27, 2026

Copy link
Copy Markdown
Contributor

fixes part of #4747 (comment)

using GLMakie

fig = Figure()

fruits = ["Apple", "Apricot", "Banana", "Blackberry", "Blueberry",
          "Cherry", "Cranberry", "Date", "Elderberry", "Fig",
          "Grape", "Grapefruit", "Honeydew", "Kiwi", "Lemon",
          "Lime", "Mango", "Nectarine", "Orange", "Papaya"]

sm = Menu(fig[1,1],
          options = fruits,
          searchable = true,
          search_placeholder = "type to filter...",
          prompt = "Searchable menu...")
Screenshot 2026-05-27 at 4 04 58 PM
  • New feature (non-breaking change which adds functionality)
  • Added an entry in CHANGELOG.md (for new features and breaking changes)
  • Added or changed relevant sections in the documentation
  • Added unit tests for new algorithms, conversion methods, etc.

@github-project-automation github-project-automation Bot moved this to Work in progress in PR review May 27, 2026
@bjarthur bjarthur marked this pull request as ready for review May 27, 2026 22:44
@bjarthur

bjarthur commented May 27, 2026

Copy link
Copy Markdown
Contributor Author

lots of options (100s or more, even 10s really) are hard to scroll through. this PR filters the list of options with a user-supplied string down to a manageable size.

not sure why the reference tests are failing, but i don't think it is caused by this PR.

@bjarthur bjarthur changed the title add filter kwarg to Menu for use with lots of options add searchable kwarg to Menu for use with lots of options May 28, 2026
@bjarthur

Copy link
Copy Markdown
Contributor Author

@mkitti you might be interested in this

Comment thread Makie/src/makielayout/blocks/menu.jl Outdated
@bjarthur

bjarthur commented Jun 3, 2026

Copy link
Copy Markdown
Contributor Author

not sure why codespell failed, but i don't think it's this PRs fault, and the button to re-run it in the actions tab doesn't seem to be there.

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

Labels

None yet

Projects

Status: Work in progress

Development

Successfully merging this pull request may close these issues.

3 participants