Implement searchable context menus - use them in the mixer - #31657
Merged
Conversation
mathesoncalum
force-pushed
the
search_in_mixer
branch
4 times, most recently
from
January 7, 2026 16:00
57bd29e to
6340526
Compare
mathesoncalum
marked this pull request as ready for review
January 7, 2026 16:12
mathesoncalum
force-pushed
the
search_in_mixer
branch
from
January 7, 2026 17:50
6340526 to
5ec9d22
Compare
mathesoncalum
force-pushed
the
search_in_mixer
branch
from
January 19, 2026 09:35
5ec9d22 to
4407ce4
Compare
2 tasks
mathesoncalum
force-pushed
the
search_in_mixer
branch
from
January 20, 2026 10:44
4407ce4 to
f104262
Compare
8 tasks
mathesoncalum
force-pushed
the
search_in_mixer
branch
from
January 26, 2026 16:43
f104262 to
a328e85
Compare
mathesoncalum
force-pushed
the
search_in_mixer
branch
2 times, most recently
from
January 29, 2026 15:11
b172c34 to
97481a7
Compare
mathesoncalum
force-pushed
the
search_in_mixer
branch
from
January 29, 2026 17:59
97481a7 to
395432e
Compare
RomanPudashkin
approved these changes
Jan 30, 2026
|
Tested on macOS and Windows. Aside from some minor refinements that can come in subsequent PRs, this one now seems ready from my POV. Approved. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves: #17467
Resolves: #31544
My first thought was to keep the changes extremely minimal from a UI/MenuView perspective and let the models decide what to do when search text is received. In this case, the audio resource items would receive the search text and construct a “filtered list” of items. Part of my reasoning for this was that the prefixes (the pack, the vendor, the SoundFont name etc) for each item are quite arbitrary - i.e. it’s not like they all come from the same level in the “flyout tree” hierarchy so I figured it would be more intuitive to do this explicitly when building the filtered list.
However, in practice this approach ended up being extremely cumbersome and quite inefficient. It seemed inevitable that we’d end up with a lot of duplicated logic between the flyout tree structure construction and filtered list construction.
So instead I had the idea to continue using the flyout tree structure universally and just interpret it as a filtered list when some search text is present. It works like this:
setModelinMenuView(pretty much the same as master)MenuViewis searchable, we immediately cache a “flattened” version of the treeDoing it this way should be nice and efficient because we don’t need to traverse the entire tree every time our filter text changes, just the flattened version. And in the end it wasn’t too difficult to resolve the aforementioned problem with prefixes - I added an
isFilterCategoryproperty (for lack of a better name) for menu items; if this property is true for a given item then all “leaf” ancestors of that item will prepend the category title to their title.This task is definitely a bit of a balancing act between repetitive code, future flexibility, and readability. There are parts of it I’m not particularly happy with (e.g.
isFilterCategory,noResultsFoundItem, some aspects of thesetFilterTextmethod) however this is just the MVP and we will have opportunities to refine things going forward.