Download & Extend

Mark primary buttons in Structure blue

Project:Drupal core
Version:8.x-dev
Component:other
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)
Issue tags:Usability

Issue Summary

Part of #1238484: Ability to mark the form buttons to be of a specific type (so that they can be styled differently). I am here marking all the buttons in structure blue.

To keep this patch effort, somewhat manageable I am doing it per section.

Comments

#1

This is basically, for all usecases were we have two buttons.

Because we are not yet sure, we want it on all primary buttons - I didn't do that here.

AttachmentSizeStatusTest resultOperations
forum-addedit.png32.34 KBIgnored: Check issue status.NoneNone
forumcontainer-addedit.png32.84 KBIgnored: Check issue status.NoneNone
menu-addandedit.png44.25 KBIgnored: Check issue status.NoneNone
menumanage-editandadd.png17.33 KBIgnored: Check issue status.NoneNone
listings.blue_.buttons.patch2.16 KBIdlePASSED: [[SimpleTest]]: [MySQL] 48,767 pass(es).View details

#2

Status:active» needs review

#3

Now the patch to mark all primary buttons blue in Structure.

  • Noticed some inconsistencies:
  • "Save blocks" -> We normally just call this "Save"
  • Blocks config has no delete link
 

*This has a serious side-effect, it also marks all forms that implement system_config_form its "Save configuration" buttons blue.

AttachmentSizeStatusTest resultOperations
all.buttons.structure.blue_.patch5.11 KBIdlePASSED: [[SimpleTest]]: [MySQL] 48,747 pass(es).View details
views-saveconfig.png62.88 KBIgnored: Check issue status.NoneNone
taxonomy-save.png25.42 KBIgnored: Check issue status.NoneNone
taxonomy-termlisting-save.png29.53 KBIgnored: Check issue status.NoneNone
menu-saveconfiguration.png19.15 KBIgnored: Check issue status.NoneNone
blocks-listingsave.png19.96 KBIgnored: Check issue status.NoneNone

#4

Status:needs review» needs work

+++ b/core/modules/block/block.admin.incundefined
@@ -173,6 +173,7 @@ function block_admin_display_form($form, &$form_state, $blocks, $theme, $block_r
+ '#button_type' => 'primary',

Tabs instead of spaces everywhere you put #button_type

+++ b/core/modules/menu/menu.admin.incundefined
@@ -407,8 +408,8 @@ function menu_edit_item($form, &$form_state, $type, $item, $menu) {
+ ¶

A space

#5

Status:needs work» needs review

Cool, that can be fixed.

Setting this back to review to get more feedback on changing the UI guideline, from using blue buttons "everywhere there are two buttons" to "everywhere we can find a primary button".

#6

Yes, I think that makes sense. It will make that blue button something you can rely on, you can click it and the form will be submitted/your stuff will be saved. Lets do this :)

#7

Component:toolbar.module» other

This is not part of toolbar module...

#8

The screenshots in #3 look a bit weird to me. OTOH, yoroy's "blue button something you can rely on, you can click it and the form will be submitted/your stuff will be saved" makes sense to me. Let's try it and we can always revisit later if we decide it's overwhelming.

#9

Agreed, can someone else fix the spaces - I dont know how to get those tabs to show up in my editor

#10

AttachmentSizeStatusTest resultOperations
1850182-10.patch5.13 KBIdlePASSED: [[SimpleTest]]: [MySQL] 48,813 pass(es).View details

#11

Status:needs review» needs work

Patch needs a bit of cleanup

#12

Status:needs work» needs review

Nice crosspost :)

#13

None of the primary submits in Field UI are blue. Intentional or oversight?

#14

Intentional, I think we need to figure out what to do with those two buttons its one of the few places in core we do it and it doesn't have a clear 80% primary button.

#15

Status:needs review» reviewed & tested by the community

I tested the patch and it does what it says it does. I opened #1853260: Which ones of the Field UI submit buttons should be blue? to discuss the special snowflakes that are in Field UI.

#16

Status:reviewed & tested by the community» fixed

This looks good to me, fine with tackling Field UI in a follow-up, so I've committed/pushed to 8.x.

#17

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.