podman-desktop icon indicating copy to clipboard operation
podman-desktop copied to clipboard

Display files into Image layers

Open feloy opened this issue 1 year ago • 4 comments

Signed-off-by: Philippe Martin [email protected]

What does this PR do?

This Pr started as a PoC realized during devtools week 23Q4.

A new "Files" tab is added to the Image details. This new page lists the layers of the image, and for each layer, the files contained in this layer, in a way similar to dive does.

Screenshot / video of UI

https://github.com/containers/podman-desktop/assets/9973512/9ba11327-ddc6-4ea7-9ad7-74f5ece6437f

feloy avatar Dec 15 '23 15:12 feloy

This addition is awesome, I love it! However, I think it needs a bit more UI work (and fixed tests) before merging.

Some initial reaction:

  • Maybe the tab should be called Layers so that we don't need a title within the tab?
  • Can't tell which layer is selected. Scrollbar at bottom isn't great either; maybe we use ... and full name on tooltip?
  • Can we all overall layer size or reference to which line in the containerfile caused it? I haven't looked at what the API is but those would be really nice to add.
  • Initial layer root should be initially expanded.
  • File attributes and size are nice, but then folder/files don't line up nor even files within a folder. Maybe needs a design suggestion here, either columns or a fixed font.
  • One of the other tools I looked at used color to indicate when a layer added a new file vs removed or modified. Not accessible by itself, but would be a really nice addition to this.

As long as the core UI issues are addressed I would be fine if some of these were tracked via future enhancements, they were just top of mind as I reviewed.

deboer-tim avatar Dec 17 '23 19:12 deboer-tim

I love this feature!

image The scrollbar are a bit weird in my opinion. The entire page should be scrollable in my opinion, not only the layers, and filesystem.

I feel also that the spacing between the information is a bit too big, image

I get it mimic the result of ls but I feel like there are too much space between the permissions and the rest

Here, the user and group are 0 and 0, but they could be 1000:1000, which could take more space

feloy avatar Mar 06 '24 18:03 feloy

I'm wondering ft it would be better to have this functionality as an extension.

What is missing today in the API is that an extension can register a new tab in a Details page (here image, but I have other ideas of extensions on container, pod, deployment, etc). The extension would get as entry the information of the object (image, etc), and would have access to a webview, which would be placed in the tab.

@benoitf wdyt? Do you think it would be reasonably possible?

feloy avatar Mar 07 '24 09:03 feloy

Every screen could be provided by extensions. All the kubernetes stuff could be done with extensions, etc. It's where we are putting the cursor.

I'm fine having it as an extension. But where I'm struggling is that if it needs to be a webview or we could have the generic TreeView component (not tied to directories/files). I mean, if we could have something like for the checkers, it could be better if it could be only backend extensions.

So I would prefer if the extension, if possible, should not provide a webview, but just a TreeView data provider that would be displayed by the core of Podman Desktop

And then extension could say: Register a TreeView provider for details tab

I think it would be beneficial for both Podman Desktop and other extensions if we don't need specific webviews as it's more complicated to maintain. (on the extension side) and will always be less integrated

benoitf avatar Mar 07 '24 09:03 benoitf

Closing for now as there is no clear indication that users would be interested by the feature

feloy avatar Jun 16 '24 13:06 feloy