Part of #1921152: META: Start providing tour tips for other core modules.

Problem/Motivation

Write tour integration for Extend admin page

Proposed resolution

Create tour yml files for required admin screens in admin/modules.

Remaining tasks

Create patch for tour integration for primary Extend page

User interface changes

New tours

API changes

None

Technical pointers when creating tour tips

See: https://drupal.org/node/1921152#tour-tips-tech-note for tech notes on making tour tips.

Files: 
CommentFileSizeAuthor
#27 tour.tour_.extend.yml_.txt2.98 KBbatigolix
#22 extend-tour-2040861.16.patch6.74 KBlarowlan
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch extend-tour-2040861.16.patch. Unable to apply patch. See the log in the details link for more information. View
#22 interdiff.txt2.75 KBlarowlan
#18 interdiff.txt4.15 KBlarowlan
#5 tour-extend-2040861-5.patch4.73 KBnielsonm
PASSED: [[SimpleTest]]: [MySQL] 62,921 pass(es). View
#1 tour-extend-2040861.patch2.61 KBlisarex
PASSED: [[SimpleTest]]: [MySQL] 57,136 pass(es). View

Comments

lisarex’s picture

Status: Active » Needs review
FileSize
2.61 KB
PASSED: [[SimpleTest]]: [MySQL] 57,136 pass(es). View

Text was written and reviewed by colleagues

larowlan’s picture

Looks good to me!

nick_schuch’s picture

Issue tags: -Tour +Needs tests

Tour needs tests since we now have #2028535

nick_schuch’s picture

Issue tags: +Tour

Adding missing tag.

nielsonm’s picture

Issue summary: View changes
FileSize
4.73 KB
PASSED: [[SimpleTest]]: [MySQL] 62,921 pass(es). View

Added a test to existing patch.

nielsonm’s picture

FileSize
2.05 KB
FAILED: [[SimpleTest]]: [MySQL] 63,173 pass(es), 1 fail(s), and 2 exception(s). View

Fixed namespace error.

nielsonm’s picture

FileSize
4.77 KB
FAILED: [[SimpleTest]]: [MySQL] 63,122 pass(es), 2 fail(s), and 1 exception(s). View

Accidentally forgot to add the whole patch as well as the tests.

nielsonm’s picture

FileSize
4.78 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View

Trying again on the merging the patches.

larowlan’s picture

nielsonm’s picture

FileSize
4.79 KB
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion. View

Re-rolled patch to use the new routing system.

nielsonm’s picture

Issue tags: -Needs tests
FileSize
4.6 KB
FAILED: [[SimpleTest]]: [MySQL] 63,208 pass(es), 3 fail(s), and 0 exception(s). View

Rerolled tests.

The last submitted patch, 6: tour-extend-2040861-6.patch, failed testing.

The last submitted patch, 8: tour-extend-2040861-8.patch, failed testing.

The last submitted patch, 10: tour-extend-2040861-9.patch, failed testing.

The last submitted patch, 7: tour-extend-2040861-7.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 11: tour-extend-2040861-11.patch, failed testing.

nielsonm’s picture

Issue tags: +Needs tests

Been ported to routing system, but needs passing tests.

larowlan’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests +Tour Content Review
FileSize
4.15 KB
6.72 KB
FAILED: [[SimpleTest]]: [MySQL] 63,735 pass(es), 18 fail(s), and 0 exception(s). View

So the issues with the tests are as follows:

  • details is a html5 element and the PHP Unit xml helper doesn't recognise html5 (known issue, we need php 5.4 before we can get the version of phpunit that does support it)
  • the action links are only present if update module is enabled
  • the block chunk same - added block
  • the help chunk same - added help

also refactors TourTestBase to

  • make it abstract (no tests in there)
  • add an adminPermissions property
  • create the admin user
  • enable seven theme
  • fallback to xpath instead of php unit for html5 elements.

Status: Needs review » Needs work

The last submitted patch, 18: extend-tour-2040861.13.patch, failed testing.

The last submitted patch, 18: extend-tour-2040861.13.patch, failed testing.

larowlan’s picture

Schema fails :-)

larowlan’s picture

Status: Needs work » Needs review
FileSize
2.75 KB
6.74 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch extend-tour-2040861.16.patch. Unable to apply patch. See the log in the details link for more information. View

