Page MenuHomePhorge

Phriction: when a document is deleted from web, allow to see the related destroy CLI command
Open, WishlistPublic

Event Timeline

This feature request could also be expanded to:

  • show the document destroy CLI command, from the last version - so with PHID-WIKI-
  • show the content destroy command, from specific version - so with PHID-WRDS- (Q87)

I don't think we actually allow "deleting" from the web ui, only hiding it (in the sense that the data is not removed from the database).

Would the request be satisfied if we just exposed the revision phid somewhere in the History views, and the page phid itself?

I mean, we can maybe have a "Delete" button that just shows the related CLI command, like I've seen around (Diffusion maybe)

I feel that adding such a button would clutter the UI.
Users should generally "know" that in order to really delete things, they need to go to the admin, because they don't have the permissions anyway; And adding that just for the once-in-a-while that the admin needs this...

But how about:

  • Add the command to the "Advanced -> View Handle" dialog (or a new item under "Advanced")
  • Allow the Advanced menu to show up for "Admins Only"/"Everyone"/"No one" when not in dev-mode
  • Maybe add more admin-related stuff under that menu

(I think I enabled "Dev Mode" on this server only to be able to have the View Handle/hovercard dialogs).

Premising the user already have an Delete Document button.

When deleting, the user currently sees this (and the delete button disappears):

Document deleted
This document has been deleted. You can edit it to put new content here, or use history to revert to an earlier version.

In that specific page (document soft-deleted) we can maybe show that Destroy Document.

This way even non-technical people understand that they can just contact their favorite Phorge administrator to nuke a big mistake in the history, with that usual popup that explains this very well, pointing here as usual:

In that case, we don't even need another button - just add a line to the "deleted message" that says something like "To completely remove the history from the database, contact your admin".

I see. Maybe the root problem is that I'm in love with that Diffusion popup 🤔

Why? Phorge is very good at self-documenting and help both users and admins. The Diffusion "destroy popup" is just very good at that.

Why? When an admin lands there, they love that copy-paste instruction.

Why? It drammatically speedups the fulfillment of the deletion request.

But in Diffusion, that button is hidden behind a "Actions -> Manage" button, inside a screen that also has dozens of other admin actions. The clutter cost there is minimized.

Also, I'm not convinced this "dramatically speedups" the deletion process - it helps explaining the flow, but once the admin knows they need to open a terminal and type in a command, the dialog only provides the short name of the repository, which is easy to find elsewhere.

In most other objects, we don't have a separate Manage page, so the UI cost of adding another button outweighs, IMO, the benefits of documenting an operation that (1) most users can't take anyway and (2) only happens rarely.

OK I see. Indeed we should not put any similar button anywhere else.

But visiting a page that has already been deleted is already something unusual. I don't think it slows down any other workflow, than destroying 🤔

Yeah, in this one special place it doesn't matter; But that page already have a special body, so we can save even the extra click by putting the message right there...