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.
Updated: Comment #N
Problem/Motivation
Drupal 8 has the new feature tour which allows to add nice popups on a page to explain the page elements(i.e. another type of help module). More details about tour at https://drupal.org/taxonomy/term/41102
Proposed resolution
Create a example module with all possible elements of drupal
Remaining tasks
Issue patch
Review/testing
Comment | File | Size | Author |
---|---|---|---|
#5 | 2147349_5.patch | 11.46 KB | Mile23 |
#4 | tour_example-2147349-4.patch | 9.17 KB | bryanbraun |
#4 | interdiff-2147349-1-4.txt | 10.27 KB | bryanbraun |
#1 | tour_example-2147349-1.patch | 7.14 KB | bryanbraun |
Comments
Comment #1
bryanbraun CreditAttribution: bryanbraun commentedI've attached a patch for including a module documenting a basic tour. Please review and provide feedback when possible. Thanks!
Comment #2
vijaycs85Good start, here are few comments at the first level of review:
No new line at the end
Guess, we don't need hook_menu
Can we have few more different elements of a page and how can tour provide options to navigate from one to other.
Comment #3
Mile23Good work, bryanbraun.
In addition to the coding standards stuff about trailing whitespaces and 80-char lines...
Please have this content at /examples/tour_example.
That way it's completely visible after the module has been enabled.
It might also be cool to define some tours for other examples, though that's a bit out of scope here.
Also: @vijaycs85: We do need hook_menu(), because Drupal 8 now makes a distinction between a route and a menu path. https://api.drupal.org/api/drupal/core%21includes%21menu.inc/group/menu/8
Comment #4
bryanbraun CreditAttribution: bryanbraun commentedThanks for the feedback! I've made all the codesniffer fixes, added a README document, made a few tweaks to the tour, and changed the example URL. I've kept the new URL in the admin theme, since the tour icon is only available in the toolbar, which isn't visible to non-authenticated users. The primary use case for Tour is for CMS users anyway, not site visitors.
I rerolled the patch to include these changes, but also included an interdiff.
Comment #5
Mile23Thanks, bryanbraun.
I was curious how to go about writing tests for tours, so I did some work on this and ran with it.
Any criticism welcome, obviously. :-)
Comment #7
Mile235: 2147349_5.patch queued for re-testing.
Comment #8
Mile23Committed: http://drupalcode.org/project/examples.git/commitdiff/f01139a9ca43d5cf1d...
Thanks, folks!
Comment #9
Mile23Comment #10
vijaycs85Thanks to @bryanbraun and @Mile23 for the great work to get this in. Reg #2.2 - yeah @Mile23 is right. may be we are not there yet (i.e. to get hook_menu() out).