ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Files screen: add pinning option to bottom bar when multiple files selected

Open jessicaschilling opened this issue 5 years ago • 3 comments

The third and fourth panes in the pinning service integration Files screen mockups depict a workflow for setting pinning on multiple files. However, this was de-scoped from pinning integration MVP due to unexpected complexity (orig https://github.com/ipfs-shipyard/ipfs-webui/issues/1500#issuecomment-717483195):

  • when user selects multiple items a bottom drawer is displayed with operations that could be applied to all of them
    • Q: should we support bulk pin control when multiple files are selected this way?
    • A: we could, but not in scope for MVP.
      • Rationale: this is additional work which needs more thought. We could either:
        • pin each selected item separately,
        • or we could follow logic used by Share action and create ephemeral directory that contains selected items and only pin the root CID

This issue exists to isolate and implement that work at a later date. cc @rafaelramalho19 @lidel

Related request from @tcll to implement, regardless of pinning services: https://github.com/ipfs-shipyard/ipfs-webui/issues/1681

jessicaschilling avatar Oct 28 '20 14:10 jessicaschilling

Quick feedback after playing with stage 1 (https://github.com/ipfs-shipyard/ipfs-webui/pull/1685) implementation:

  • I believe we should pin each selected item separately

Rationale: the way we will do remote pin status check is to:

  1. check if file is pinned
  2. check if any of its parent directories is pinned

:point_right: due to this, we can't do what we do for Share (create ephemeral directory with selected files and only pin the directory's CID). That would make it impossible to detect remote pin.

Just for reference, below is current UI from #1685 (i forced pinning modal via context m,enu on a single file, thus different file size – ignore it, i made screenshot for something else).

For MVP we should enable Set pinning option and make it issue ipfs.pin.remote.add call for each CID separately.

2020-11-06--21-32-35

lidel avatar Nov 10 '20 14:11 lidel

Makes sense, and probably hews closest to most user's mental model of how this would actually work anyway - the ephemeral directory thing is a bit hard to wrap one's head around if you're thinking within the context of other ordinary file systems.

jessicaschilling avatar Nov 10 '20 15:11 jessicaschilling

need to confirm whether this was already addressed by https://github.com/ipfs/ipfs-webui/pull/1919

SgtPooki avatar Dec 02 '22 22:12 SgtPooki