Follow up for #1920468: Write tour integration for the first page after install showing extend and other things

Problem/Motivation

As identified in IRC by EclipseGc the tips don't provide a "previous" button.

Proposed resolution

This does not come provided with the joyride library. We should provide a patch to fix this for joyride.

User interface changes

Yes. An additional button on the tip labelled "Previous".

API changes

No API changes anticipated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nick_schuch’s picture

Here is the first crack at it. Next I will simplify and attempt to have this committed upstream in the joyride library.

nick_schuch’s picture

Status: Active » Needs work

I have setup a Pull Request to start the conversation upstream.

https://github.com/zurb/joyride/issues/84

nick_schuch’s picture

Status: Needs work » Needs review

I think this is worth a review.

nick_schuch’s picture

Issue tags: +JavaScript

Tagging as js so I can get some advice on this matter.

Kristen Pol’s picture

Issue tags: +Tour

Hmm... well, I ran into a couple things which are neither the fault of the patch...

1) I couldn't see the views tour icon like before... the URL coming up was:

admin/structure/views/view/content

yet the tour expects:

admin/structure/views/view/content/edit

I could be tired (well, I am tired) but I couldn't get the "edit" part to show up in the URL... I was able to get to the tour by manually tacking on the "/edit" at the end of the path it was giving me.

2) I applied the patch and cleared the cache multiple times and didn't see any previous button. I even disabled and reenabled the Tour module.

I checked the js file and it was using the old js. Perhaps it is caching in the browser but I haven't had that trouble before with Drupal.

Anyway... I attempted to test the patch but the universe is against me!

Kristen Pol’s picture

Ok... I used a different browser and see the previous button and it works as advertised. I reviewed the code and it looks clean to me but I'm no JS expert.

My guess though is that there may be some backward compatibility issues with changing the 'button' => 'nextButton' (and similar) because it appears that is part of settings that can be overridden (but maybe not?).

+++ b/core/modules/tour/js/jquery.joyride-2.0.3.jsundefined
@@ -34,7 +35,8 @@
-        'button'  : '<a href="#" class="joyride-next-tip"></a>'
+        'prevButton'  : '<a href="#" class="joyride-prev-tip"></a>',
+        'nextButton'  : '<a href="#" class="joyride-next-tip"></a>'

I prefer the code the way you wrote it because it is clear and consistent. I'm just not sure if it would be accepted into joyride if this indeed breaks backwards compatibility with existing custom code. Or, maybe they wouldn't care?

I'm happy to RTBC for Drupal but should it be reviewed by a JS guru?

nick_schuch’s picture

Kirsten Pol, Maybe we could fork the project and use that repo? I believe this is something we have done in core before. We should get a JS guru to give it the tick of approval.

Kristen Pol’s picture

I have no idea what the protocol is on that type of thing so I will defer to the core core folks (ha!).

clemens.tolboom’s picture

clemens.tolboom’s picture

The patch from #1 still applies :)

Checking the PR on https://github.com/zurb/joyride/pull/84 which is still stalled for more then 2 month. I've added a XREF to this issue. Hope that helps a little.

I still hope #2027623: De-fork jQuery Joyride and update to latest stable release gets answered one day.

For now I don't care that much anymore.

@nick_schuch can you update the summary to reflect you PR effort and maybe promise to fix backport problems?

larowlan’s picture

Status: Needs review » Needs work

The last submitted patch, 1: 1921136-1-tour-previous-button.patch, failed testing.

hampercm’s picture

Issue summary: View changes

Joyride has been rolled into the "zurb Foundation" project on GitHub, and as such is no longer being supported as a separate project. As a result, the PR submitted to add a "previous" button will never be rolled into that project. Instead, improvements are being made only to Joyride contained within the zurb Foundation project.

The zurb Foundation project is quite extensive and mostly far outside the scope of the Tour module, so I'm not sure rolling the entire Foundation into Drupal would make much sense. Alternately Drupal could fork and build upon the latest version of Joyride from https://github.com/zurb/foundation/blob/v5.5.0/js/foundation/foundation.joyride.js or fork the last official release of Joyride as a separate entity: https://github.com/zurb/joyride/blob/v2.1/jquery.joyride-2.1.js

The tagged v2.1 release of Joyride has been incorporated into core, so that would be a straightforward jumping-off point to continue this issue. The patch from #1 could probably still be incorporated directly into this version.

Alternatively, from examining v5.5.0 of foundation.joyride.js, it seems like that file could be forked and incorporated into the Tour module separate from the rest of zurb Foundation, with some modification. This would have two main advantages: the 5.5.0 version already has functionality for a "previous" button implemented, and Drupal would be utilizing a version of Joyride that is still being actively maintained.

hampercm’s picture

I've opened #2409861: Explore replacing obsolete Joyride asset with latest version to explore upgrading the Joyride asset to v5.5.0 from the zurb Foundation, which seems to be possible with extracting only 2 JS files from that project. This would add a "Previous" button without any modifications.

nick_schuch’s picture

Sounds awesome! Ill review in the other ticket.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Igor Mashevskyi’s picture

It may be helpful for somebody.
The patch is based on #1 and rewrote for d9.

anmolgoyal74’s picture

Status: Needs work » Needs review
FileSize
6.86 KB
888 bytes
bnjmnm’s picture

Status: Needs review » Postponed

Joyride is close to being removed from core #3051766: Deprecate and replace jQuery Joyride (for tours). Once the replacement, ShepherdJS, is installed, this change can be made to that.

thejimbirch’s picture

Status: Postponed » Needs work

Shepherd has been installed and Joyride removed.

The previous work on this issue is no longer applicable, but the issue remains.

Shepherd does have support for a back button.
https://shepherdjs.dev/docs/Tour.html#back

Marking this issue as Needs work.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
miguel.leal’s picture

thejimbirch’s picture

Status: Needs work » Needs review

Patch added, so switching to Needs Review

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

ranjith_kumar_k_u’s picture

Status: Needs review » Needs work

The last submitted patch, 34: 1921136-34.patch, failed testing. View results

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Needs work » Postponed
Issue tags: -Tour

This extension is being deprecated, see #3336033: [Meta] Tasks to deprecate Tour module. It will be removed from core and moved to a contrib project, #3376099: [11.x] [Meta] Tasks to remove Tour.

This is now Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

renatog’s picture

FileSize
5.73 KB

Aware about the postponement cited at #37

On this meantime, if someone needs a workaround for D10.x, this patch may help you

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.