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 an explorer/title menu contribution point #108271

Open
eamodio opened this issue Oct 7, 2020 · 12 comments
Open

Add an explorer/title menu contribution point #108271

eamodio opened this issue Oct 7, 2020 · 12 comments
Assignees
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues
Milestone

Comments

@eamodio
Copy link
Contributor

eamodio commented Oct 7, 2020

Currently extensions can't contribute to the Explorer's title menu

image

It would be great to allow this. For example it would allow for a better UX in the Toggle Excluded Files to add the toggle there rather than omni-present in the statusbar (See #103536 for an ask)

@isidorn
Copy link
Contributor

isidorn commented Oct 20, 2020

@eamodio I think this is a fair request.
However, I would be worried that too many actions end up being there which would lead to too many details.

So for now no immediate plans but let's leave in the backlog and I am open to allow this in the future if there are more good use cases.

@isidorn isidorn added feature-request Request for new features or functionality file-explorer Explorer widget issues labels Oct 20, 2020
@isidorn isidorn added this to the Backlog milestone Oct 20, 2020
@eamodio
Copy link
Contributor Author

eamodio commented Oct 24, 2020

😢

@gjsjohnmurray
Copy link
Contributor

However, I would be worried that too many actions end up being there which would lead to too many details.

@isidorn that could be mitigated by implementing a '...' secondary actions menubutton which would appear if at least one contribution to explorer/title specified a group that disqualifies it from being a button on the title. The `scm/title' menu operates this way.

@JacksonKearl
Copy link
Contributor

An "Add config files to project" extension would be a good client of this menu, probably others. Following SCM view's lead as @gjsjohnmurray suggests sounds reasonable.

@jaredbroad
Copy link

🙏 Please reconsider for the backlog @vscode-triage-bot

@JacksonKearl
Copy link
Contributor

On Deck is higher than Backlog

@jaredbroad
Copy link

jaredbroad commented Dec 1, 2021

Awesome thank you @JacksonKearl! Maybe for the December 2021 milestone then 😁 🙏

'...' secondary actions menu button

Also -- is this issue generally "panels adding to their title bars" or specifically the explorer panel? It would be nice if all panels operated this operated as an overflow -- e.g. 3 buttons can appear in the bar but on the 4th it appears in the ... section.

@JacksonKearl
Copy link
Contributor

Explorer panel only. Some of the other panels already support contributions, such as SCM.

@jaredbroad
Copy link

Do custom panels support buttons @JacksonKearl? We couldn't find anything about it.

@JacksonKearl
Copy link
Contributor

@jaredbroad yes, I know GitLens's panels have actions, I assume the code is pretty much the same as core's panels.

@dmalan
Copy link

dmalan commented Sep 7, 2022

Just to add to the mix with a use case we have in mind in educational contexts, Codespaces tends to assume that a user's default workspace is /workspaces/foo, but users can open a specific subfolder therein, as file File > Open Folder. E.g., if a user opens bar, they'll find themselves at a URL like https://{name}.github.dev/?folder=%2Fworkspaces%2Ffoo%2Fbar. Once there, though, it's not particularly obvious in GUI how to pop the stack to escape bar, except via, e.g., File > Open Folder again or by changing the URL to https://{name}.github.dev/?folder=%2Fworkspaces%2Ffoo.

Via an extension, then, we're hoping to add a "parent folder" icon to Explorer that takes students to .. with a single click or perhaps even a "home folder" icon that takes students back to /workspaces/$RepositoryName.

We can contribute such now via view/title, but the icons then end up appearing in multiple views, not just Explorer. Ideally, it'd be possible to scope such to that specific view, a la:

{
  "command": "extension.home",
  "group": "navigation",
  "when": "view == explorer"
}

Many thanks!

CC @rongxin-liu @jkeech

@lramos15
Copy link
Member

lramos15 commented Sep 7, 2022

We can contribute such now via view/title, but the icons then end up appearing in multiple views, not just Explorer. Ideally, it'd be possible to scope such to that specific view, a la:

The explorer already has 4 icons which is where we normally cap number of displayed icons in a view panel. As @gjsjohnmurray stated once this is implemented these contributions are likely to exist as a ... menu within the explorer. I'm curious if you feel this will hinder student's discovery of the action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality file-explorer Explorer widget issues
Projects
None yet
Development

No branches or pull requests

7 participants