Problem/Motivation
In the current state paragraphs has a two step solution that is implemented with ajax to let a user delete a paragraph and then present her/him with an option to restore the paragraph (in the case that action was unwanted). The process of "really" removing is time consuming because you have to wait twice for the ajax call to remove and confirm. Also the fact that both actions are hidden in a dropbutton makes that even harder. Since the case of accidental removal is rare we want to introduce a different approach both visually and in implementation.
Proposed resolution
The delete buttons should be easily accessible and a confirmation for deletion should be implemented with client side JS so the action can be performed fast and safe at the same time.
See first wireframes:

There are two issues that are related to that in the paragraphs issue queue:
- For having a separate icon button for delete: #2829676: Change remove button by an "x" and #2825570: [META] Introduce new action elements
- For getting rid of the restore action: #2831409: Remove Confirm Deletion / restore actions for paragraphs
Remaining tasks
Refine the concept regarding button style and confirm dialog placement
Create a design for thunder_admin theme
Implement the solution together with paragraphs module maintainers
| Comment | File | Size | Author |
|---|---|---|---|
| delete_paragraph.gif | 55.4 KB | pixelmord |
Comments
Comment #2
pixelmord commentedI created a feature request for the functionality at #2833934: Introduce client side remove, with confirmation? and undo
Comment #3
miro_dietikerYeah, as discussed. :-)
I have committed the removal of the server side double delete because it adds complexity in the states and is IMHO not of real value, except adding another paragraph specific behavior that is different from everything else.
Most importantly this was possible without IMHO creating severe regressions, because even after confirmation, teh removal was not final. It needed an additional save. And that again can be reverted with revisions.
Thx for creating the issue to readd the double confirmation on client side.
I would hope that adding a client side double confirmation in Paragraphs would also cover your needs.
Currently we are in discussions, how the remove button should appear, most importantly with the hover effect. Core seven style guide proposed to introduce "X" icons for removal, that was never adopted in core. We want to hear feedback from the Core UX leads and implement it in a similar way to how core will adopt it (possibly later).
Comment #4
mtodor commentedDelete confirmation feature is added in paragraphs features module with following issue: #2974962: Add a delete confirmation form for the paragraphs experimental widget UI
Comment #5
chr.fritschLet's mark this issue as fixed. @mtodor stated in #4 that we have a client-side validation, so we are done.