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

Implement search box in the Mixer #17467

Open
jessjwilliamson opened this issue May 4, 2023 · 5 comments
Open

Implement search box in the Mixer #17467

jessjwilliamson opened this issue May 4, 2023 · 5 comments
Assignees
Labels
community Issues we would like the community to address feature request Used to suggest improvements or new capabilities P2 Priority: Medium task

Comments

@jessjwilliamson
Copy link
Contributor

Your idea

To have a faster and more efficient way for users to search for sounds or audio FXs in the Mixer, a search box is a way to make quicker results.

Problem to be solved

This will solve slow, FX locating issues, especially for users who have lots and lots of plugins installed on their computers.

Prior art

No response

Additional context

This is a collaboration project with me, I have already made designs for this, only implementation needed.

Here are the designs with a UX flow in a Figma project: https://www.figma.com/file/f5JfTbhKggUjPfTMoqyynH/Search-box-in-Mixer?type=design&node-id=6-35

image

@jessjwilliamson jessjwilliamson added P2 Priority: Medium community Issues we would like the community to address task labels May 4, 2023
@jessjwilliamson jessjwilliamson self-assigned this May 4, 2023
@muse-bot muse-bot added the feature request Used to suggest improvements or new capabilities label May 4, 2023
@Blargian

This comment was marked as outdated.

@cbjeukendrup

This comment was marked as outdated.

@jessjwilliamson

This comment was marked as outdated.

@shoogle shoogle changed the title Community Task: Implement a search box in Mixer Implement a search box in Mixer Sep 27, 2023
@shoogle shoogle changed the title Implement a search box in Mixer Implement search box in the Mixer Sep 27, 2023
@22justinl
Copy link
Contributor

Hello, I would like to try working on this but I'm having trouble with figuring out how, could I get some general pointers on what I would need to do (or what is required when working on something similar)? (How do I add to the existing dropdown, do I need to create a new UI component qml file, etc.). Any help would be appreciated!

@cbjeukendrup
Copy link
Contributor

Some ideas:

  • Some of the relevant existing classes are AbstractAudioResourceItem (and especially its two subclasses), AudioResourceControl.qml, StyledMenuLoader.qml/StyledMenu.qml etc.
  • Currently, the model for a menu is either a QAbstractListModel, or a QVariantList (or JS list); i.e. a list, not a tree. That list contains MenuItems, as defined in menuitem.h, or a QVariantMap (or JS object) with the same entries; and such a menu item contains a property called subitems, which is again a list of menu items. So, there is a kind of tree structure, but only an "ad hoc" one, and not a real QAbstractItemModel (as opposed to QAbstractListModel).
    But to implement the tree-like UI in a somewhat comfortable way, it seems essential to use QML's TreeView component, together with a QAbstractItemModel. So, either you'd need to generate one based on the ad hoc tree structure, or completely replace the ad hoc structure.
  • Another big question is whether you should implement this new functionality inside the existing StyledMenu components, or as a completely new component. With the first option, you risk that it adds a performance penalty to all instances of StyledMenu that don't make use of the feature; with the second one, you risk code duplication.
    My guess in this case would be that option 2 might still be better:
    • Create a new component that will contain the search box at the top and the menu items below it (use StyledMenu.qml as inspiration for how to do a menu-like popup)
    • When the user is not searching, just show the content of a StyledMenu; i.e. extract the StyledListView and any other relevant stuff from StyledMenu.qml into a new component called StyledMenuContent.qml, and reuse that new component in your new container component
    • When the user is searching, hide the StyledMenuContent and show a new TreeView-based component instead
    • Regarding menu models: with this solution, it would maybe even be possible to do it the other way around than what I mentioned above: specify a QAbstractItemModel (i.e. a real tree model) to the container component; for the StyledMenuContent component, generate an ad hoc tree structure based on the tree model, as the StyledMenuContent expects; for the TreeView-based component, specify the QAbstractItemModel directly. But I find it difficult to say what would be the best way; absolutely feel free to experiment with it.
  • To implement the searching, SortFilterProxyModel (not Q…) might come in handy. It's used for example in AdvancedPreferencesModel and `ScoresListView.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Issues we would like the community to address feature request Used to suggest improvements or new capabilities P2 Priority: Medium task
Projects
Status: Available
Status: No status
Development

No branches or pull requests

5 participants