Originally submitted on Github with significant input from Andrew MacPherson and Zoltan Horvath

Problem/Motivation

Recent interviews and research exposed pain points around Drupal's admin experience of looking and feeling dated, especially compared to our competitors, and universally cited that choosing a more modern-looking admin theme instantly led to Drupal being better-perceived by said users. There was an amazing community effort to Create a Style Guide For Seven that vastly improved its look + feel compared to the original, but Design best practices and Drupal functionality have moved on since then.

Proposed resolution

Implement new radios styles to create a favorable first impression of Drupal for evaluators and a better user experience for site authors. No functional differences.

Specification

Quick overview

This image is just a quick overview for radio specs. Please use the Figma link to full specification as the main resource for specs.

radio style specs

Full specification

FIGMA: https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Design-system?node-i...
This link is anchored to the board with the full specification. As an anonymous user you can see the design, but to actually be able to pick colors and sizes please login on Figma.

General specs:
Color palette

Remaining tasks

  • Update patch styling to include time inputs
  • Accessibility review
  • RTL review (Right to left)

User interface changes

Allradios will be changed, no functional differences.

Test Pages

Places which has the checkbox visible: (TO VALIDATE)

  • Drupal's main install form
  • Bulk Edit Forms (eg. Content, Comments, Users etc.)
  • Content Create Forms (eg. Add Content -> Article)
  • Form Display (eg. Content Type -> Manage form display)
  • Theme settings forms
  • Permissions Forms
  • Modules Page
  • Views
  • Administration Pages (eg. A modules admin page)
  • /node/add/article (open vertical tab COMMENT SETTINGS)
  • /admin/config/people/accounts
  • /user/1/edit?destination=/admin/people
  • /admin/people/create

Comments

antonellasev created an issue. See original summary.

antonellasev’s picture

Issue summary: View changes
StatusFileSize
new40.05 KB
antonellasev’s picture

Issue summary: View changes
antonellasev’s picture

Issue summary: View changes
antonellasev’s picture

Issue summary: View changes
antonellasevero’s picture

Issue summary: View changes
huzooka’s picture

Version: » 8.x-1.x-dev
Assigned: Unassigned » huzooka
Related issues: +#3023293: Checkboxes style update
huzooka’s picture

Status: Active » Needs work
StatusFileSize
new24.36 KB

This patch represents the stale state from the github PR #63.

huzooka’s picture

Assigned: huzooka » Unassigned
Status: Needs work » Needs review
StatusFileSize
new36.96 KB
new12.73 KB

I have to find/create a feature request against core for the Drupal.theme.checkbox function and research why Media library needs a non-standard checkbox for its select-all feature.

Status: Needs review » Needs work

The last submitted patch, 9: claro-checkbox_radio_styles-3023256-9.patch, failed testing. View results

huzooka’s picture

Status: Needs work » Needs review
StatusFileSize
new35.58 KB
new6.58 KB

Reasonable style cs fixes.

Status: Needs review » Needs work

The last submitted patch, 11: claro-checkbox_radio_styles-3023256-11.patch, failed testing. View results

Status: Needs review » Needs work

The last submitted patch, 11: claro-checkbox_radio_styles-3023256-11.patch, failed testing. View results

huzooka’s picture

Status: Needs work » Needs review
StatusFileSize
new35.56 KB
new533 bytes

Status: Needs review » Needs work

The last submitted patch, 14: claro-checkbox_radio_styles-3023256-14.patch, failed testing. View results

huzooka’s picture

Status: Needs work » Needs review
StatusFileSize
new35.53 KB
new921 bytes

Status: Needs review » Needs work

The last submitted patch, 16: claro-checkbox_radio_styles-3023256-16.patch, failed testing. View results

huzooka’s picture

Assigned: Unassigned » lauriii
Status: Needs work » Needs review

Ready for review

The last submitted patch, 8: claro-checkbox_radio_styles-3023256-8.patch, failed testing. View results

saschaeggi’s picture

Issue tags: +radios, +radio buttons

@huzooka let me know if there is any problem with the design you might run into. cheers

lauriii’s picture

Assigned: lauriii » Unassigned
Status: Needs review » Needs work
Issue tags: +Needs followup
  • +++ b/js/claro.theme.es6.js
    @@ -0,0 +1,21 @@
    +        return '<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>';
    

    We should create an issue to add this function into Drupal core, and to change the implementation to use this. We should also add a @todo with a link for that issue for all of these files to remember that we should change these once the theme function has been added to core.

  • +++ b/css/src/components/form.css
    @@ -245,4 +234,18 @@ ul.tips li {
    +  #dblog-filter-form .form-actions {
    ...
    +  #edit-cancel {
    ...
    +#diff-inline-form select,
    

    We shouldn't use ids for theming since it is not reliable (ids are uniquified so they might change depending on the context).

huzooka’s picture

@Lauriii

huzooka’s picture

Status: Needs review » Needs work

Forgot to add the patch.

huzooka’s picture

StatusFileSize
new35.92 KB
new2.53 KB
huzooka’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 24: claro-checkbox_radio_styles-3023256-24.patch, failed testing. View results

huzooka’s picture

Status: Needs work » Needs review
StatusFileSize
new35.63 KB
new302 bytes

Accidentally touched the unused css/components/form.css file.

Status: Needs review » Needs work

The last submitted patch, 27: claro-checkbox_radio_styles-3023256-27.patch, failed testing. View results

huzooka’s picture

Assigned: Unassigned » lauriii
Status: Needs work » Needs review
lauriii’s picture

Status: Needs review » Needs work
Issue tags: -Needs followup
+++ b/js/claro.theme.es6.js
@@ -0,0 +1,21 @@
+  $.extend(
...
+      checkbox() {
+        return '<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>';

We could use a simpler syntax to define the theme function:

Drupal.theme.checkbox = function() {
  return '<input type="checkbox" class="form-checkbox form-boolean form-boolean--type-checkbox"/>';
};

Thanks for opening the follow-up!

lauriii’s picture

Assigned: lauriii » Unassigned
huzooka’s picture

Assigned: Unassigned » huzooka
huzooka’s picture

Assigned: huzooka » Unassigned
Status: Needs work » Needs review
StatusFileSize
new35.46 KB
new1.5 KB

Status: Needs review » Needs work

The last submitted patch, 33: claro-checkbox_radio_styles-3023256-33.patch, failed testing. View results

Kami Amiga’s picture

  1. +++ b/css/src/components/form--checkbox-radio--ie.css
    @@ -0,0 +1,138 @@
    +  box-shadow: 0 0 0 4px var(--color-input-focus-shadow), inset 0 0 0 1px var(--color-input-border-error);
    

    Those properties are the same as the ones at line 84. Couldn't the two selectors groups be merged ?

  2. +++ b/css/src/components/form--checkbox-radio.css
    @@ -0,0 +1,188 @@
    +  margin-left: 24px; /* LTR */
    +  line-height: 1.5em;
    

    Is it wanted to use both px and rem values too ?

  3. +++ b/css/src/components/form--checkbox-radio.css
    @@ -0,0 +1,188 @@
    +  box-shadow: 0 0 0 4px var(--color-input-focus-shadow), inset 0 0 0 1px var(--color-input-border-error);
    

    Same question as for the line 90.

huzooka’s picture

Assigned: Unassigned » huzooka
huzooka’s picture

Assigned: huzooka » Unassigned
Status: Needs work » Needs review
StatusFileSize
new35.25 KB
new2.2 KB

Addressing all of #35.

Status: Needs review » Needs work

The last submitted patch, 37: claro-checkbox_radio_styles-3023256-37.patch, failed testing. View results

  • lauriii committed 38a07d0 on 8.x-1.x
    Issue #3023256 by huzooka, antonellasev, lauriii, Kami Amiga, saschaeggi...
lauriii’s picture

Status: Needs work » Fixed

Looks good! Thank you everyone!

lauriii’s picture

Updated credits

Status: Fixed » Closed (fixed)

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

lauriii’s picture