-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[explorer] implement 'more' toolbar item for the explorer #5953
Conversation
I'm blocked for certain commands, example |
|
I wasn't aware that other extensions can contribute to the toolbar items defined in a different extension. Must I expose it somehow? |
@vince-fugnitto I'm not sure what you want to expose? The registry of toolbar items is global. Any extension can register item and then do an instance check whether the current widget is a navigator or not for |
Sorry I was just confused if it was possible to contribute to the same toolbar item, confused as to how it should be referenced from another extension. |
a591970
to
c171f29
Compare
e8cb6f6
to
e58e858
Compare
The current menu item generates the correct behavior. Nevertheless, I think the following commands should also be available from the menu as a minimum:
I noticed that if I add a second root workspace, then remove it, the "..." in the menu bar does not come back, so unable to select any commands anymore |
e58e858
to
4baff8d
Compare
Updated to include:
|
Added.
I only display
The toolbar is only displayed in a single-root workspace (no root node is visible in the tree). |
packages/terminal/src/browser/terminal-frontend-contribution.ts
Outdated
Show resolved
Hide resolved
4baff8d
to
b012d55
Compare
9d73b7d
to
811e6c1
Compare
@akosyakov @lmcbout @svenefftinge |
@lmcbout |
@vince-fugnitto Ok, so If I collapse the workspace, there is no "..." to select and get to the "Compare with..." command. The minute I select any folder, impossible to select the "Compare with for the workspace ? |
Correct, that is the proper implementation of panels in a view container. |
So, how to get to the "Compare with..." command if there has been a selection of file/folder and I want to compare the whole branch, not just a sub-folder ? |
I was not aware we could un-select on Ubuntu, (CTRL + mouse left click)
|
I believe it's pretty standard across all operating systems, similar to multi-select.
I disagree, it's pretty well known how to select, un-select and multi-select.
I guess it can be added in a general user guide in the future.
I think it'd be overkill to have such commands when it can easily be un-selected with a click.
The command |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works nicely, but the code needs clean up.
@vince-fugnitto I think it is important to have this PR done for 0.10.0. If you can please make it your priority to wrap it up. |
e016d58
to
d7c686a
Compare
@akosyakov I've updated the code based on your comments :) |
d7c686a
to
24585fe
Compare
24585fe
to
d4aee1e
Compare
Thank you for the feedback @akosyakov, I now updated the code and also pass |
@vince-fugnitto please have a look again |
Fixes #5951 Fixes #6010 - Added a new toolbar item for the `explorer` which consists of multiple commands. - Adjusted the `WorkspaceRootUriAwareCommandHandler` to better handle commands which can be used by the workspace root in both a single and multi-root workspace. - Added the command `New File` to the toolbar item. - Added the command `New Folder` to the toolbar item. - Added the command `Add Folder to Workspace...` to the toolbar item. - Added the command `Compare With...` to the toolbar item. Signed-off-by: Vincent Fugnitto <vincent.fugnitto@ericsson.com>
d4aee1e
to
82e6662
Compare
@akosyakov are there any other changes required before merging? |
@vince-fugnitto code looks good to me now, i gave a quick test and it works well also |
@vince-fugnitto please merge, as soon as you are online |
Thank you @akosyakov for the help and review :) |
What it does
Fixes #5951
Fixes #6010
explorer
which consists of mutliple commands.WorkspaceRootUriAwareCommandHandler
to better handle commands whichcan be used by the workspace root in both a single and multi-root workspace.
New File
to the toolbar item.New Folder
to the toolbar item.Add Folder to Workspace...
to the toolbar item.Compare With...
to the toolbar item.Available Toolbar Item Commands
New File
New Folder
Add Folder to Workspace...
Compare With...
How to test
test the following commands in a single-root workspace
1.1.
New File
: creates a new file at the root if no selection is present, else it creates it at the selection.1.2.
New Folder
: creates a new folder at the root if no selection is present, else it creates it at the selection1.3.
Add Folder to Workspace...
: adds a folder to the workspace1.4
Compare With...
: if no selection it uses the root, else it uses the selection. prompts the user to select a branch to compare totest the following commands in a multi-root workspace (with roots)
2.1.
New File
: creates a new file at the first root if no selection is present, else it creates it at the selection.2.2.
New Folder
: creates a new folder at the first root if no selection is present, else it creates it at the selection2.3.
Add Folder to Workspace...
: adds a folder to the workspacetest the following command in a multi-root workspace (without any roots)
3.1
Add Folder to Workspace...
: adds a folder to the workspaceReview checklist
Single-Root Workspace
New File
New Folder
Add Folder to Workspace...
Compare With...
Multi-Root Workspace
New File
(adds to first root)
New Folder
(adds to first root)
Add Folder to Workspace...
Compare With...
Multi-Root Workspace (no roots)
Add Folder to Workspace...
Reminder for reviewers
Signed-off-by: Vincent Fugnitto vincent.fugnitto@ericsson.com