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

Add search and sort for resource spawner #359

Merged
merged 13 commits into from
Oct 2, 2020

Conversation

JShep1
Copy link

@JShep1 JShep1 commented Sep 20, 2020

Closes #341

This PR most of all implements a Search textfield as well as a Sort By Combo Box. It also introduces some optimizations in loading the models (stores all resources by owner at initialization, previously only the owner data was being gathered and another search for the models was done when the user clicked on each owner). Some slight formatting was changed with the QML as I thought some of it looked a little wonky, I'm still open for suggestions on the QML.

The search bar will search (case insensitive) all the names and owners of all the resources with your submitted keyword, similar to how Fuel's website does. I also added a sort by Most Recent, A - Z, Z - A, and Downloaded. The sort and search work together to display the subset of the two.

Are there any more similar organization features or sorting methods that would be desired while we're here?

Here's a small example:

searchandsort

John Shepherd added 4 commits September 18, 2020 16:14
Signed-off-by: John Shepherd <[email protected]>
Signed-off-by: John Shepherd <[email protected]>
Signed-off-by: John Shepherd <[email protected]>
@JShep1 JShep1 added enhancement New feature or request 🏰 citadel Ignition Citadel labels Sep 20, 2020
@JShep1 JShep1 linked an issue Sep 20, 2020 that may be closed by this pull request
John Shepherd added 2 commits September 20, 2020 14:10
Signed-off-by: John Shepherd <[email protected]>
Signed-off-by: John Shepherd <[email protected]>
@chapulina chapulina added the GUI Gazebo's graphical interface (not pure Ignition GUI) label Sep 20, 2020
@JShep1 JShep1 marked this pull request as ready for review September 21, 2020 22:05
@JShep1 JShep1 requested a review from chapulina as a code owner September 21, 2020 22:05
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great, the code looks good. I just have a comment about onAccepted for your consideration.

In the future, maybe @ColeOSRF can create a sort icon for us to place in front of the dropdown.

src/gui/plugins/resource_spawner/ResourceSpawner.qml Outdated Show resolved Hide resolved
@JShep1 JShep1 merged commit ff678ba into ign-gazebo3 Oct 2, 2020
@JShep1 JShep1 deleted the jshep1/add_search_sort_resource_spawner branch October 2, 2020 03:39
doisyg pushed a commit to wyca-robotics/ign-gazebo that referenced this pull request Dec 13, 2020
Signed-off-by: John Shepherd <[email protected]>
Signed-off-by: Guillaume Doisy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel enhancement New feature or request GUI Gazebo's graphical interface (not pure Ignition GUI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resource Spawner Search Bar and Sort
2 participants