Originally submitted on Github
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 drop button styles to create a favorable first impression of Drupal for evaluators and a better user experience for site authors. No functional differences.

Specs:
https://www.figma.com/file/OqWgzAluHtsOd5uwm1lubFeH/Design-system?node-i...
Remaining tasks
- Update patch styling to include time inputs
- Accessibility review
- RTL review (Right to left)
User interface changes
All drop button styles will be changed, no functional differences.
Test Pages
- /admin/content
- /admin/structure/block
- /admin/structure/display-modes/view
- /admin/people
- /admin/modules
| Comment | File | Size | Author |
|---|---|---|---|
| #53 | interdiff-3023243-48-53.txt | 4.82 KB | huzooka |
| #53 | claro-dropbutton-3023243-53.patch | 57.8 KB | huzooka |
| #49 | option2.gif | 229.37 KB | lauriii |
| #49 | option1.gif | 238.76 KB | lauriii |
| #48 | interdiff-3023243-46-48.txt | 682 bytes | huzooka |
Comments
Comment #2
antonellasev commentedComment #3
antonellasev commentedComment #4
saschaeggiAdded image and fixed link to final design specs
Comment #5
huzookaPostponing until #3021087: Buttons is in.
Comment #6
lauriiiButtons have been committed! 🎉 We should be able to work on this now.
Comment #7
ckrinaComment #8
bnjmnmMy priority is alpha blocker issues, but I'm working on this when I'm blocked on those. If another contributor is interested in taking this on to get it through quicker, they can ping me on Drupal Slack and I'll provide a patch of what I've done so far.
Comment #9
bnjmnm@neslee-canil-pinto contacted me on Slack with interest in working on this issue, so I've provided my work so far so he (or anyone else interested) can continue.
Some things to be aware of going in:
.dropbutton-singlestyling, so that one still looks like Seven. Pretty much anything after line 215 in dropbutton.css is older CSS.<li>elements. This was intended to be a (probably?) temporary approach so I could focus on getting the CSS moving. Creating a template specific to dropbuttons is probably a better way to accomplish this, but it wasn't immediately clear how to best do it without creating the need for a bunch of Claro-specific dropbutton JS.To confirm this patch is applied properly, compare your results to this screenshot of how it looks on my local.

Comment #10
mahenkvyas22 commentedadded patch for this issue
Comment #11
mahenkvyas22 commentedComment #12
mahenkvyas22 commentedComment #13
mahenkvyas22 commentedComment #14
lauriii@Mahenkvyas22 thank you for working on this issue! Did you see that there was already a patch posted on this issue on #9?
It seems like your patch is modifying the compiled CSS files directly. When creating patches, you should use the 8.x-1.x branch. Patches should contain changes only for the source files. For more info, you can reference our documentation.
Comment #15
huzookaTest module added to Clarodist tools.
Note that we have two render elements for this:
DropbuttonandOperations.Furthermore, Views UI provides a small variant for Dropbutton by CSS. This can be viewed on view edit pages like
/admin/structure/views/view/content.Comment #16
fhaeberleI tried to push the dropbutton forward and worked on the patch provided in #9.
My focus was on getting the border-radius behavior and the (hover) colors right.
Comment #17
huzookaI'll continue this issue if you don't mind.
Please, be sure to set the appropriate issue status.
Comment #18
ckrinaWe just discussed on Slack with @huzooka: since there isn't any current implementation on core for the primary dropdown right now, it would be great for now to just use the grey one for now as an MVP and work on a follow-up to get the primary one on the future. Here's the issue I just opened: #3056372: Primary Drop Button style update.
Comment #19
huzookaAttached the patch that show my progress.
I only set NR to see that the patch can be applied.
Comment #20
huzookaPatch wasn't attached, sorry.
Comment #21
huzookaComment #22
huzookaComment #23
huzookaI think that this is ready for review.
I'll attach the screenshots ASAP.
Comment #24
huzookaIE11/Edge hogh contrast arrows needs some improvement (they have the same size for every size variant).
Comment #25
huzookaIssues have to be reported:
Screenshot attached (excluding Ubuntu/linux env).
Comment #26
huzookaComment #27
huzookaComment #28
huzookaComment #29
huzookaComment #30
zrpnrThese are looking really good, and it's very impressive that you added the screenshots for each browser and type of dropbutton.
I agree with your approach to proceed with this styling in Claro and open the new issues for the variants, buttons and prefixes.
I was able to test this patch on chrome, safari and firefox on osx, chrome and safari on iOS, and Edge and IE11.
Everything matched the screenshots you posted and the buttons and operations links look and function identically.
High Contrast mode on IE11 and Edge seem clear and correct as well.
I only noticed a couple small issues with focus and hover:
In Figma, the "focus" outline appears "behind" the other parts of the button.

The way it appears in the browser looks correct to me, I thought maybe this change was discussed elsewhere.
The hover state adds an additional dropshadow which makes the hovered part of the dropbutton appear to have a darker border, which also covers the white divider line.

I think these 2 lines could be removed:
In iOS on chrome and safari I wasn't able to see any focus styles, and the "hover" state for the drop arrow persisted instead. That could just be my misunderstanding, that I was not sure how to trigger them.

The white divider line is missing in the "small" version of the button in iOS also.

Comment #31
huzookaComment #32
huzookaFixed the missing separator for iOS Safari – but nothing else.
It turned out that iOS Safari forces a min-width for buttons, but that min-width depends on the font size.
Comment #33
huzookaRe-generated screenshots attached.
Comment #34
zrpnrGood catch with the min-width problem! I can confirm that the small dropbutton separator is now added in iOS safari and iOS chrome.
Marking RTBC.
Comment #35
huzookaTodo:
Comment #36
huzookaComment #37
huzookaAddressing some of #35:
Comment #38
huzookaThe workaround for #35.2 is that Operations element is always styled with the extra small variant.
Comment #39
lauriiiFor the most part, the code looks good. Reviewed also changes to the views-ui.css by using diff.
What is this value based on? It seems higher than it was before, at least according to the documentation.
Comment #40
huzookaNo reason have 500 for this, back to NW.
Comment #41
huzookaComment #42
huzookaRe #39: Fixed, and I also removed the unnecessary
.open .dropbutton-widgetrule.Comment #43
huzookaI forgot to use the binary flag...
Comment #44
huzookaComment #45
huzookaI have to test this on out supported browsers and platforms since there where major changes.
Comment #46
huzookaI had to add a minor fix for high contrast mode.
New screenshots attached.
Comment #47
lauriiiIt seems like the text isn't aligned correctly vertically on Android Chrome. I checked the images and other than that, this seems to work fine across all browsers 👍
Comment #48
huzookaRe #47:
It seems that this is a Chrome (~ for Android) specific issue that happens with Seven theme as well. I opened a follow-up for this: #3059536: Extra small Dropbutton text is vertically misaligned on Chrome for Android
We also agreed on that we'll ship the no-js version with the styles applied, and we won't try to optimizing for less than the 1% of the users. That will cause only a 'jump' in the table rows, but we won't show the Dropbutton items completely unstyled. I added some minor workaround for this case that lets Dropbuttons occupy the needed space if JavaScript interpretation is missing.
Follow-up for smaller variants: #3059537: Apply smaller Dropbutton variants only for non-touch capable screens
Comment #49
lauriiiThese are the options we chose from:
Option 1 (#48):

Option 2 (same a Seven):

Comment #50
lauriiiThis is starting to look really solid. Few more changes we should make before committing this:
🤦♂️
Maybe we could add more detail to here. Something like:
These styles have been duplicated to dropbutton.css since the component inherits some of the design elements. Whenever making changes to this file, remember to check if that needs to be applied to dropbutton.css as well.We should remove the LTR comment from these lines.
Could we copy the comment from button component to explain why we have to use !important here?
s/inherited theme/inherited styles
s/Overrides the dropbutton toggle./Overrides the dropbutton toggle markup.
👍
Comment #51
huzookaComment #52
huzookaSorry.
Comment #53
huzookaI re-rolled the original patch and fixed everything of #50.
Comment #54
lauriiiLooks all good! Thank you everyone for your help on this one, this is a huge step forward 🚀
Comment #56
fhaeberleVery proud about this. Thank you!
Comment #59
lauriii