I worked with some kind folks in the UX team to promote the delete button on the node edit form to a local menu task (aka tab) like edit, view, track and revisions are. The general consensus is that this is a good thing but Dries would like to unify the interaction model across core if we push it through. I couldnt agree more. This issue will track down the "Delete from edit form" instances in core and attempt to standardize them as well. Ill start with a list and is its easy enough patch assigned to here. if its too complicated ill roll separately on diff issues.

The reasons behind removing the delete from the edit form are numerated in the isssue mentioned above: #196758: Having delete as a button on the node edit form means certain users don't have access to it when they should

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michaelfavia’s picture

Ok so i tackled this item in a personal blog post and ill create a bunch of dependent issues and link to them in the comments here for my own organization while i push this through. I have to perform a little usability testing onthe 2 major use cases (node and admin settings) but webchick is in favor and so is catch (if the usability studies back it up. stompeers has already offered to help with the patches. Good day.

Blog post describing: http://favias.org/post/good-riddance-delete-edit-form

catch’s picture

Subscribing.

We add random other buttons to forms (Preview, Save and add another, Preview diff, Reset to defaults) - which can make the delete button inconsistently placed, and core can't at all control a sensible pattern - since contrib modules have to use hook_form_alter() to add to those buttons and don't know each other's weights out of hundreds of combinations.

Having delete as a tab gives us a pattern that's far more easy to survive when contrib modules are added - less contribs add local tasks to these pages, and hitting the wrong tab is less permanent than hitting the wrong button.

Sites that don't want a tab for whatever reason can also easily make this a callback with hook_menu_alter() and either add it back to the form, or use the wordpress-style link if they want. Arguably that'd be less work than doing it the other way 'round.

So big +1 from me.

Tor Arne Thune’s picture

Version: 7.x-dev » 8.x-dev

Still a valid issue. Moving to 8.x.

Dave Reid’s picture

Assigned: Unassigned » Dave Reid

Huge, huge +1 to standardize on *not* having different operation buttons on our edit forms. It should be a local task. I'd like to help fix this for D8.

Dave Reid’s picture

Status: Active » Needs work
FileSize
9.32 KB

Initial patch, likely to fail any tests that clicked the delete button on the forms.

Bojhan’s picture

Its great to see an initiative to streamline this experience more, its quite confusing currently that there is multiple places where one can find the delete button. Sometimes on the object, other times in the listing. I have actually been giving this quite some thought, as I was starting to write out the "buttons" pattern I noticed the many inconsistencies.

Lets first take a look at our standards http://drupal.org/node/1090012 .In #542658: Move action "tabs" out of local tasks we introduced the change of splitting local actions from listing pages. This to make clear that tabs are for navigation, and other patterns are used for actions - from the usability testing done so far - this distinction works, and people are able to easily find the "add" actions. Although we have not tested "Delete" actions, users did quite often make the step of deleting content with little to no problems.

I do not believe that the right step is to bring delete to a local tab. It is the mistake we made in the past, which caused local tabs to be diluted with a mix of navigation and actions (currently Edit, is the only one we allow there). But more importantly, the local navigation is very prominent and "Delete" should not be prominent. If you are worried about hitting delete next to save, it will be even more of a problem at Edit and Delete.

If we look at other systems, few to none of them have a local tab for Delete. So introducing this here, would very much be a Drupalsim. I propose rather than moving it, we make it more consistent - each object should have a delete button on its edit form and in the listing. We should design forms with two buttons to have more consistency #1238484: Ability to mark the form buttons to be of a specific type (so that they can be styled differently) and possibly add a :hover style for delete buttons so its easy to spot a mistake.

When it comes to the edge case described in #196758: Having delete as a button on the node edit form means certain users don't have access to it when they should, to me just means that listings should always have delete buttons.

michaelfavia’s picture

@bojhan I'm all for making useful patterns out of the mess that was MLT's.

What about implementing contextual links on the node/taxonomy content to hold "edit" and "delete" actions. Contrib modules could add useful things like publish, workflow, nodequeue, etc.

By default we wouldnt have need for the MLT's on node items but enabling something like the devel module would show the devel view and other modules would have the opportunity to do the same.

Providing the ability to configure the contextual actions on the content types, and taxonomy vocabularies might alos allow for a degree of control that content managers woudl appreciate.

I realize this is quite a bit of a forward looking statement but the first step is unifying the edit and delete options into a contextual menu i think.

sun’s picture

Gábor Hojtsy’s picture

Well, #1834002: Configuration delete operations are all over the place might be a duplicate of this one since this patch moves all delete operations to local tasks instead of buttons on forms, pretty much unifying the whole thing.

sun’s picture

Unlike #1834002: Configuration delete operations are all over the place, this issue here jumped straight to a conclusion without prior investigation. @Bojhan seems to strongly disagree with the proposed solution, and I can perfectly understand why (because I'm also skeptical whether it is appropriate to make a destructive operation this dominant).

I think a solid plan and solution needs a proper investigation to be grounded on well-informed decisions. Also, "what are others doing" is a major aspect to this in my book. Especially, since this affects not only site owners/administrators, but also all "end-end-users" of all Drupal sites (i.e., those users and site visitors who don't even know what Drupal is).

YesCT’s picture

Title: Unify "delete item" model across drupal core » Unify "delete item" model across drupal core by making delete a button and not a tab
Assigned: Dave Reid » Unassigned

I think the investigation was done and the result is http://drupal.org/node/1090012
which says delete should not be a tab.

I closed #1834002: Configuration delete operations are all over the place as a duplicate of this.

Next step: reverse what was started in the patch in #5, and instead:
remove the delete tabs and add delete buttons.

since @Dave Reid 's last patch was a while ago, I think it's ok for someone else to take a stab at this. (sorry Dave, reassign it if you would still like it.)

andypost’s picture

I think delete is a separate operation so it needs a own router and callback. Also having delete as button on Edit page means that user needs Edit and Delete access to perform Delete!

Bojhan’s picture

Title: Unify "delete item" model across drupal core by making delete a button and not a tab » Regression: Turn "delete tabs" back into buttons

I am fixing the title. Introducing modals, is not necessarily part of this - its an optional addition.

YesCT’s picture

Status: Needs work » Needs review
FileSize
1.06 KB

this does not do much. it just removes the tab on the taxonomy view.
I could not figure out how to add a delete button on the comment edit.

Status: Needs review » Needs work
Issue tags: -Usability

The last submitted patch, drupal-unify_delete-402760-14.patch, failed testing.

YesCT’s picture

Status: Needs work » Needs review
Issue tags: +Usability
catch’s picture

I mostly agree with andypost in #12. It should be possible to allow users to delete stuff without editing it, and there's a long-standing issue trying to address that (by moving delete operations to tabs).

I don't see any justification for changing this except that there's some inconsistency at the moment.

Bojhan’s picture

Why can't it be a contextual link? Probably because tabs is the sole constant in our UI, which is a bit weird.

Anyways, I dont think we can introduce a major UX regression to solve a small problem - that should be dealt with separately.

klonos’s picture

For the "need edit permission in order to delete" issue, how about instead of blocking access to the edit page (that holds the "delete" button) altogether we instead allow people to access it (as in being able to view it) but have all widgets locked and no "Save" button? So, I guess what I'm trying to suggest is that the "Edit" permission does not effect the visibility/access of the edit page itself, but rather the elements contained in that page/tab.

As for the concerns about the "Delete" action being a button means that a destructive action could be performed by accident, how about we use modal confirmation dialogs now that they're in?

Going this way would solve both the "delete should be a button - not a navigation tab" and the "need edit permission in order to delete" issues.

Bottom line is:

- "Delete" is an action and having it be a navigational element simply feels weird - it should be a button.
- Deleting is a subset of the editing action and residing in the "edit" form feels right. It is also a common UI practice (deleting a contact in iphones for example requires you to go to the contact screen and hit "edit")

PS: ...I don't mind bringing edit/delete contextual links in the game - as long as this is in addition to the "Delete" button in the form.

andypost’s picture

There' was a issue about converting Delete confirmations to use modal somewhere in #1842036: [META] Convert all confirm forms to use modal dialog
Also there's issue to draw a bottom line for Delete buttons #1834002: Configuration delete operations are all over the place

Dave Reid’s picture

I disagree with removing delete as tabs. This puts the requirements on contextual links. Why can't delete be both a tab and a contextual link? It's possible to do both.

Bojhan’s picture

Please see #6

Status: Needs review » Needs work

The last submitted patch, 14: drupal-unify_delete-402760-14.patch, failed testing.

andypost’s picture

Issue summary: View changes

is this still applicable to 8.0.x?

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

AaronMcHale’s picture

Status: Needs work » Closed (outdated)

Came across this issue while working on something else, closing as outdated, because:

  1. It hasn't had any activity in almost a decade (patches are also outdated).
  2. The discussion appears to have moved to other places/issues.
  3. The "Delete" local task has existed across core content entities for a long time now and there does not appear to be an appetite to change this.
  4. There seems to be more support for keeping the local task (I also agree), partly due to the fact that a user can have access to delete but not edit, so not having a local task would not be good UX for those users.

As an additional note, in this context "Delete" is not actually the action, the actual action of deleting something happens when you press the "Confirm" button on the confirm form, "Delete" just takes you to a form, in the same way "Edit" takes you to a form, and the action of confirming your changes happens when you click the "Save" button.

Feel free to re-open if anyone disagrees.