In #1824500: In-place editing for Fields, we added a new "Edit" module that provides a new "Edit" button in the toolbar. This is confusing because there is already one edit link on node pages, which are displayed as a tab (or "local task" in Drupal parlance). These two links, both with the same title, do different things. One provides inline editing capabilities, and the other goes to the node edit page.
Besides that problem, Drupal also has had a very, very long-standing problem that tabs appear specifically for administrators. These tabs don't show up for most end users, except on a few pages like their profile page. And more often than not, these tabs are not themed or styled in any way, leaving them clashing horribly against the site's custom theme.
This image recaps the problem:
- Make the "Edit" link in the toolbar act like the others links and provide a submenu.
- Make a new link for "Edit content" that goes to the traditional node edit form. This link would be contextual, letting the user know exactly what they are going to edit, such as "Edit view" or "Edit panel" (please excuse the D7 terminology).
- The Edit module's link becomes "Quick Edit" or similar.
- We could potentially add useful quick toggles to access common meta-data, specifically demonstrated here as toggling the published state.
- And because the edit option is displayed once already in the toolbar, we remove the local tasks entirely (in most places). Perhaps they could still be used for front-end tasks, such as editing your user profile. Or we could diff between toolbar menu links and local tasks, and display the difference. We could provide an alternative for them everywhere, such as adding "Edit profile" to the user menu. Or we could do some different option. The important thing is to remove the local tasks if they're not going to show up for normal users. Its confusing that they appear as part of the front-end theme when they are intended for administrators.
This image recaps these points:
Discussion and code.
User interface changes
All as described above.
The nature of MENU_LOCAL_TASK would either change (perhaps being moved to the toolbar) or they would be used less frequently throughout Drupal; instead using MENU_CALLBACK or creating a new menu type/property that is meant for displaying administrative links related to the current page.