Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#10 | 1850182-10.patch | 5.13 KB | swentel |
#3 | all.buttons.structure.blue_.patch | 5.11 KB | Bojhan |
#3 | views-saveconfig.png | 62.88 KB | Bojhan |
#3 | taxonomy-save.png | 25.42 KB | Bojhan |
#3 | taxonomy-termlisting-save.png | 29.53 KB | Bojhan |
Comments
Comment #1
Bojhan CreditAttribution: Bojhan commentedThis 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.
Comment #2
Bojhan CreditAttribution: Bojhan commentedComment #3
Bojhan CreditAttribution: Bojhan commentedNow the patch to mark all primary buttons blue in Structure.
*This has a serious side-effect, it also marks all forms that implement system_config_form its "Save configuration" buttons blue.
Comment #4
swentel CreditAttribution: swentel commentedTabs instead of spaces everywhere you put #button_type
A space
Comment #5
Bojhan CreditAttribution: Bojhan commentedCool, 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".
Comment #6
yoroy CreditAttribution: yoroy commentedYes, 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 :)
Comment #7
Shyamala CreditAttribution: Shyamala commentedThis is not part of toolbar module...
Comment #8
webchickThe 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.
Comment #9
Bojhan CreditAttribution: Bojhan commentedAgreed, can someone else fix the spaces - I dont know how to get those tabs to show up in my editor
Comment #10
swentel CreditAttribution: swentel commentedComment #11
yoroy CreditAttribution: yoroy commentedPatch needs a bit of cleanup
Comment #12
yoroy CreditAttribution: yoroy commentedNice crosspost :)
Comment #13
yoroy CreditAttribution: yoroy commentedNone of the primary submits in Field UI are blue. Intentional or oversight?
Comment #14
Bojhan CreditAttribution: Bojhan commentedIntentional, 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.
Comment #15
yoroy CreditAttribution: yoroy commentedI 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.
Comment #16
catchThis looks good to me, fine with tackling Field UI in a follow-up, so I've committed/pushed to 8.x.
Comment #17.0
(not verified) CreditAttribution: commentedUpdated issue summary.