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 grouping to Command Palette #10252

Open
wants to merge 55 commits into
base: master
Choose a base branch
from

Conversation

janfaracik
Copy link
Contributor

@janfaracik janfaracik commented Feb 10, 2025

This PR adds grouping to the Command Palette, making it easier to identify what each result is.

image

There are a range of prebuilt groups, UnclassifiedSearchGroup, ItemSearchGroup, ComputerSearchGroup, ViewSearchGroup, and UserSearchGroup. Developers can add custom groups too, for example, Design Library could add a group for its components and patterns.

Groups by default don't have a specific ordering, however, the items group is configured to always appear first, and the unclassified group is configured to always appear last. Results are then ordered by name.

I've also done some minor tidy up to the interface, making the overlay a little less invasive.

Testing done

  • Groups appear as expected

Proposed changelog entries

  • Add grouping to Command Palette

Proposed upgrade guidelines

N/A

Submitter checklist

Preview Give feedback

Desired reviewers

@jenkinsci/sig-ux

Before the changes are marked as ready-for-merge:

Maintainer checklist

Preview Give feedback

janfaracik and others added 30 commits December 10, 2024 21:37
This reverts commit 24837ea.
@daniel-beck
Copy link
Member

daniel-beck commented Feb 12, 2025

Any thoughts on renaming "Jobs" to just be "Items" so we can include folders too? They're part of the same list when in a view, so I think it'd make sense to group them when searching too.

If all items are intended to appear there, then it should be "Items". If you only want things representing "projects" there, then regular folders would not be, and in a separate section of "other items".

I'm not sure what is the better approach. Having all items there certainly would be simpler (no need to think too hard about what kind of thing in this categorization a multibranch pipeline is…), plus they're currently displayed in the same sort of list as well. So I tentatively prefer this one. This could always be split up later if we don't like it long-term, while merging seems more complicated.

Another option might be to (re)use the item type categories that are currently hidden from view (supposed to be temporary in 2016…). Go to "New Item" page and remove the class flat from div#items (also, yay, UI labels with "Projects" 🤦 ). These could be used either as top-level groups in this group scheme, or as nested subgroups within the "Items" top-level category.

@github-actions github-actions bot added the unresolved-merge-conflict There is a merge conflict with the target branch. label Feb 13, 2025
Copy link
Contributor

Please take a moment and address the merge conflicts of your pull request. Thanks!

@github-actions github-actions bot removed the unresolved-merge-conflict There is a merge conflict with the target branch. label Feb 16, 2025
@janfaracik
Copy link
Contributor Author

janfaracik commented Feb 16, 2025

Great. I've renamed Projects Jobs to Items - like you said it should keep categorisation simpler. If the need arises in the future to split them out then we can do that then.

@scherler
Copy link
Contributor

https://issues.jenkins.io/browse/JENKINS-75312?focusedId=452592&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-452592 Maybe one link or using a form and the submit will lead to the search page again (aka not selecting the first match) could be part of the PR? I am ATM looking into fixing the problem that I mentioned https://issues.jenkins.io/browse/JENKINS-75294?focusedId=452602&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-452602 and stumbled on the other ticket

Copy link
Member

@timja timja left a comment

Choose a reason for hiding this comment

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

LGTM

@krisstern
Copy link
Member

/label ready-for-merge

This PR is now ready for merge, after ~24 hours, we will merge it if there's no negative feedback.

@comment-ops-bot comment-ops-bot bot added the ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback label Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-merge The PR is ready to go, and it will be merged soon if there is no negative feedback rfe For changelog: Minor enhancement. use `major-rfe` for changes to be highlighted web-ui The PR includes WebUI changes which may need special expertise
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants