Unsharing should be guarded by confirmation modal

When a notebook is shared, a specific shared version will remain accessible through its version identifier, even if later on a newer version is shared or published.

When a notebook gets unshared or unpublished it becomes completely inaccessible to other parties. However, resharing the notebook will not restore access to previously shared or published versions.

Given their proximity to “View history”, the options “Disable link sharing” and “Unpublish” are prone to be triggered accidentally. Due to their destructive nature (as described above), executing them should require additional confirmation (just like “Enable link sharing” does).

Note: Ideally I’d prefer these options to be non-destructive, i.e., access to shared versions can be restored, but I’m assuming that a modal is a lot easier to implement.

4 Likes

To add to the list of irreversible changes, existing likes are also lost.

Just deployed a confirm() check for unpublishing and disabling link sharing. Maybe try it out and let us know how it works for you.

2 Likes

Works as intended. :slight_smile: I also tested a reload while the confirm modal was active, and tested it on an unresponsive notebook.

Will this eventually be replaced by a proper react modal, with a short description of the consequences of unpublishing/unsharing?

Eventually, but there wasn’t an obvious phrasing for that description so I decided to at least ship the confirm. There’s also some related work going on I’m hoping will pick it up and improve it.

@visnup Unfortunately the actions in a notebook teaser’s context menu are still unguarded. :slightly_frowning_face:

Noooo… fixing.

Though now that I’m back in the code, I should take the time to use a nicer modal dialog with better explanatory text.

3 Likes

Deployed a quick confirm dialog for the listings context menu. But, I’ll work on a nicer modal with explanation next week.

2 Likes