As discussed in #583400: jQuery UI libraries are loading too much CSS that needs to be reverted / Allow jQuery UI themes to be swappable, we need to provide nice looking default jQuery UI themes to both Garland and Seven. We need to do this so that jQuery UI elements that are presented without explicit styling actually look nice and embedded within the look of the site.
I started on a jQuery UI Theme here: Seven jQuery UI Theme #1. Note that it looks greyish, like Seven, and the messages match. Some help on it would be appreciated.
Requirement: #591794: Allow themes to alter forms and page
Sister issue: #606782: Give Garland a nice looking jQuery UI theme
Comment | File | Size | Author |
---|---|---|---|
#67 | jq_ui.patch | 2.27 KB | edward_or |
#57 | seven-jqueryui.patch | 16.25 KB | casey |
#51 | seven-ui-10.patch | 16.58 KB | alanburke |
#49 | 614494-49.patch | 15.99 KB | alanburke |
#44 | overlay-opacity-without-patch.png | 42.6 KB | David_Rothstein |
Comments
Comment #1
RobLoachThis swaps out ui.theme.css with Seven jQuery UI Theme #1 through ui.seven.css. The attached images.zip should be extracted to themes/seven/images.
Comment #2
JacineGonna take a crack at this :)
Comment #3
cburschkaThese file names only make sense when they're actually included. Otherwise, they should probably be turned into URLs.
(Though for the GPL, maybe it can be changed to refer to the file bundled with Drupal already.)
Comment #4
JacineHere's my attempt at this. Images are attached and need to be unzipped to themes/seven/images. IE testing hasn't been done yet. Not sure if I have time, but posting anyway.
Working Demo: http://bit.ly/7ftjcX
Re: #3, not about the GPL stuff so it's gone right now. Let me know what I should add, if anything.
Comment #5
aspilicious CreditAttribution: aspilicious commentedI IE 8 tested it a bit...
2 things that didn't look "nice enough"
1) the slider buttons look weird in IE they are to big or they have to go down a little (my opinion)
2) some text is interfering with each other
see attached pictures
Comment #6
JacineHey aspilicious, yay, thank you for taking a look ;)
Re pic: #1 - That looks like a Seven bug to me. That is a regular fieldset with a description, and I'm pretty sure nothing in this patch is touching it. Definitely a problem, but should be a separate issue.
Re pic: #2 - I agree the sliders don't look nice enough. I'm not digging them in Firefox or Safari either. Maybe we can get one of the designers to weigh in on that. Tagging this "Needs design review."
Comment #7
JacineImproved the slider, and is IE-testing complete.
See it here or the attached screenshot: http://bit.ly/7ftjcX
Comment #8
aspilicious CreditAttribution: aspilicious commentedSlider looks good now...
Good job!
Comment #9
JacineFixed conflicts with the overlay.
Comment #10
RobLoachThis looks REEAALLY good! Can I set this to RTBC?
Comment #11
JacineThank you! I think it's ready, but I also wrote it so I guess I can't say :P
Comment #12
jensimmons CreditAttribution: jensimmons commentedsubscribe
Comment #13
RobLoachWhoops, nope, I can't RTBC it....
It needs a newline at the end of the file :-) . I'll be able to reroll it tomorrow.
Comment #14
yoroy CreditAttribution: yoroy commentedReviewed this with Jacine in IRC, summary:
This is an important opportunity for promoting consistency in admin UI. To do so, follow Sevens lead:
- Can't have the rounded corners for the accordions and dialogs, nor the messages. Rounded corners are for buttons and links (not content blocks) with only the progress-bar as the exeption for just looking nicer with round corners.
- Try one of the accent greys for the current day in the calendar, this yellow is too loud.
… subscribe
Comment #15
JacineNew patch:
- Corner radius functionality is now disabled in Seven, except for Dialog and Slider buttons.
- Calendar highlight state has been changed to gray.
- New lines have been added to the end of the files.
:)
Comment #16
JacineOk, one more change per @yoroy. Removed the .ui-widget-shadow functionality that was being applied to the modal.
Comment #17
JacineComment #18
JacineRemoved the string from weight in seven_css_alter().
Comment #20
JacineReroll because of #672130: Seven's vertical-tabs.css is everywhere.
Comment #21
Dries CreditAttribution: Dries commented- The icons in the highlight/error section seems to be misaligned. They seems to be floating to the top.
- The filenames of the icons seem to mix dashes and underscores. Is that an artifact, or something we can fix (to dashes)?
Comment #22
JacineThe icons don't get any margins or positioning by default in jQuery UI by design. This is actually a tough problem to solve here. In the demo I setup (clone of the ThemeRoller demo), the dialog link and the icons shown in the highlight/error samples have CSS applied that handles the positioning and margins of the icons that are not part of this commit. I can't target the icons directly because they are used all over the place. I also can't target
.ui-state-highlight .ui-icon
without potentially screwing up the icons in the accordion or any other widget that decides it wants icons & gets a highlighted state in the future. The best thing I can think do here is target icons in<p>
tags, but it's not foolproof either.This is "fixed" in the latest patch, and I changed the underscores to dashes in the icon file names. It's also updated on the demo site so you can see it there. :)
In general, it's tough to set reasonable defaults without knowing how/where this stuff is going to be used within Drupal. Having theme functions (or Drupalized widgets) for this stuff, and also substituting classes in existing theme functions for the jQuery UI classes (like changing
<div class="messages error">
to<div class="messages ui-state-error">
) would go a long way towards achieving some consistency and would greatly improve the TX! I hope to spend some time on this stuff over the weekend.Comment #24
JacineOops sorry, did the patch from the wrong directory :(
Comment #25
ChrisBryant CreditAttribution: ChrisBryant commented+10! This looks lovely, great work everyone! Will be nice to see this committed in D7.
Comment #26
mrfelton CreditAttribution: mrfelton commentedWhere are jQuery UI components used heavily? Where should I look to test all of this?
EDIT: If http://d7.jacine.net/static/ui is still a valid testing ground, I give this a +1. Looks great. Good work.
Comment #27
casey CreditAttribution: casey commented@mrfelton: #87994: Quit clobbering people's work when they click the filter tips link
Comment #28
mrfelton CreditAttribution: mrfelton commentedok, well with the filter tips modal patch applied, my popup for the filter tips looks like this (see attached). I'm using the overlay and I believe this is due to line 377 of ui.seven.css where the background of the title bar is set to transparent. Why is this done? Surely the dialog titlebar should still have a background colour when displayed on top of the overlay...
Comment #29
Jacine@mrfelton - Both overlay windows, the child (filter tips) and the parent (the overlay itself) use the same class. The overlay dialog title needs a background: transparent for the overlay because this file loads after the overlay's CSS file, and overrides the styles set by it.
Regarding #87994: Quit clobbering people's work when they click the filter tips link, it hasn't been committed so I don't think it's a valid reason for this patch to need work. In addition, the overlay module itself hasn't supplied any CSS for these dialogs yet. If you look at the module, overlay-parent.css exists, but overlay-child.css does not. That is where most of the styling will need to happen. Until that is addressed in core, any dialog inside the overlay will inherit the styles of the main window. After it's addressed, we may or may not need need to style it here, but attempting to fix it here will only cause problems for person writing overlay-child.css if they want to style it in a different way. Hopefully that makes sense.
Comment #30
JacineA change in Seven prompted small change here. Added
list-style: none;
for .ui-tabs<li>
's. Demo site is updated too.I think this is ready... Anyone else?
Comment #31
yoroy CreditAttribution: yoroy commentedLooking good. We need this because:
- Will make it quicker/easier for developers to stay consistent with default Seven admin theme.
- Less styling to undo for admin themers.
- Wich is a UX win for any user that gets to visit contrib module settings pages.
Comment #32
mcrittenden CreditAttribution: mcrittenden commentedSub.
Comment #34
JacobSingh CreditAttribution: JacobSingh commentedI like it.
Comment #35
Bojhan CreditAttribution: Bojhan commentedOk, confirming this looks good now. Lets get this in!
Comment #36
JacineJust to make it easier:
Comment #37
RobLoachHaving a quick re-look at the patch, it looks like we are switching the weight of ui.theme.css. We could probably fix that in system_library() instead and save all other themes from doing the same. JS_THEME - 10 will put it before all other theme's CSS, but after all the jQuery UI base CSS stuff. Means less line of code in the patch, which is good.
Comment #38
casey CreditAttribution: casey commentedIs patch up to date (jquery ui 1.8)?
Comment #39
JacineProbably not. Marking needs review so we can make sure.
Comment #40
RobLoachI believe the CSS file is named "
misc/ui/jquery.ui.theme.css
".Comment #41
JacineHere's a reroll.
Images are here: http://drupal.org/files/issues/seven-ui-icons-8.zip
Comment #42
RobLoachThere was one line with ending white space. Fixed in this patch. Nicely done, Jacine! This rules!
Also note that #575298: Provide non-PHP way to reliably override CSS would help because it would allow use to use the following in
seven.info
instead:Comment #43
realityloop#42: 614494-42.patch queued for re-testing.
Comment #44
David_Rothstein CreditAttribution: David_Rothstein commentedThis patch seems to make big changes to the overlay opacity?... see attached screenshots.
Comment #45
alanburke CreditAttribution: alanburke commented@#44
Those screenshots have two different themes.
One with Garland, one with Seven
Comment #46
David_Rothstein CreditAttribution: David_Rothstein commentedNo, they are both Garland.
Comment #47
David_Rothstein CreditAttribution: David_Rothstein commentedOh... or did you mean within the same screenshot there are two themes? :) If so, yes, that's the standard setup there... but the problem is that the patch seems to remove the opacity in that situation.
Comment #48
alanburke CreditAttribution: alanburke commentedThis is the reason the transparency changes.
With this change, the jquery.ui.theme.css file is actually moved down the css stack.
And a rule from overlay-parent.css is overridden.
From Firebug [the
lines which indicate a rule is overriddenare missing when you copy paste...]Powered by Dreditor.
Comment #49
alanburke CreditAttribution: alanburke commentedHere's a patch without that CSS weight change.
Comment #50
alanburke CreditAttribution: alanburke commentedMy apologies.
I've read through the issue closer.
The patch at #30 is better.
Comment #51
alanburke CreditAttribution: alanburke commented#30 had some trailing whitespace.
Comment #52
aspilicious CreditAttribution: aspilicious commentedCan some make the css standard compliant.
- Order the elements alphabeticly.
- with border you have to do it this way:
-moz-border
-webkit-border
border
Comment #53
alanburke CreditAttribution: alanburke commentedDo we enforce our styleguides on css files from external projects?
This CSS file came from the jQuery UI themeroller, as opposed to being handrolled.
Comment #54
aspilicious CreditAttribution: aspilicious commentedNo we don't, srry for that.
Comment #55
Melissamcewen CreditAttribution: Melissamcewen commentedI have reviewed this patch. Looks nice, tests great, thanks for this!
Comment #56
casey CreditAttribution: casey commentedFilenames changed: it's jquery.ui.theme.css now.
Big plus from me to get this in.
Comment #57
casey CreditAttribution: casey commented- overlay opacity mentioned in #44 is no longer overridden as it doesn't use jQuery UI dialog any more.
- even though the stylesheet is provided by a theme we shouldn't override weight at all; it should stay on the position where it was added as part of the jquery ui library.
This issue was RTBC in #42. Problems identified afterwards should be resolved. So RTBC again?
Note that images attached to #22 should be included too.
Comment #58
moshe weitzman CreditAttribution: moshe weitzman commentedeveryone and their mother has +1 this already.
Comment #59
yoroy CreditAttribution: yoroy commentedMy 3 year old daughter also thinks it would be great to get this in now so that module devs get good defaults to build on.
Comment #60
JacineLOL! (Sorry, I couldn't resist.)
;)
Comment #61
Dries CreditAttribution: Dries commentedI totally think our mothers should have voting power! :-)
Committed to CVS HEAD.
Comment #62
webchickOh, crap! I totally thought I had committed this months ago. Sorry!
Comment #63
JacineYAY!!! :D
We need to commit the images though:
http://drupal.org/files/issues/seven-ui-icons-8.zip needs to be unzipped into themes/seven/images
Comment #64
webchickCommitted those to HEAD. Thanks.
Comment #65
JacineSweet! Thank you ;)
Comment #67
edward_or CreditAttribution: edward_or commentedFor those I supplied this url to without fully understanding the issue queue conventions the conversation is continued at #896728: Tweaks to jQuery UI Seven theme.