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

Support group ordering #9153

Closed
chrisdias opened this issue Jul 12, 2016 · 5 comments
Closed

Support group ordering #9153

chrisdias opened this issue Jul 12, 2016 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality
Milestone

Comments

@chrisdias
Copy link
Member

  • VSCode Version: 1.3
  • OS Version: OSX

Steps to Reproduce:

  1. Add menus to the explorer context menu
  2. Run extension
  3. Note the sorting order where your contributions are at the top

image

Related to #8756?

The source for the extension is here: https://github.com/chrisdias/vscode-opennewinstance

@jrieken
Copy link
Member

jrieken commented Jul 12, 2016

@chrisdias What is you see is the implemented behaviour. What is did you expect?

@jrieken jrieken added the info-needed Issue requires more information from poster label Jul 12, 2016
@chrisdias
Copy link
Member Author

Assuming I don't have the ability to control the exact location in the list, I would expect the navigation section of the menu to be sorted:

New File
New Folder
Open in Terminal
Open New Workbench Here
Reveal in Finder
Scope Workbench to Here

Alternatively, can I create my own group and how would I position that group between the Navigation (top) and the "Find in Folder" section?

@jrieken
Copy link
Member

jrieken commented Jul 13, 2016

Alternatively, can I create my own group and how would I position that group between the Navigation (top) and the "Find in Folder" section?

That we don't support yet. Today the navigation group comes first and contributions to that group come first as well. Any other group comes at the end, ordering of group is still to be implemented. The idea is that we have a set of groups like navigation, modification etc with a fixed order.

@jrieken jrieken added feature-request Request for new features or functionality and removed info-needed Issue requires more information from poster labels Jul 13, 2016
@jrieken jrieken changed the title Menu items dont sort properly in navigation group Support group ordering Jul 13, 2016
@jrieken jrieken added this to the July 2016 milestone Jul 13, 2016
@chrisdias
Copy link
Member Author

I like the idea of ordering of core menu groups, it keeps the experience consistent even if there are 100s of extensions contributing to the menus.

I realize now that we don't sort the built-in menus, so having the contribution be sorted in that list doesn't make sense either. However, I think I might like to see contributed menus after the built-in menus within a group rather than before. Again, I think this would help make the experience be more consistent regardless of the extensions that are loaded.

@egamma egamma mentioned this issue Jul 14, 2016
89 tasks
jrieken added a commit that referenced this issue Jul 14, 2016
make menu item order explicit with 'order' property (default to 0)
make group order be the natural string order with exceptions for 'navigation' (always first) and falsy groups (always last)
jrieken added a commit that referenced this issue Jul 25, 2016
@jrieken
Copy link
Member

jrieken commented Jul 25, 2016

Groups are now sorted lexically with the exception of navigation which always comes first. Within groups you can sort by adding a number like so navigation@10 or [email protected]. Legacy commands have the implicit order of zero (navigation@0)

@jrieken jrieken closed this as completed Jul 25, 2016
jrieken added a commit that referenced this issue Jul 25, 2016
jrieken added a commit that referenced this issue Jul 25, 2016
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants