Problem/Motivation
We forked jQuery joyride.
Proposed resolution
Unfork it. Changes have committed upstream to version 2.1.
Remaining tasks
Review. Commit.
User interface changes
None
API changes
None.
Original report by @clemens.tolboom
In preparing for test #1921136: Previous button for tour tips I needed to check what version of joyride we use right now.
The version 2.0.3 is not carved in stone as noted in https://github.com/zurb/joyride/issues/127
There are ~24 commits between the commit Feb 07, 2013 which could relate to the Drupal version committed on Feb 18 #1809352: Write tour.module and add it to core
Unfortunately I did not manage to get a clean git bisect which got stuck on
/tmp/joyride$ diff jquery.joyride-2.0.3.js ~/Sites/drupal/d8/www/core/modules/tour/js/jquery.joyride-2.0.3.js
137,150d136
< nextTip: function(){
< if (settings.$li.next().length < 1) {
< methods.end();
< } else if (settings.timer > 0) {
< clearTimeout(settings.automate);
< methods.hide();
< methods.show();
< methods.startTimer();
< } else {
< methods.hide();
< methods.show();
< }
< },
<
296d281
< // Focus next button for keyboard users.
298a284
>
02:04:48 ((696962f...)|BISECTING) /tmp/joyride$
Those changes come from git blame jquery.joyride-2.0.3.js
98967308 jquery.joyride-2.0.1.js (Jordan Humphreys 2012-10-26 10:00:05 -0700 102)
This feels bad as we have no documentation what happened to the file.
Hope for some ideas here:
- what to document
- how to fetch new upstream
- should we start our own clone as suggested by @nick_schuch in #1921136-7: Previous button for tour tips
Beta phase evaluation
| Comment | File | Size | Author |
|---|---|---|---|
| #49 | tour-stark.png | 107.81 KB | hampercm |
| #43 | tour_manual_test-43.png | 83.13 KB | hampercm |
| #43 | interdiff-37-43.txt | 440 bytes | hampercm |
| #43 | de_fork_jquery_joyride-2027623-43.patch | 37.15 KB | hampercm |
| #42 | tour_manual_review.png | 48.36 KB | nick_schuch |
Comments
Comment #1
nick_schuch commentedClemens,
You should run the version of joyride that is provided via core. That is trialed and tested in other issues.
I believe that we should fork joyride so we can add our "Previous" button to it. I have had an issue open for quite some time without response:
https://github.com/zurb/joyride/pull/84
I will ask around and find out what can be done.
For now I suggest you test with the version of joyride that is committed to core.
Comment #2
clemens.tolboom@nick_schuch I understand we should use the core version. But we should mark we are using a patched version of joyride. I expected this in a README.txt file for the js/ containing a commit hash.
We are ~20 commits behind as noted in https://github.com/zurb/joyride/issues/127 which feels bad as nice features are not included now or in the near future.
We have in a way cloned the project now into our core repo. But in an unknown upstream state.
See IE token using jquery.treetable #922022: The token tree UI is not accessible to keyboard only users not capable of merging back with upstream :-/
To fix this issue I just want the commit hash from upstream documented :)
Comment #3
clemens.tolboommrsweaters fixed https://github.com/zurb/joyride/issues/127 so we now have tags in the upstream repository which makes it easier to upgrade.
@nick_schuch should we try to use https://github.com/zurb/joyride/tree/v2.1?
Comment #4
lucastockmann commented@clemens
I already tried version 2.1 and it worked for me, I didn't ran into any issue while using it. Only adding
autoStart: trueto tour.js is needed.But in the end I think it is better to build our own jQuery tour plugin, (based on the joyride plugin).
Thereby the Drupal community gets the opportunity to implement features itself.
Comment #5
larowlanAdd ?tour=1 to the URL for auto start
Comment #6
nod_@lucastockmann you're volunteering for maintainer of tour module then?
Comment #7
lucastockmann commented@larowlan Adding
?tour=1to the URL only initialize the joyride object. In version 2.1 of the joyride plugin it needs to call the show method to show a tip. While settingautoStart: trueat creating the joyride object, the show method gets called automatically.@nod_ I think someone with more experiences than me should maintain the tour module. But I'm willing to help as far as I can!
Comment #8
sunThe latest release has built-in support for ARIA and many other gems.
We should de-fork this library and replace it with a copy of an upstream release.
Comment #9
nick_schuch commentedI agree. I believe those ARIA roles where committed upstream as a PR from @larowlan. Ill take the latest for a test run.
This should be a new ticket, but should we look at something like https://github.com/bower/bower to ensure we are running stables releases? I might take a look at this at the same time.
Comment #10
sunBower is a larger topic, discussed as part of #1663622: Change directory structure for JavaScript files
For now, we just have the new library declarations, which at least allow us to manually script a version/update check, as performed in the parent meta issue.
Comment #11
nick_schuch commentedThat's very true, thanks for pointing me at that issue sun!
Comment #12
sunAdjusting issue title accordingly.
Comment #13
hussainwebI am attaching a patch with update to 2.1 to see if any tests fail. The funny thing is that the js file says it is version 2.0.3. This will need manual testing too.
Comment #14
hussainwebI dug around a little bit and see that the versions were fixed in later commits but not tagged. I am wondering if we should take them. If so, then we could as well take the latest HEAD (committed in Jan 2014). Thoughts?
Comment #16
hussainwebOops... Just a small change in core.libraries.yml. The filename is jquery.joyride-2.1.js and I used jquery.joyride-2.1.0.js. I directly edited the patch file, so no interdiff.
Comment #17
droplet commented@see: #2203431: [meta] Various asset (JavaScript) libraries have to be updated to a (minified) stable release prior to 8.0.0
Comment #18
hussainweb@droplet: I came here from that issue but I can't figure out what you mean. Am I missing something that needs to be done here?
Comment #19
droplet commented@hussainweb,
at this stage, we needed to ship minified version of all 3rd party JS libs. also see #1341792: [meta] Ship minified versions of external JavaScript libraries
Thanks.
Comment #20
hussainwebOkay. I kind of read it as "if available", but there is no minified version of this library available. Should we create one ourselves?
Comment #21
droplet commentedYes. we should. We did it before: https://www.drupal.org/node/2207629#comment-9443237
Comment #22
hampercm commentedReplaced jquery.joyride-2.1.js in the patch from comment #16 with a minified version of it (created with "uglifyjs"), and updated core.libraries.yml to match. I then manually edited the informational comment at the top of the minified version to decrease its size, and changed the version to 2.1 in the comment only--I didn't touch the incorrect version "2.0.3" coded further down. This incorrect version number exists in the official release tagged as "2.1" and "2.1.0" (see: https://github.com/zurb/joyride/blob/v2.1.0/jquery.joyride-2.1.js )
It also appears that maintenance of jQuery Joyride has been moved into zurb/foundation: https://github.com/zurb/foundation
There has been much activity on that project since jQuery Joyride's 2.1 release, which is about 18 month old now. Do we need to take that into account and try to pull the latest version out of zurb/foundation? Or, is that not required since it is now a component of a different software package?
Comment #23
hampercm commentedThe interdiff for my change in #22
Comment #24
catchBumping to critical since the parent issue is.
If the maintained version is zurb/foundation we should at least open a new issue to look at moving over to that.
Comment #25
nick_schuch commentedI can review the functionality of this one. I will have this done in the next few hours. However, one of the gates for this should be around Javascript, we will need a review for that as well.
Comment #26
nick_schuch commentedComment #27
larowlanReasons for fork:
Comment #28
larowlanNot seeing any css changes in the patch - does that mean we're only de-forking the JavaScript?
Comment #29
larowlantour doesn't show

