Download & Extend

Inconsistent formatting of "operations" links in tables

Project:Drupal core
Version:8.x-dev
Component:user interface text
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work
Issue tags:Usability

Issue Summary

Several admin pages contains a table where each row has a number of “operation” links in the right-most columns. The formatting of these links is not consistent throughout Drupal. The first letter is sometimes written in uppercase and sometimes in lowercase (“edit” vs. “Edit”). Sometimes each operation is contained in a <td> of their own, and sometimes all operations are contained in the same <td> (this causes a more compact layout).

The attached screenshot shows the different styles.

AttachmentSizeStatusTest resultOperations
operations.png90.4 KBIgnored: Check issue status.NoneNone

Comments

#1

Status:active» needs review

This changes the texts to lower-case and puts each operation in its own table cell.

I'm not sure if I prefer lower-case instead of upper-case, but the reverse change is quite big, so I'd like some opinions before I change them all. Most other command labels are upper-case, e.g. button labels, local task labels, the "Add new content" link, etc.

AttachmentSizeStatusTest resultOperations
operations-1.patch9.3 KBIdleRepository checkout: failed to checkout from [:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal/].View details | Re-test

#2

c960657 requested that failed test be re-tested.

#3

Reroll.

AttachmentSizeStatusTest resultOperations
operations-2.patch9.34 KBIdlePassed on all environments.View details | Re-test

#4

Status:needs review» needs work

Hmmm...

So it looks like the only place you are seeing upper-case operations is on the Modules listing page, correct? I'm not sure I'm in agreement that these are the same type of operations as "add" "edit" and "manage fields", and I think they can be left as upper-case.

I'm also not sure I like the way you put everything in cells -- it looks rather hackish. Is there a problem you were trying to solve there? And what will happen if someone lacks permission to do some of the operations?

#5

So it looks like the only place you are seeing upper-case operations is on the Modules listing page, correct? I'm not sure I'm in agreement that these are the same type of operations as "add" "edit" and "manage fields", and I think they can be left as upper-case.

Okay, I agree that the links in admin/config/modules are not operations in the same sense as “edit” and “delete” links elsewhere. So perhaps we should change the “Operations” header instead to e.g. “Links”?

I'm also not sure I like the way you put everything in cells -- it looks rather hackish. Is there a problem you were trying to solve there?

This is the approach used in most of these tables, e.g. on admin/structure/menu, admin/structure/taxonomy, and admin/structure/types. I don't think it is particularly hackish, or that using a ul/li inside a td is a lot more semantic.

The problem I am trying to solve here is the inconsistency. There are currently two different approaches in core—I suggest we choose one and use only that unless there is a valid reason for having both.

And what will happen if someone lacks permission to do some of the operations?

The link will be omitted. This may happen on admin/content, e.g. if a user only has access to edit his own nodes. With the cell solution, the remaining operations will still line up, i.e. all “delete” links will appear in the same column—this is not the case with the ul/li solution.

The operation links (“edit”, “delete”, etc.) are almost the only text strings in core in all lower-case, while all other action labels (button labels, local task labels, the "Add new content" link, etc.) are in upper-case. What is the reasoning behind this? Should all td content begin with a lower-case first letter? On admin/content, the “Type” column contains e.g. “Article” (i.e. upper-case), but the “Status” column contains e.g. “published” (lower-case)—that seems inconsistent. I am not sure, but it looks like we need to decide on a UI principle that can be used consistently throughout core.

I think I prefer using upper-case everywhere, though I don't mind using lower-case in some places as long as the choice between upper-case or lower-case is based on a rule rather than being chosen on a case by case basic based on some fuzzy gut-feel of the developer.

#6

I also prefer upper-case everywhere, but I wasn't involved in the decision to make the operations lower case. I don't know who made that decision, but there's no way it's going to change now.

So I have no problem with having TDs. It's just that the code you used to implement it looked a bit flaky (but I haven't looked at how the other places were implemented, so maybe they are flaky too). There was a lot more logic there than when they were just ULs.

#7

Status:needs work» needs review

Rerolled without the changes to admin/modules.

The upper/lower-case issue in operation links is probably D8 material.

AttachmentSizeStatusTest resultOperations
operations-3.patch6 KBIdleFAILED: [[SimpleTest]]: [MySQL] Unable to apply patch operations-3.patch.View details | Re-test

#8

#7: operations-3.patch queued for re-testing.

#9

#7: operations-3.patch queued for re-testing.

#10

Status:needs review» needs work

The last submitted patch, operations-3.patch, failed testing.

#11

Version:7.x-dev» 8.x-dev
Issue tags:-Needs usability review+Usability
nobody click here