-
Notifications
You must be signed in to change notification settings - Fork 531
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
Look into tree tooltip API #2592
Comments
Some ideas for containers:
|
Ideas for the PanesNot in order of importance. I looked through each of the inspect documents and picked out which attributes I thought might be important I'm open to discussing if Name for each of these artifacts would be redundant or would be good to have since the tooltip may cover the name 🤷🏽♂️ Containers:
Files in Containers
(any way at all to create markdown copy and paste button? or hover to make it easy to copy container ID for container) Images:
Registries: (probably not)(when hovering over registry image):
Networks:
Volumes:
Contexts:Personally, I didn't see any information that looked super important, but if it is...
|
Depends on microsoft/vscode-azuretools#835. |
Example of a Container Tool Tip:Name: beautiful_galois (5460373f9bec)
Volumes: (table format required)
(The source folder for bind mounts should be openable with a click)
Labels: (probably will not be displayed due to size) - Could we just show the first 5?
Thoughts? This is likely entirely too big. But I was thinking that a table format made the most sense for the 1-n attributes. Any and all table header names can be adjusted as well. Just a starting point |
I wonder if it would be possible to make this customisable via a template, similar to the I'd be up for prototyping something like that if it was possible. |
We're starting some work on that right now, with Handlebars templates being used. I'd certainly be interested in what you want to see in the tooltips; it's pretty likely things we'd all want. In the interest of performance, I have hardcoded the Handlebars template strings, but it certainly would be possible to make them customizable somehow (files or settings or something). |
I'd be interested in everything that the current tree item knows honestly. The only thing that seems potentially tricky is the case with specific labels. How should the template render if that label isn't present? Would be cool if the template could have conditions on it, if a certain label is present render differently than if it's absent. |
We definitely can't show everything, but we're hoping in general to show a curated subset of what you'd see as an inspection result. Also, nice and neat and markdown-y. |
Apologies, I only meant that if users can define templates I'd be interested in having access to all of the tree item's data. Also I was making the assumption that this would be done without another API call, so it could only be a subset of the inspect data anyway. |
Ah, I understand what you mean. It's not set in stone yet but my thought was to do an inspect, and feed the entire inspection result to Handlebars as the context. Should open up a lot of possibilities. I've also done some stuff to expand upon what comes from inspection. For instance, network inspect has a list of containers using the network, but volumes has nothing like that (and desperately needs it). So, in our translation layer, I fetched a list of containers using the volume, and tack them on to the inspect result in roughly the same shape as what is provided by network inspect. |
Having the entire inspection contents available to the template could definitely open up some exciting possibilities. I'm interested in what the performance is like from that, having to inspect the container then render into a template seems potentially slow. |
Same, especially in remote scenarios it could be slow. The first tooltip is also gonna be a bit extra slow; we lazy-load a lot of larger dependencies, Handlebars included. I'll definitely come up with some perf data when I open my PR. |
Suggestions:
|
This is now released in Docker extension version 1.10.0. |
There's a newish tree tooltip API supporting markdown that looks interesting: https://code.visualstudio.com/updates/v1_52#_markdown-tree-tooltip-api
We should see if there are some interesting ways we could use this API.
The text was updated successfully, but these errors were encountered: