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.
Switch site to Stark.
Compare buttons at admin/structure/menu with those at admin/structure/views:
- the ones at views have much smaller text
- the ones at views actually dropdown. the ones elsewhere expand and affect content around them
Comment | File | Size | Author |
---|---|---|---|
#17 | 228599-dropbuttons-stark-17.patch | 1.78 KB | LewisNyman |
#15 | Screenshot 2014-06-13 16.18.17.jpg | 25.27 KB | LewisNyman |
#6 | 2282599.drupal.dropbuttons-dont-drop-stark.patch | 985 bytes | joachim |
Comments
Comment #1
tim.plunkettSimilar to #2278415: Bartik dropbutton styling looks bad, which is not major.
Comment #2
joachim CreditAttribution: joachim commentedI think this is fairly important, as it means that right now, every D8 theme has to do fixing work on dropdowns to make them work properly.
Comment #3
joachim CreditAttribution: joachim commentedThere is styling for dropdown menus in views_ui.admin.css, which IMO shouldn't be there at all -- these should be styled consistently across all of Drupal.
If you remove the styles from views_ui.admin.css, then dropdown menus are broken across the board.
Comment #4
tim.plunkettDespite my best efforts to prevent it over the course of two issues to prevent it
#1989470-132: Dropbutton style update for Seven
#1899236-50: Add new Splitbutton render element to eventually replace Dropbutton
It still went in and broke Stark and Bartik.
I reopened the original issue for revert, to no avail.
So yeah, I think its important, but it's not a major bug.
And the views stuff is still there because it was Views who brought this into core, and I defended that styling tooth and nail.
Comment #5
joachim CreditAttribution: joachim commentedActually I was mistaken about them being ok in Views admin -- it's just that in the list of Views, the table rows are tall enough that they can encompass the whole of the expanded dropdown menu!
So the situation is that dropdown menus are broken in Stark (ie, in all themes that don't implement the fix themselves). Seven has styling in core/themes/seven/css/components/dropbutton.component.css which makes them work in Seven. They are broken in Stark and Bartik.
Comment #6
joachim CreditAttribution: joachim commentedFairly simple fix to the problem of them not dropping down.
However, this moves the whole button in Bartik for reasons I can't figure out.
Comment #7
joachim CreditAttribution: joachim commentedAh now in Views UI with Stark they work. The difference is that Views UI sets 'vertical-align:top' on its TD.
But if I add that, then the cells at admin/structure/menu are too short to contain the collapsed menu.
So it looks like as things stand, putting dropdown menus in an admin table requires you to add extra styling to properly contain them. I really do think this is a major.
Comment #8
LewisNymanThere is an inconsistency in implementation, we had to do a few special fixes for the views interface. We have a few sub-issues that I hope will address this in #1899236: Add new Splitbutton render element to eventually replace Dropbutton Do you think just moving some of the styling from Seven into system is enough of a quick fix?
Comment #9
LewisNymanSpecially I meant #2278479: Change the dropbutton theme function to ensure consistent output and accommodate the splitbutton design, which would implement the original design from the Seven style guide. The dropbutton element no longer needs to expand with the text inside of it when clicked, which solves a lot of issues.
Comment #10
joachim CreditAttribution: joachim commentedI think this needs to be in core rather than any theme, because otherwise anyone making a D8 theme will have to muck around making dropdown menus not be broken -- I encountered this myself on http://drupal.org/project/garland.
Can we move the styling from Seven into core, minus the colour and the rounded corners?
Comment #11
LewisNymanHow much CSS do we need to move over? I thought it was just the absolute positioning?
Comment #12
Bojhan CreditAttribution: Bojhan commentedWe should do the bare minimal here. Stark is meant to look ugly, lets not introduce loads of styling - only functional.
Comment #13
joachim CreditAttribution: joachim commentedDefinitely. They should:
- 1. drop down, rather than cause elements around them to reflow
- 2. when collapsed, be positioned where a normal element would be and not overflow
Unfortunately, my patch fixes 1 but breaks 2 :(
Comment #14
LewisNymanI'll take a look, I remember having to jump through a few hoops to get it working correctly in Seven, so I just need to find the correct CSS to shift over.
Comment #15
LewisNymanSo the trick is to set the dropbutton-widget to position absolute but set the dropbutton-wrapper to min-height: 2em so they don't overlap.
Screenshot of them expanding correctly in stark:
I was tempting to move the views UI font size changes into the Seven theme but the font size was there before so no need to complicate this patch. A much better fix is
dropbutton--small
#2160481: Componentize the dropbutton CSSIt's also a lot easier to tidy up these little bugs here and there then continuously rerolling a massive patch.
Comment #16
joachim CreditAttribution: joachim commentedThe screenshot looks perfect! (Ugly as sin of course, but it's meant to be in Stark! :)
You may have forgotten to upload the patch though ;)
Comment #17
LewisNymanFacepalm
Comment #18
joachim CreditAttribution: joachim commentedPatch fixes the problem in Stark. Also works fine in Bartik and Seven.
Tested contrib Garland too, where they need a bit of styling for size, but the basic operation is good.
Comment #19
webchickGreat, thanks a lot for the fix here.
Committed and pushed to 8.x. Thanks!