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.
The joyride CSS is far too overreaching, making the styling inconsistent with the rest of the Seven theme, the most obvious being the font family.
I think we should prune some of this CSS back so it is a bit less assertive, similar to how a module would implement module.base.css.
Comment | File | Size | Author |
---|---|---|---|
#73 | 19210044-tour-styling_tooltips_tour-73.patch | 14.44 KB | aboros |
#68 | tour-styling_tooltips_tour-1921044-68.patch | 14.42 KB | Manuel Garcia |
#65 | tour-styling_tooltips_tour-1921044-65.patch | 12.47 KB | Manuel Garcia |
#58 | tour-styling_tooltips_tour-1921044-58.patch | 14.42 KB | Manuel Garcia |
#48 | interdiff.txt | 2.41 KB | rteijeiro |
Comments
Comment #1
LewisNymanAlso worth cross posting - http://groups.drupal.org/node/283223
Comment #2
nick_schuch CreditAttribution: nick_schuch commentedSounds great to me! LewisNyman++
Comment #3
LewisNymanTechnically a style guide issue. We should consolidate this as a component in the style guide.
Comment #4
pakmanlh@ckrina and me were working on this to make a first approach to resolve the inconsistence of the styles.
Here I attach one patch with an split of the «joyride.css» on two module and theme CSS including little tweaks on properties.
To make a custom mark up to provide a component maybe we should override the definition inside of JavaScript file.
What would the best way to do that? directly Override the jquery.joyride-2.0.3.js file or implement a cleaner / independent override on tour.js
Comment #5
LewisNymanIt looks like we can override the templates when we all the joyride file. Check this part of the documentation.
I did a quick mockup of how it could look, it looks a lot better to me, what do you think?
You can achieve most of this by reducing the default CSS and HTML.
styling but white and with a reduced line-height - 18px seemed good to me.
button button--primary
classes.Comment #6
Wim LeersNote that if you want to align CSS more with the Seven style guide, then the CSS should live in the Seven theme's CSS. Therefor Seven-aligned CSS in
tour.module.css
does not seem acceptable.Comment #7
LewisNymanIndeed, ideally we wouldn't have any CSS in the module apart from positioning.
Comment #8
pakmanlh@ckrina and me were working on that again, here I attach new patch following indications.
We moved the styles inside a new Seven component.
Comment #10
LewisNymanVisually this looks good in Seven, the problem is there is now no CSS in the module, which means this feature can't function properly without the Seven theme.
This is what it looks like in Stark:
I think we can solve most of this by moving seven/css/components/tour.css back into tour.module.css.
More detailed review:
The class small doesn't seem to do anything but if you want to make the button small you can use button--small.
We don't need to set this in ems.
I think we can set the border color by just setting it on the selector above
Empty selector
The standards require a blank line before comments.
Another blank line required here
I think we only really use the h2 here? Do we need all the headers? Maybe
Comment #11
pakmanlhThanks a lot for the review. Here I attach new patch following your indications, I hope be correct now.
Comment #13
klonos#2152377: Failed to change the status to 'needs work' after test failure
Comment #14
pakmanlh11: tour-styling_tooltips_tour-1921044-11.patch queued for re-testing.
Comment #16
pakmanlhSeems that is necessary modify the test "Drupal\Tests\Core\Extension\ThemeHandlerTest" to include the new css files proposed in this issue in Seven theme, but I don't know if this change can do from this issue...
Comment #17
LewisNymanYeah you can add the file to the test when you add it to the theme. We've had to do the same with all the other style guide issues.
Comment #18
pakmanlh@ckrina and me attached the patch again including the test modified.
Comment #20
pakmanlhSeems like the test which failed (GlossaryTest) it doesn't concern about this issue, we modified the "ThemeHandlerTest" and now this passed... I'll launch the test again...
Comment #21
pakmanlh18: tour-styling_tooltips_tour-1921044-18.patch queued for re-testing.
Comment #22
LewisNymanGreat! Not a lot to fix code wise:
Duplicate properties
This is probably one of the few places we could get away with using ems.
I did notice this when viewing in the stark theme:
All we need to fix this is a white background or something in the module CSS so the text is readable.
I also noticed that the alignment of the tooltips are slightly off, is there anything we can do about that using minus margins?
Comment #23
pakmanlhOk in general! I did the two tweaks in few minutes and I have a new patch ready.
Although about the last comment I think to allow put minus margin at only "left" and "right" tooltips (which are misaligned) we would need a class in the general wrapper of the tip that marked the kind of tip. But now the TipLocation variable only is puts a classname on joyride-nub div inside of the general wrapper... and it doesn't work
I've had a look at the tour.js but I don't see how to do that... I'll try to further investigate but all the support are wellcome.
Comment #24
nick_schuch CreditAttribution: nick_schuch commentedHi pakmanlh!
Text tips have a 'location' property assigned to them. This set the top/left/right/bottom positions. We could use that to provide a class to the wrapper of the tip.
Would that help unblock this issue for you?
Comment #25
pakmanlhYes, but the question is "How" to do that :P
Anyway thanks for the feedback!
Comment #26
LewisNymanhmm, it actually looks more complex than I thought. I don't think we should tackle alignment in this issue because it seems more like a problem of the plugin itself than anything we've done.
Comment #27
pakmanlhOk! Here I attach a new patch that fix the last comments ignoring the vertical misaligned.
Comment #28
pakmanlhComment #29
ry5n CreditAttribution: ry5n commentedVisually tested agains HEAD in Seven and Stark. Looks good, except for the alignment issue mentioned before. Actually, this only seems to be an issue when the Joyride tip is pointing horizontally at an item, and could be resolved by applying the background/border/radius to the inner content area and shifting it up/down.
Comment #30
Anonymous (not verified) CreditAttribution: Anonymous commentedUsing the patch in #27 with small resolution (mobile) looks like the attached screenshot. I think the background should be dark also.
Update: Looks good now.
Comment #31
LewisNymanI seems tricky to expose the correct classes to modify the position of the tool tip without modifying joyride. Seems like an issue we should move into the joyride issue queue. This is also not an issue introduced by this patch so it seems silly to fix it here.
Comment #32
LewisNyman27: tour-styling_tooltips_tour-1921044-27.patch queued for re-testing.
Comment #34
nick_schuch CreditAttribution: nick_schuch commentedComment #35
pakmanlhI re-rolled the patch again.
Comment #36
klonosComment #37
LewisNyman35: tour-styling_tooltips_tour-1921044-35.patch queued for re-testing.
Comment #38
LewisNymanIt doesn't seem right to have to keep rerolling this patch because of a problem that wasn't introduced as part of this patch and we don't really have a plan to solve yet. I'm happy to create a follow up.
Comment #39
alexpottThis refers to the removed CSS file?
Plus we're breaking up the external library - is that really the done thing? I guess this is okay
W3C: none is not a bottom value
Why only webkit? http://www.w3schools.com/css/css3_gradients.asp
jshint says that this is wrongly indented and PHPStorm complains about the comma :)
Comment #40
pakmanlhI rerolled the patch with the Alex indications (thanks a lot!)
Only that I'm not sure if it would necessary remove the css file reference at the component definition.
Comment #42
tkoleary CreditAttribution: tkoleary commentedNot sure why it fails testing but it looks awesome when I test it on simplytest.me.
Only issue I see is unrelated to this one, the arrows not quite pointing at the right thing.
Comment #43
pakmanlhThe test fails because it try to remove joyride.css that it has been moved to new path... I see that last friday but I had not time yet to solve, because maybe this fact implies modify component and some test... Feel free to reroll, I'll try to do as soon as possible :P
Comment #44
LewisNymanI've rerolled and included this change:
In other patches we've kept the spacing consistent (one space) for all gradient properties.
Comment #45
dasjoGreat to see tour module being aligned to the style guide - this looks a lot better!
I've found it confusing to mix em based & pixel based units for defining the padding of the tooltip container, see
.tour-progress
,.joyride-content-wrapper
and.joyride-close-tip
.In the attached patch iteration, i tried to fix the problem of repeating padding units of the parent
.joyride-content-wrapper
by moving its padding up to the.joyride-tip-guide
. This way we can just useright: 0;
to declare the children elements to be positioned at some corner instead of formerly mixing pixels and ems.Comment #46
sqndr CreditAttribution: sqndr commentedThis doesn't look good on mobile (or smaller screens):
I created a patch that changes the width to 87%, which is a kinda weird number ... but it fixes the problem:
Another thing to do, might be to completely remove the
width
attribute. This way - the tour popups don't fill up the entire screen, yet it still looks good.Comment #47
sqndr CreditAttribution: sqndr commentedComment #48
rteijeiro CreditAttribution: rteijeiro commentedLooks nice! Some minor clean-up and ready to go (I hope).
Comment #49
sqndr CreditAttribution: sqndr commentedThis patch looks fine. This makes the tour popup looks good for all breakpoints. Nice!
Comment #50
tamasd CreditAttribution: tamasd commentedWorks fine for me too
Comment #51
LewisNymanwe have one thing left to do with is address @alexpott's comment:
I'm happy to remove this CSS file, it's way too opinionated to be useful, maybe once they tone it down we can include it again. This means we just need to remove the reference in the yml file.
Comment #52
Bojhan CreditAttribution: Bojhan commented@Lewis I wonder if this should have more round corners.
Comment #53
pakmanlhThe reference in the .yml file it was removed, so I think is all ready :)
Comment #54
scor CreditAttribution: scor commented48: tour-styling_tooltips_tour-1921044-48.patch queued for re-testing.
Comment #56
Bojhan CreditAttribution: Bojhan commentedFYI, my concerns are resolved its only in mobile that we lose the corners because it would otherwise cramp the textarea too much
Comment #57
LewisNymanComment #58
Manuel Garcia CreditAttribution: Manuel Garcia commentedrock & re-roll!
Comment #59
rteijeiro CreditAttribution: rteijeiro commentedNo review, no rock :P
Comment #61
rteijeiro CreditAttribution: rteijeiro commented58: tour-styling_tooltips_tour-1921044-58.patch queued for re-testing.
Comment #63
LewisNyman58: tour-styling_tooltips_tour-1921044-58.patch queued for re-testing.
Comment #64
LewisNymanIt looks like the patch adds an extra '+' here? This break all the css in the file
Comment #65
Manuel Garcia CreditAttribution: Manuel Garcia commentedGreat chatch Lewis!
No clue how that happened, here it is again without that plus sign.
Comment #66
Manuel Garcia CreditAttribution: Manuel Garcia commentedComment #67
LewisNymanIt's missing the CSS file, saving the testbot some work.
Comment #68
Manuel Garcia CreditAttribution: Manuel Garcia commentedsorry forgot to add it before making the patch... here it is again
Comment #69
LewisNymanStill looks good!
Comment #70
LewisNyman68: tour-styling_tooltips_tour-1921044-68.patch queued for re-testing.
Comment #72
aboros CreditAttribution: aboros commentedrerolling.
Comment #73
aboros CreditAttribution: aboros commentedThis is just a re-roll of #68.
Comment #74
Manuel Garcia CreditAttribution: Manuel Garcia commentedChecked the content view tour.. looks fine =)
Comment #76
pakmanlh73: 19210044-tour-styling_tooltips_tour-73.patch queued for re-testing.
Comment #77
pakmanlhAfter tested in my local environment I launched the test again and now the test passed :)
Comment #78
alexpottCommitted 9b87b2b and pushed to 8.x. Thanks!
Comment #80
tstoecklerIs there any reason for removing the CSS file? It seems removing it from the libraries definition should be enough, right? That way we wouldn't have to hack an external library.
Comment #81
sunThis file shouldn't have been removed.
Why didn't you use the stylesheets-override facility in seven's .info.yml file to override the default joyride stylesheet?
It doesn't look like the Tour module CSS changes were tested in any other core theme?
This appears to be a copy of the original/vendor jQuery Joyride styles...?
Why were the original styles deleted then?
Comment #82
LewisNyman@sun Hey, ok let's talk about 1. We can add the stylesheet back in if that's the correct thing to do, but it massive violates our CSS standards, we can't include it by default unless we exclude it manually for every theme, which seems crazy. Should we keep it in the repo but just not include it in the libraries definition?
Comment #83
Bojhan CreditAttribution: Bojhan commentedComment #84
LewisNymanRight now we don't copy external library repos verbatim, we pick and choose the files we want from the repo. We can add the CSS file back in but we can't include it in the library so what's the benefit? We we still pick and choose the JS file when we update the library.