Comment #30
nick_schuch commentedComment #31
larowlanSorry Nick, didn't mean to take over
Comment #32
nick_schuch commentedNo, it's all good mate :)
Ill keep and eye on this ticket and review the joyride releases tonight to see how the library has tracked.
Comment #33
hampercm commentedInitializing
autoStarttotruein /core/modules/tour/js/tour.js fixed the problem of the tour not showing when the Tour button was clicked.It appears the joyride CSS had previously been incorporated into the Tour module in /core/modules/tour/css/tour.module.css, and in the Seven theme in /core/themes/seven/css/components/tour.theme.css. There were 4 additions to the official joyride CSS between joyride-2.0.3 and joyride-2.1., as follows:
I've incorporated these additions into the Tour and Seven CSS files as best I could. It doesn't appear that the Tour module will currently make use of any of these additions.
In response to @larowlan in #27, I have verified that the a11y fixes are incorporated in the official joyride-2.1. The invasive CSS is not an issue due to the way in which the joyride CSS has been incorporated into Tour and Seven.
Comment #34
hampercm commentedComment #35
larowlanthere is some tab whitespace here, can you update to use spaces?
Comment #36
larowlanConfirm from manual testing that this is working!
Once you've fixed the spaces issue this is RTBC.
Comment #37
hampercm commentedWhitespace fixed. Thanks @larowlan
Comment #38
larowlanlooks good to me » over to nick for a review
Comment #39
droplet commentedTo my understand. Tour is a custom Drupal module? .joyRideTipContent isn't match drupal code standard. And I couldn't find this class used in anywhere.
Could you drop 'px' when you do a patch reroll
Also, I wonder how many code from (https://github.com/zurb/joyride/blob/master/joyride-2.1.css) copied into tour.theme.css & modified. Shouldn't put it to core/assets/vendor/jquery-joyride ?
Comment #40
hampercm commentedIn response to @droplet in #39:
Comment #41
nick_schuch commentedI have reviewed and performed manual testing. If we can resolve the items in #40 I will be happy to RTBC.
Comment #42
nick_schuch commentedI should add a screenshot.
Comment #43
hampercm commentedI implemented @droplet's 1st and 2nd suggestions in #39. I let my reasoning in #40 stand for the 3rd suggestion. Manually tested to make certain that nothing broke.
If everyone is OK with this, I think we can go ahead and RTBC.
Comment #44
larowlanComment #45
dashaforbes commentedComment #46
larowlanHappy with 40.3 - we have our own branding
Comment #47
webchickActually, I think that stylistic CSS more properly belongs in Seven theme, not Tour module. Or at least, screenshots of Tour module in Stark should be really, really boring. If they're highly branded like that, that's incorrect. However, it sounds like #40 is saying this is a pre-existing condition (and the diff seems to back that up), so it doesn't make sense to hold up a critical on moving around CSS. However, we should spin off a (normal) follow-up issue to look into this more and adjust the CSS as needed.
So with that out of the way...
Committed and pushed to 8.0.x. Great work, Core Critical Hours folks! :D
Comment #49
hampercm commentedThe joyride-related CSS contained in the Tour module deals with non-stylistic things like positioning, display, z-index, etc. Any stylistic CSS was placed in the Seven theme. I've verified that the Tour does in fact look very plain when using the Stark theme :) Not sure if creating a follow-up issue is necessary with this taken into account.
Opinions?
Comment #50
webchickAwesome, that looks good to me. Thanks for checking.
Comment #51
Anonymous (not verified) commentedTo solve #1921136 which is mentioned in the description of this, we need the joyride.js from https://github.com/zurb/foundation/blob/master/js/foundation/foundation.....
Should i use this issue or a new one?
Comment #52
hampercm commentedBecause of the way joyride has been incorporated into "zurb Foundation", it is not usable in isolation if pulled from the zurb Foundation repo. Therefore, one of these things would need to be done to use it from there:
Alternatively, #1921136 could use joyride v2.1 (the version this issue put into core) as the basis for a fork.
Either way, since the intent of this issue was to de-fork joyride, it seems to me that further work should be done in other issues.
Comment #53
droplet commented21 kb more for backend module may run single time only. I think it's fine.
https://github.com/zurb/foundation/blob/master/js/foundation/foundation.js
Any idea why do we pick joyride at first ?
still a lot of similar lib available , eg : http://usablica.github.io/intro.js/
Comment #54
hampercm commentedI don't know why Joyride was chosen as the basis, but it was done quite a while ago and a lot has changed since then.
Noticing @catch's recommendation in #24, I've created a new issue pertaining to incorporating Joyride from zurb Foundation: #2409861: Explore replacing obsolete Joyride asset with latest version
Comment #55
hampercm commented