Problem/Motivation
Bartik modal windows do not look very "Bartik" and have some formatting issues. It would be good to spruce them up.
(Current modal style 26/01/2015)
Proposed resolution
Let's implement a design in Bartik that fits with the rest of the theme.
Remaining tasks
Come up with styling in CSS.
Get design thumbs up.
User interface changes
A nicer looking modal in Bartik.
API changes
None
Original report by @LewisNyman
In #2113911: Modal style update we removed core/misc/dialog.css
Bartik now displays the default Jquery UI styling for the modal which looks ugly.
Comment | File | Size | Author |
---|---|---|---|
#38 | patch-review.png | 83.38 KB | tmjoseantonio |
#36 | 2226189after.jpeg | 156.68 KB | mherchel |
#36 | 2226189-style-bartik-modal-36.patch | 1.47 KB | mherchel |
#33 | 2226189after.jpeg | 167.09 KB | mherchel |
#33 | 2226189-style-bartik-modal-33.patch | 1.37 KB | mherchel |
Comments
Comment #1
LewisNymanThis is how it used to look:
Comment #2
ChandeepKhosa CreditAttribution: ChandeepKhosa commentedI've started this and so far have some new CSS for the title section & background so far, will continue later today
Comment #3
LewisNymanWe might not need to fix this now depending on #2113911: Modal style update
Comment #4
mgiffordComment #5
emma.mariaComment #6
emma.mariaNow the modal window is back to being styled with the dialog.theme.css but the modal windows still are not very "Bartik with the heading fonts and sizes, button styles etc.
I am going to update the issue summary to suggest adding Bartik styles to the modal windows.
Comment #7
emma.mariaComment #8
emma.mariaComment #9
alvar0hurtad0Hi there,
here we've a patch
Comment #10
emma.mariaComment #11
alvar0hurtad0I'm going to do it better, I've refactor the patch (and take a bit more time to study the current CSS).
Those are the patch and the screenshot.
Comment #12
LewisNymanThis is looking good, but I'm worried about using the
.ui-widget
class, I think this is used widely by jQuery UI so it could introduce regressions all over the place. Is there a more specific class we can use for the modal?Comment #13
alvar0hurtad0For example .ui-dialog?
Comment #14
cosmicdreams CreditAttribution: cosmicdreams commentedYep, .ui-widget and .ui-dialog are both defined by jquery-ui.css
Comment #15
LewisNymanui-dialog sounds safer
Comment #16
LewisNymanComment #17
alvar0hurtad0ok, ui-dialog :D
Comment #18
alvar0hurtad0Forget my last comment, sorry about not reviewing before.
Comment #19
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedThis issue is a nice catch.
#18, needs work as mentioned in #14.
This is very true! I ran grep from drupal root to confirm this.
Have re-rolled patch with better class name.
Independent of theme, Align items would need better spacing.
Comment #20
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedComment #23
alvar0hurtad0But, what about the other modals? for example links.
Comment #24
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedGood question! I see
editor-dialog
class in common. Perhaps we can use the same.Comment #25
LewisNymanI would recommend not changing the styling for forms within modals, only the modal itself, and tackle that other stuff in a separate issue. We shouldn't need to add special styling to something just because it's inside a modal, it probably has the same problem outside modals as well.
Comment #26
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commented@LewisNyman, agreed.
Anyway the last patch in #19 tries to use different class as .ui-widget and .ui-dialog are being used in jquery ui.
Comment #27
LewisNymanOh, we can use
.ui-dialog
, the mark up is generated by jQuery UI so it makes sense to use it.This selector would only style the image dialog in the wysiwyg
Comment #28
Sivaji_Ganesh_Jojodae CreditAttribution: Sivaji_Ganesh_Jojodae commentedOkay, I have provided patch for both
.ui-dialog
and.editor-dialog
.Should I re-open #2113911: Modal style update or create a new issues for styling forms within modals?
Ckeditor's modals are still looking differently (Table for instance).
Comment #29
LewisNymanAh, if it's a CKeditor form problem then we should open new issues against that component, then we can figure out the best solution.
Comment #30
alvar0hurtad0+1 :D
Comment #31
emma.mariaI have updated the screenshot in the issue summary as the modal looks a little different in core now.
Comment #32
emma.mariaThis issue needs to follow what we are trying to achieve here #1342054: [META] Clean up templates and CSS.
All code for a particular component needs to be kept in it's own component CSS file.
Therefore all of the code for the modal styles including the font declaration in typography.css needs to put into a file called "ui-dialog" in css/components folder.
Please make a follow up patch of this work from style_the_modal_in_bartik_ui_dialog_2226189-28.patch in #28.
Comment #33
mherchelPatch submitted. Updated screenshot below:
Comment #34
emma.mariaThanks for the patch @mherchel! The CSS is in the right place now with the right component class.
I have two small requests!
Can we please add...
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
Thanks!
Comment #35
emma.mariaComment #36
mherchelPatch and screenshot attached!
Comment #37
emma.mariaI have a beginner reviewing this issue at Drupalcon Latin America today, no one else review this until I say so :)
Comment #38
tmjoseantonio CreditAttribution: tmjoseantonio commentedHello,
The patch in comment #36 fixes what it say that it was going to fix, I tested it manually by checking the CSS and I also I checked visually. Please remember to select the theme Bartik as the default for the admin in order to test this issue in the future.
Comment #39
tmjoseantonio CreditAttribution: tmjoseantonio commentedComment #40
emma.mariaComment #41
webchickLooks much nicer now! :) Great work.
Committed and pushed to 8.0.x. Thanks!