-
Notifications
You must be signed in to change notification settings - Fork 524
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 for multiple selection of items and actions on these items (batch) #331
Comments
Not sure this is possible in the views, need to find out. |
@wlsc FYI, if you select "Stop Container" from the Containers node directly, there is an "All Containers" option. Does that suffice for you? If not and view can't do it in the view, we could consider using a checklist when people do this from Containers node. |
@StephenWeatherford thanks for your reply. I have a use case where I do need to stop/remove 3-4 containers from 9 in total. Unfortunately, I do not want to stop or remove them all. |
@wlsc it's been a while - but I believe this was fixed for you in #966. If you run "Stop Container" from the command palette, you will see something like this: You can try out the latest from master with these instructions: https://aka.ms/azcodeInsiders The only reason I didn't close this yet is we still don't allow users to multi-select directly in the tree. Not sure how necessary that part of the feature is. |
A possible intermediate solution is to add a 'Action'/'Do' button in the CONTAINERS title, on the left of 'Prune'. It would be a dropdown with 'stop', 'remove', etc. Each of the items would point to the corresponding 'Docker Containers: ...' command. |
Multi-select support for custom trees in VS Code is being tracked here: microsoft/vscode#76941 @1138-4eb It's in the "August 2019" milestone so I guess I'd prefer to just wait for that |
One quirk that I've found while investigating proper multi-select relates to commands which are conditionally shown (for example, the "Stop" command is not shown for already-stopped containers, likewise "Start" for already-running containers). If you select multiple items, and right-click one of them, the one you right click decides which commands are shown. For example, if I multi-select a stopped and a running container, and right click on the stopped one, I'll see "Start" (and more); whereas if I select those two and right click the running one, I'll see "Stop" (and more). I think this is probably not a serious issue since most of the time people will select items for which an action would be valid on all (i.e. they probably won't try selecting a stopped and a running container, and doing "Start"). Nonetheless we do need to investigate what will happen if I request an invalid action, and potentially have code ignore it where it isn't valid. |
@eine alludes to this in #1494. Certain commands are currently implemented as single only, I'd like to hear what people think--whether it even makes sense to turn them into multi-select capable. All those commands which are currently multi-capable via the command palette, IMO should become multi-capable via context menu. For containers this includes stop/start/restart, and for all it includes remove.
@wlsc @eine @TiemenSch @wintercreative, also @BigMorty @EricJizbaMSFT @StephenWeatherford @karolz-ms : what do you guys think? Are there any that are currently single-only that you feel should be multi-capable? Here are my thoughts:
|
@bwateratmsft I think you've got the right matrix for single/multi select support. I'd stick with "single" for inspection and logs commands, at least until we see a real need/desire for multi-select. I also agree that the registries tree view is complicated enough to leave single-select for now; if there's a need for multi-select for certain nodes (e.g. |
Agreed with the general approach; I think we are at a good starting point. The multi-select for logs would make sense if we decide to do some sort of integrated log viewer for multiple containers, where you can see logs sorted by time and thus observe interactions between various containers. Until then it makes most sense to stick with single-select for this command. I would consider multi-select for |
Thanks @bwateratmsft! I'm so glad to see this moving forward. I do think that all the commands that can be harmlessly applied to multiple targets should be enabled/supported. With "harmlessly" I mean when the difference is a matter of using Personally, attaching VSCode to multiple containers (opening an instance in each of 2-3 containers) is a feature that I would use a lot. I would follow the same pattern for Images, so My motivation to suggest this approach is consistency. Having multiple targets supported for some commands but not for others because of arbitrary reasons can be frustrating for users. For Registries, there is a technical motivation (complexity). For others, it feels like some preference/bias. Note this is neither a criticism nor something I have a strong feeling about; but just an observation. |
For the others, I'll create a new GitHub issue so we can gauge the importance for them. |
Created #1631. |
@bwateratmsft your list above looks like a good start. Agree we should consider the others @eine mentions. @karolz-ms had the same idea I did regarding View Logs for multiple containers, having it show in all the logs integrated in time order would be awesome. That said, it would probably be a separate command like "Show Integrated Logs" or something. |
@bwateratmsft - Should this issue be reopened or are we tracking it with a separate issue? |
Great, thanks! |
Multi-select is now available in Docker extension version 1.0.0. |
big 👍 and thanks to everyone who participated to make this happen! 🎉 🎈 🎈 🎈 |
Thanks @wlsc, the team worked hard on this release and we appreciate your nice comments! 😊 |
It would be very helpful, if one would have an opportunity to select multiple, for instance, containers and then remove or stop containers with just one click. Current behavior: one is forced to select and remove/stop containers one by one.
The text was updated successfully, but these errors were encountered: