Related to #500286: Primary Node Tabs inside Admin Links border, I suggest that we suppress the "Edit" tab when made redundant by presence of the admin module's hover-to-edit button. This is suggested in comment #4 on that ticket, but I didn't want to hijack that thread.

I believe admin module could reduce UI clutter by ensuring the new edit / delete hover menu items are not duplicated in the old primary tabs.

In cases like this the result would be that the primary tabs would be / view \/ dev load \/ dev render \ while the edit tab would only appear in the hover link.

In order to maintain full functionality for people with JS disabled, concealment of those tabs needs to happen when the admin module's hover menu. However, we need to know whether it's appropriate to hide just the edit tab, or whether the entire tab row should be hidden (ie, when the remaining tab is only / view \ which is then also redundant).

One approach might be:

  1. In admin.module, count the number of tabs to be displayed when rendering a node with admin hover menu
  2. Calculate which of those items are targetted for suppression by admin module and apply a separate CSS class to them, eg admin-suppressed
  3. If ( $total_tabs - $suppressed_tabs == 1 ) && emtpy($secondary_tabs) then CSS the entire tab row out.
  4. In the JS which triggers admin.module's hover menu, apply CSS to conceal suppressed tabs (ie, there were >1 tabs remaining after step 3).

If similar functionality already exists, I can't find it. I do believe it requires a bit more than just CSS'ing out the primary tabs (because they are not always redundant) so would be interested in input on other ways to achieve this.