Fixes schema fails, having that test in core is neat!

jibran’s picture

22: extend-tour-2040861.16.patch queued for re-testing.

jibran’s picture

Some suggestions

  1. We should add tour tips for permission and configuration links.
  2. We should add some module(perhaps node) specific tour tips.
  3. We can add project description related tour tip.
  1. +++ b/core/modules/system/config/tour.tour.extend.yml
    @@ -0,0 +1,72 @@
    +    body: 'Use this action link to install a module. There are thousands of contributed modules available for download at Drupal.org.'
    

    Can we make it www.drupal.org?

  2. +++ b/core/modules/system/config/tour.tour.extend.yml
    @@ -0,0 +1,72 @@
    +    body: 'This list can get quite long so theres a search field to quickly jump you to the one you are looking for.'
    

    Can we explain search type? e.g. Partial match search or machine name search etc.

  3. +++ b/core/modules/system/config/tour.tour.extend.yml
    @@ -0,0 +1,72 @@
    +    body: 'This collapsible group contains the core modules in Drupal. Modules you add will be placed in other groups. You can disable core modules if no other modules depend on them.'
    

    Isn't it a detail group now? In core we also have field and language groups.

  4. +++ b/core/modules/system/config/tour.tour.extend.yml
    @@ -0,0 +1,72 @@
    +    body: 'Use the checkbox to enable or disable modules. Remember to save before leaving the page.'
    

    Can't disable now. :P

  5. +++ b/core/modules/system/lib/Drupal/system/Tests/Module/ExtendTourTest.php
    @@ -0,0 +1,47 @@
    +    $this->assertTourTips();
    

    This is cool.

  6. +++ b/core/modules/tour/lib/Drupal/tour/Tests/TourTestBase.php
    @@ -12,7 +12,38 @@
    +   * @var array
    

    I think this should be string[] now.

  7. +++ b/core/modules/tour/lib/Drupal/tour/Tests/TourTestBase.php
    @@ -56,10 +87,24 @@ public function assertTourTips($tips = array()) {
    +          if ($elements == 0) {
    +            // Could be a html5 element that \PHPUnit_Util_XML::cssSelect() does
    +            // not support, fallback to xpath.
    +            $elements = $this->xpath('//*[@id = :id]', array(
    +              ':id' => $tip['data-id'],
    +            ));
    +          }
    

    Please add a @todo to remove this.

jibran’s picture

We can add tip for uninstall tab as well.

nielsonm’s picture

Assigned: Unassigned » nielsonm
batigolix’s picture

FileSize
2.98 KB

Find attached an attempt for a beefier tour

Some questions:

  1. what are the values for the location property. I tried bottom as a value but without succes
  2. i wanted to target the td with the description of the first module in the list using data-class: 'system-modules th:first-child td:nth-child(2)'
  3. i wanted to present the tips in a "normal" workflow order, instead of in the order in which the elements appear in the page. this results in a rather shaky tour that scrolls a lot up and down the page, if you know what I mean. What is the official opinion on this? should the tour follow a the flow of the page or the recommended user work flow?
  4. i keep updating the tour api page (https://drupal.org/developing/api/tour) whenever i find out more about tours, it is always good if others can check/verify changes
  5. patch from #16 contains a uuid tour property ("uuid: dd06919e-9c54-49a8-b0e7-bbf7e03d0db7"). what is the purpose of that
  6. if a tips is not appearing is there any way to find out why? does a wrong tip definition cause js errors?
larowlan’s picture

1) I think left and right, but will need to consult the joyride documentation
2) Anything that jquery supports should work
3) I think workflow is a good idea
4) No worries
5) Default config should have uuids
6) If the data-class or data-id doesn't find anything, the JavaScript removes the tip from the dom.

nielsonm’s picture

Assigned: nielsonm » Unassigned
dman’s picture

Tracking this following a suggestion from Stefan over in #2040375-28: Write tour integration for Appearance pages as it looks to me like the generic "test all the things" framework here belongs in TourTestBasic for the rest of us to inherit rather than copy&paste.

Status: Needs review » Needs work

The last submitted patch, 22: extend-tour-2040861.16.patch, failed testing.

webchick’s picture

Status: Needs work » Postponed

This one seems like a good thing to do, but postponed on #1921152-109: META: Start providing tour tips for other core modules. for now.

mgifford’s picture

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.