Export container should not use dedicated store
Is your enhancement related to a problem? Please describe
Currently we have an router path /containers/export which requires a store
https://github.com/containers/podman-desktop/blob/8419cb69b7608045f2f4a96808a436335054a4e1/packages/renderer/src/stores/export-container-store.ts#L27
When the ContainerAction wants to export a container it fill the store with the ContainerInfo, then redirect to the page.
https://github.com/containers/podman-desktop/blob/423d44cc7857dc3c1b225c4a17ce37623dda9923/packages/renderer/src/lib/container/ContainerActions.svelte#L118-L119
This seems to be a very weird and heavy pattern for nothing.
Describe the solution you'd like
Proposal: change /containers/export to /container/<container-id>/export so the component can fetch the container id, and the corresponding ContainerInfoUI it requires.
We then can delete this store and avoid having all managed in the export component with the router parameter
Describe alternatives you've considered
No response
Additional context
No response
cc @benoitf @deboer-tim @lstocchi any opinion ?
I agree
I think that the plan was to extend this to support multiple containers export eventually but we were busy on other things and never update it
I think that the plan was to extend this to support multiple containers export eventually but we were busy on other things and never update it
FWIW when/if we support multiple containers I think changing the URL pattern to something like '?id=
I think that the plan was to extend this to support multiple containers export eventually but we were busy on other things and never update it
FWIW when/if we support multiple containers I think changing the URL pattern to something like '?id=' with multiple params allowed is better than URL+store
Yes I was thinking the same