Open Coderambling opened 1 month ago
The Image pane is a "macro" pane that select one of the other more-specific image panes to do the actual work (whichever one first recognizes this particular image). So those other panes are still necessary, as currently implemented.
If we want to reduce the visible API surface, we could probably find a way to hide those panes from the Component Gallery top-level listing, making them reachable only via the Image pane. But that could confuse anyone looking for info on e.g. the SVG pane in particular, so I'm not sure it's necessarily a net win. So I'm neutral (neither for nor against) that idea.
Hm I see. That makes sense. Maybe add your sentence below to the Image pane doc for clarity?
"The Image pane is a "macro" pane that selects one of the other more-specific image panes to do the actual work (whichever one first recognizes this particular image)."
Made PR to add that sentence to docs:
In the component gallery, there is the image pane. Then there are 5+ separate panes for specific image formats.
That is 10% plus of the panes in the Gallery.
Is that a huge duplication, and should that be addressed, to reduce the footprint of the Panel API?
See also remark in this discussion that mentions reducing the visual API surface of Panel. https://github.com/holoviz/panel/issues/6729
Are all the current other image formats, with separate panes, covered by pn.Image? With feature parity?
Does it accommodate moving gifs?
From the doc:
https://panel.holoviz.org/reference/panes/Image.html
The Image pane embeds any known image format file in panel if provided a local path, or will link to a remote image if provided with a URL.
jpg_pane = pn.pane.Image('https://assets.holoviz.org/panel/samples/jpeg_sample.jpeg') png_pane = pn.pane.Image('https://assets.holoviz.org/panel/samples/png_sample.png') webp_pane = pn.pane.Image('https://assets.holoviz.org/panel/samples/webp_sample.webp')