Voting starts in March for the Drupal Association Board election.
In, 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.
PASSED: [[SimpleTest]]: [MySQL] 50,597 pass(es). View
|#143||1874664-132-followup.patch||1.45 KB||Gábor Hojtsy|
PASSED: [[SimpleTest]]: [MySQL] 50,427 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 50,441 pass(es). View
PASSED: [[SimpleTest]]: [MySQL] 50,439 pass(es). View
FAILED: [[SimpleTest]]: [MySQL] 50,390 pass(es), 1 fail(s), and 0 exception(s). View