config was handled with the commit in #65 which committed patch from #55.
content was restarted at #72.

Problem/Motivation

We need to create a consistent mode for Delete operations. The Node, Comment and Taxonomy views either use a Delete Tab, a Delete Button or both to initiate a delete. There are also contact categories which get the same multiple choice possibilities...

Note: The current patch is just about config entities, as there is discussion about content entities, so imagine comment to be a config entity in the following

1.) Delete comment view (Delete tab, but no Delete button):

CommentDelete.jpg

2.) Delete node view (Delete button, but no Delete tab).

NodeDelete.jpg

3.) Delete taxonomy term view (Delete button and Delete tab):

TermDelete.jpg

Proposed Resolution

Config

Moves delete tab to delete button/link for config entities.
Patch in #55

code review done in #59 by @dawehner

config was handled with the commit in #65 which committed patch from #55.
content was restarted at #72.

Problem/Motivation

We need to create a consistent mode for Delete operations. The Node, Comment and Taxonomy views either use a Delete Tab, a Delete Button or both to initiate a delete. There are also contact categories which get the same multiple choice possibilities...

Note: The current patch is just about config entities, as there is discussion about content entities, so imagine comment to be a config entity in the following

1.) Delete comment view (Delete tab, but no Delete button):

CommentDelete.jpg

2.) Delete node view (Delete button, but no Delete tab).

NodeDelete.jpg

3.) Delete taxonomy term view (Delete button and Delete tab):

TermDelete.jpg

Proposed Resolution

Config

Moves delete tab to delete button/link for config entities.
Patch in #55

code review done in #59 by @dawehner
ui review in #58 by @Bojhan and #62 by @yoroy

Content

Keep the UI consistent by 1) does not have a delete tab, 2) has a delete link
Preserve the ability for someone without edit permission to still be able to access the delete operation.

Discussion summary

Summary Summarized: this issue is just making the *location* of delete more standardized. Not a tab. Make it a action button/link in the same area as, Save, Update, Preview.

(See #7) We discussed this at length in Drupal 7, and decided to go for buttons - since tabs are to be used for navigational purposes only, not actions. It is even represented in our guidelines (see the last recommendation) at Community Documentation Page: User Interface Standards: Navigation: Tabs http://drupal.org/node/1090012.

Edit is an action, (even if it is, it is not solved here) or it is navigating to an edit page where things can be saved, published etc. (See #9 - #20)

Buttons or links

(See #21 - #42)
Patch in #55 is not changing anything related to buttons or links.
In core (without this patch) the delete on image styles is:

<input id="edit-actions-delete" class="button button-danger form-submit" type="submit" value="Delete" name="op">

[This part of summary still needs summarizing.. and perhaps should be moved to a separate issue #43]

  • should it *be* a button, or just be styled like one? aka should it *be* a link, or just be styled like one?

  • HTML5 validation


    #1967112: HTML 5 validation breaks the cancel button in Views UI dialogs argues delete/cancel should be links


    but...
  • exposing tokens to log files by using a link


    concern raised. and responded with: because of hash salt, key length and SHA-256 we will not worry about it. (#42)

Config

#45 - current

this issue is blocking: #2085907: Ensure all configuration entities have an Edit/Configure tab by default which is blocking a better developer experience in API in #1952394: Add configuration translation user interface module in core

Moves delete tab to delete button/link for config entities.
Patch in #55

Config, vs Content

Config entities

For config, there is no separate delete permission. Only users with edit can delete.

Content

For content, there is a separate delete permission.
Will not having a delete tab mean that users with only delete permission but not edit permission cannot delete?
For users with both delete and edit, will they have to edit first in order to delete?
What about operations drop links or contextual links?

Comments

comments are content entities but are a special case.

Others?

are there other special cases?

UI Changes

Config entities

No delete tab. Delete link/button.

Before: Image Styles
image-styles_before.png

After: Image Styles
image-styles_after.png

Content

No UI change.

Node no changes
node-edit.png

Taxonomy Term no changes
taxonomyterm-edit.png

Comments

No UI change.

Comments:
comment-edit.png

Remaining tasks

  1. investigate other CMS's
  2. propose a solution for *content* See the proposed solution section.
CommentFileSizeAuthor
#2 image-style-edit.png122.45 KBtim.plunkett

Comments

gábor hojtsy’s picture

This was creatad as a clone of #1834002: Configuration delete operations are all over the place based on @timplunkett's request to close that down in #1834002-79: Configuration delete operations are all over the place. Now needs an issue summary update to remove the config parts which are resolved there.

tim.plunkett’s picture

Status: Active » Fixed
StatusFileSize
new122.45 KB

I cannot find any delete local tasks except for on comment. This must have been fixed along the way. Here is the image style edit as of today.

ParisLiakos’s picture

this issue is about content entities right? nodes still have a delete tab

tim.plunkett’s picture

In the issue summary it said:

Config entities
No delete tab. Delete link/button.

Content
No UI change.

So unless I grossly misunderstood that, I think we're done here.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

matsbla’s picture

I find this issue a little bit confusing.

It is written:
Content
Keep the UI consistent by 1) does not have a delete tab, 2) has a delete link
Preserve the ability for someone without edit permission to still be able to access the delete operation.

However, for Nodes, Comments and Media there is a Delete tab, but for Taxonomy terms there is not.
People that can delete Taxonomy terms, but not edit them, don't have any link to the edit form.
I opened an issue for it her #3122511: Add missing link to delete form in local tasks for terms