Problem/Motivation

Anonymous users cannot start Tours. Currently Tours can only be started by clicking a button in the toolbar, and typically anonymous users have no permission to access the toolbar.

Proposed resolution

Provide a block with a button to start a Tour. This block can then be freely placed anywhere in the website.

How to test

  1. Grant permission to access tours and the views UI (lol) to the authenticated and/or anonymous user role.
  2. Place the block in the sidebar.
  3. Log in as a test user and visit admin/structure/views.
  4. Click on a view to access it.
  5. Click the tour button in the sidebar.
  6. Or visit ie http://drupal.d8/admin/structure/views/view/frontpage?tour=1 (as both authenticated or anonymous

Remaining tasks

User interface changes

None.

API changes

None.

Data model changes

None.

Original report by clemens.tolboom

As the tour icon is only available on the Toolbar anonymous users must get access to the Tour icon.

Without the 'Use the administration toolbar' the tour code is not loaded on the page so even an auto start like http://drupal.d8/?tour=1 fails.

Having the toolbar enabled the user get an access denied for the 'Menu' button.

CommentFileSizeAuthor
#103 tour-block-no-css-2069073-103.diff.txt171 bytesthejimbirch
#103 tour-block-no-css-2069073-103.patch6.02 KBthejimbirch
#101 Screen Shot 2021-10-22 at 7.33.50 PM.png330.57 KByogeshmpawar
#101 interdiff-2069073-98-101.txt698 bytesyogeshmpawar
#101 2069073-101.patch6.02 KByogeshmpawar
#98 tour-block-no-css-2069073-98.diff.txt9 KBthejimbirch
#98 tour-block-no-css-2069073-98.patch6.02 KBthejimbirch
#96 tour-block-no-css-2069073-96.diff.txt13.82 KBthejimbirch
#96 tour-block-no-css-2069073-96.patch1.51 KBthejimbirch
#84 beforePatch-2069073.png37.03 KBpaulocs
#84 afterPatch-2069073.png38.87 KBpaulocs
#84 beforePatch2-2069073.png44.62 KBpaulocs
#83 interdiff_81-83.txt796 bytesridhimaabrol24
#83 2069073-83.patch13.42 KBridhimaabrol24
#81 2069073-81.patch13.34 KBridhimaabrol24
#74 allow_tours_to_be_taken_by_users_that_cannot_access_the_toolbar2069073-74.patch13.13 KBjncruces
#70 2069073-70.patch2.98 KBmaboresev
#64 2069073-64.interdiff.txt763 bytesclaudiu.cristea
#64 2069073-64.patch13.03 KBclaudiu.cristea
#62 2069073-62.patch13.03 KBclaudiu.cristea
#60 interdiff.txt718 bytespfrenssen
#60 2069073-60.patch12.14 KBpfrenssen
#58 interdiff.txt721 bytesDinesh18
#58 2069073-58.patch12.14 KBDinesh18
#55 interdiff.txt2 KBpfrenssen
#55 2069073-55.patch12.14 KBpfrenssen
#46 interdiff.txt513 bytesidimopoulos
#46 2069073-46.patch11.65 KBidimopoulos
#41 2069073-41.patch10.59 KBclemens.tolboom
#38 interdiff.txt9.04 KBidimopoulos
#38 2069073-38.patch11.6 KBidimopoulos
#1 toolbar-anonymous-5.png32.47 KBclemens.tolboom
#9 2069073-9.patch2.37 KBpfrenssen
#10 2069073-10.patch2.63 KBpfrenssen
#10 interdiff.txt825 bytespfrenssen
#11 2069073-11.patch2.38 KBpfrenssen
#11 interdiff.txt1.19 KBpfrenssen
#12 2069073-12.patch5.74 KBpfrenssen
#12 interdiff.txt2.63 KBpfrenssen
#13 2069073-13.patch5.2 KBpfrenssen
#13 interdiff.txt900 bytespfrenssen
#16 2069073-16.patch5.18 KBpiyuesh23
#16 interdiff.txt1.05 KBpiyuesh23
#18 Comments__Comment____Site-Install.png47.89 KBxjm
#18 tour_button.png4.67 KBxjm
#19 2069073-19.patch7.51 KBpfrenssen
#19 interdiff.txt3.18 KBpfrenssen
#19 tour-button-bartik.png4.17 KBpfrenssen
#19 tour-balloon-bartik.png36.38 KBpfrenssen
#23 2069073-23.patch7.48 KBpfrenssen
#23 interdiff.txt2.15 KBpfrenssen
#32 tour-start-a-tour.png2.69 KBidimopoulos
#32 tour-take-a-tour.png2.83 KBidimopoulos
#35 tour-pixels.png21.38 KBidimopoulos
#36 tour-styled-nub.png25.44 KBidimopoulos
#36 interdiff.txt7.93 KBidimopoulos
#36 2069073-36.patch10.48 KBidimopoulos
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

clemens.tolboom’s picture

Issue tags: +Tour
FileSize
32.47 KB

[edit]The quirks are resolved.[/edit]

The main issue is still applicable.

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.

pfrenssen’s picture

Issue summary: View changes

A good idea could be to provide a block with the button that site builders can place wherever they want.

clemens.tolboom’s picture

Issue summary: View changes

I'm not sure why the image wasn't embedded. Now I see it the screenshot was not from anonymous. Argh. Trying to reproduce I failed misarably.

What route should we use to add one to the frontpage? Or node/1?

@pfrenssen your suggestion 'adding a block' sound great! It adds the possibility to theme it thus making it more prominent.

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.

pfrenssen’s picture

Version: 8.4.x-dev » 8.5.x-dev
Assigned: Unassigned » pfrenssen
Category: Bug report » Feature request

We are interested in providing a Tour for anonymous users in our project so I am going to start on this.

I'm retitling this and transforming it into a feature request since solving it with a block feels more like a feature addition than a bugfix. This means that this will be for 8.5.x at the earliest, but it is very likely that the patches will also work on 8.4.x.

pfrenssen’s picture

Status: Active » Needs review
FileSize
2.37 KB

Starting off by creating a simple block that now shows the button on every page. It is already able to launch the tours if we are on a tour-enabled route.

Next step will be to only show the block on tour-enabled routes.

pfrenssen’s picture

FileSize
2.63 KB
825 bytes

Interesting, so it actually already works as it should, since the showing / hiding of the button is handled in JS. I just added an access control here so the button will not be loaded if the user doesn't have permission to view tours.

This is going pretty smoothly. Next step is providing a test.

pfrenssen’s picture

FileSize
2.38 KB
1.19 KB

Some small improvements:

  • Correctly apply the 'hidden' CSS class to the block wrapper so the block doesn't "flash" when a page with no tour is loaded.
  • Since the block will be present on any page and be hidden using JS we don't need to cache by route.
pfrenssen’s picture

Title: Toolbar must be enabled for Anonymous to start a Tour » Allow Tours to be taken by users that cannot access the Toolbar (e.g. anonymous users)
Assigned: pfrenssen » Unassigned
FileSize
5.74 KB
2.63 KB

Added a test. I opted for a JS test since none of the tour functionality was actually tested in a JS enabled browser. Now this also asserts that the tour tips actually become visible when the tour button is clicked, not just that they are present in the HTML.

pfrenssen’s picture

FileSize
5.2 KB
900 bytes

Extended the test a bit to make sure the tour button doesn't show up on pages that do not offer a tour.

idimopoulos’s picture

Status: Needs review » Reviewed & tested by the community

Tested it and works as designed! The tour button is properly placed.
Patch seems fine to me.
Moving to RTBC.

borisson_’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Tour +Novice
  1. +++ b/core/modules/tour/src/Plugin/Block/TourButtonBlock.php
    @@ -0,0 +1,54 @@
    +        '#value' => t('Tour'),
    

    Can't we use $this->t( instead of a regular t here?

  2. +++ b/core/modules/tour/tests/src/FunctionalJavascript/TourButtonBlockTest.php
    @@ -0,0 +1,82 @@
    +  /**
    +   * Modules to enable.
    +   *
    +   * @var array
    +   */
    +  public static $modules = ['block', 'tour', 'tour_test'];
    

    This can be {@inheritdoc} instead of the complete doc.

piyuesh23’s picture

Status: Needs work » Needs review
FileSize
5.18 KB
1.05 KB

@borisson_, we can definitely use $this->t() in here given this is a custom block plugin. Also, since we not overriding the doc comment here in any specific way the docblock in the base class BrowserTestBase makes more sense.

Uploading an updated patch here.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Novice

Awesome, this was already rtbc in #14 and the nitpicks I found were fixed. so back to rtbc it is.

xjm’s picture

Status: Reviewed & tested by the community » Needs work
FileSize
47.89 KB
4.67 KB

I think this is a great idea. (Providing the toolbar to anonymous users has funny results indeed, which is a separate bug.)

I tested this patch with the following steps:

  1. Grant permission to access tours and the views UI (lol) to the authenticated user role.
  2. Place the block in the sidebar.
  3. Log in as a test user and visit admin/structure/views.
  4. Click on a view to access it.
  5. Click the tour button in the sidebar.

A few improvements I think we should make:

  1. I think we should make it not display the block title by default because it looks kind of silly:

    This can be done with:

      /**                                                                           
       * {@inheritdoc}                                                              
       */
      public function defaultConfiguration() {
        return ['label_display' => FALSE];
      }
    
  2. I also think it'd be good to provide some styling for the button that's similar to what's available in the toolbar, with the question icon.
  3. A side effect of exposing tours outside admin pages is that they're not styled with the admin theme. They look pretty icky in Bartik:

    That might be a separate issue scope, not sure. It might be a followup. But I think we should at least provide a border for the tips in Bartik in this patch so that they're not totally confusing and broken-looking (since this patch will remove the assumption that Tour pages only show up on administrative routes).

Thanks!

pfrenssen’s picture

Status: Needs work » Needs review
FileSize
7.51 KB
3.18 KB
4.17 KB
36.38 KB

I tried my hand at some basic styling. My frontend chops are very poor so I just shamelessly stole the CSS from the Toolbar module :D

This is how the tour button now looks in Bartik:
Screenshot of Tour button in Bartik

And the balloons:
Screenshot of Tour balloon in Bartik

We can indeed further refine the styling in a followup.

Status: Needs review » Needs work

The last submitted patch, 19: 2069073-19.patch, failed testing. View results

pfrenssen’s picture

Status: Needs work » Needs review
sardara’s picture

Status: Needs review » Needs work
  1. +++ b/core/modules/tour/src/Plugin/Block/TourButtonBlock.php
    @@ -0,0 +1,63 @@
    +        '#tag' => 'button',
    

    Maybe we can add a class in here, so we can target the element through that, instead of using the element type directly.
    Maybe we can even use ".button", so we inherit the button styles present already.

  2. +++ b/core/themes/stable/css/tour/tour.module.css
    @@ -140,3 +140,45 @@
    +  background-image: url(../../images/core/icons/787878/questionmark-disc.svg);
    +  background-attachment: scroll;
    +  background-color: transparent;
    +  background-position: center center;
    +  background-repeat: no-repeat;
    

    This can be squeezed into a single line declaration.

  3. I noticed that the "nubs" (the little arrows that point to an element) are not styled and thus not visible for the Bartik theme. Do you think we should handle them later on, or put some default style also there?
pfrenssen’s picture

Status: Needs work » Needs review
Related issues: +#2935334: Theme tour help balloons and button
FileSize
7.48 KB
2.15 KB

Addressed the remarks:

  1. Good suggestion, fixed.
  2. I tried putting it on one line but I struggled with the background-size. I read the documentation of the CSS3 background property but it is not very comprehensive on the sizing part. I tried a few things like "center/100% center/auto" but in the end the only thing that worked reliably is splitting it off on a second line. The other properties were no problem.
  3. I think that would be better in a dedicated issue in the Bartik issue queue. I created a followup for it so it won't be forgotten: #2935334: Theme tour help balloons and button.
idimopoulos’s picture

Status: Needs review » Reviewed & tested by the community

I would move ahead with it but I think the #2935334: Theme tour help balloons should be merged in first. An admin can already set batrik as the admin theme but it's not very common. This change can make it easy for a lot of tours to be created.

larowlan’s picture

+++ b/core/themes/bartik/bartik.libraries.yml
@@ -46,6 +46,7 @@ global-styling:
+      css/components/tour.css: {}

+++ b/core/themes/bartik/css/components/tour.css
@@ -0,0 +1,8 @@
+/**
+ * @file
+ * Tour module overrides for Bartik.
+ */
+
+.joyride-tip-guide {
+  border: 1px solid #ccc;
+}

this feels out of scope, but flagging for the front-end framework managers to review css

also, can we can get an IS update to indicate the solution - uses a block

xjm’s picture

@larowlan, I think it needs to be in scope because of the visual bug; see #18. I was actually thinking we should also maybe additionally put a border by default in the module's CSS, so that other themes don't have tour tips bleeding into the background in a hard-to-read way.

xjm’s picture

Hm, patch is also adding CSS to Stable which I think might be considered a BC break. (Safe places to put it might be the module or the internal themes.) Not sure what the policy is on adding classes to Stable to new UI elements. Edit: Also, at least, I think the styles should go in Classy and not stable?

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs frontend framework manager review

Stable is supposed ship with a minimum required CSS (only functional CSS). If we'd want to add these styles to the base themes, it should be inside Classy as pointed by @xjm on #27.

I would suggest that we leave all of the design decisions like this one for the themes themselves, meaning that we only apply this design in Seven and Bartik. The styles the latest patch adds for the button in Stable could be used as a base for the Seven and Bartik styles.

I agree with #18 that button with a text "Tour" can be confusing. Rather than adding the question mark, could we solve this by changing the wording for something more descriptive such as "Start a tour"?

Anyway, I reviewed the CSS code and by itself, it looks fine to me. Since there's some design involved with this, It would be great to get a UX team, and potentially later a product manager to review the design.

pfrenssen’s picture

Issue summary: View changes

also, can we can get an IS update to indicate the solution - uses a block

Updated the issue summary.

pfrenssen’s picture

I agree with #18 that button with a text "Tour" can be confusing. Rather than adding the question mark, could we solve this by changing the wording for something more descriptive such as "Start a tour"?

Let's indeed change this to "Start a tour" and also make the text configurable in the block options.

pfrenssen’s picture

Small clarification of @lauriii's comment in #28. My understanding is that he suggests to NOT move the basic styling into the 'classy' theme, but rather move it directly into Seven and Bartik.

In general, basic styling for cosmetic purposes should be in Classy and not in Stable, so that it can be inherited by core themes and custom themes built on top of Classy. But this is a special case. These balloons can be implemented in very different ways, so any basic theming being present in Classy will just get in the way of custom themes and would need to be overridden.

So this means we will have duplication of the styling between Seven and Bartik, but that's an acceptable compromise.

idimopoulos’s picture

What about "Take a tour"? I don't know but it seems to me better than the "Start a tour" especially with the question mark in front.

pfrenssen’s picture

lauriii’s picture

"Take a tour" as well sounds good for me.

idimopoulos’s picture

FileSize
21.38 KB

Also, regarding the basic styling for batrik theme, a bit further refinement is needed. I tried the honeypot tour and the following two things happened:

1. When the tour box is below the target element, there is a small overlap as shown in the attached picture. These are only a few pixels though.
2. When the tour box is above the element, and the window repositions, and the tour is high enough, a bit of text moves above the screen. This behaviour occurs also in the seven theme. The full window is not shown but the window is repositioned for the main content of the tour window.

Also, sometimes it is not clear the element that the tour targets.

All these need to be fixed as for basic functionality.

idimopoulos’s picture

FileSize
10.48 KB
7.93 KB
25.44 KB

Changes included:

  • Moved styling for the button to the batrik and seven themes respectively.
  • Change the title of the button from "Tour" to "Take a tour".
  • Style the nub (little arrow) similarly to the seven theme styling but use the colour #ccc which is used in the modal border. This fixes the overlap issue. I did not improvise there at all because of UX design decisions needed.
  • The "Next"/"End" button is using same styling as the "Take a tour" button.
  • Renamed the tour.css to tour.theme.css to have the same naming as the seven theme's corresponding file.

Hope I did not forget anything.
The image contains the styled nub.

idimopoulos’s picture

Status: Needs work » Needs review
idimopoulos’s picture

FileSize
11.6 KB
9.04 KB

Fix a minor remark.

The last submitted patch, 36: 2069073-36.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

clemens.tolboom’s picture

Issue summary: View changes

Added the test steps

clemens.tolboom’s picture

Issue summary: View changes
FileSize
10.59 KB

Visiting http://drupal.d8/admin/structure/views/view/frontpage?tour=1 as anonymous works.

I missed the overlay background so added that

--- a/core/themes/bartik/css/components/tour.theme.css
+++ b/core/themes/bartik/css/components/tour.theme.css
@@ -3,6 +3,10 @@
  * Tour module overrides for Bartik.
  */
 
+.joyride-modal-bg {
+  background: rgba(0,0,0,0.5);
+}
+
 .joyride-tip-guide {
   border: 1px solid #ccc;
 }

I don't understand the differences between

diff core/themes/bartik/css/components/tour.theme.css core/themes/seven/css/components/tour.theme.css

I found at least the tips lacking for bartik

Status: Needs review » Needs work

The last submitted patch, 41: 2069073-41.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

idimopoulos’s picture

@clemens.tolboom your patch failed because you did not branch off my latest one and it was one with a leftover in the tests (sorry for that, I hid that file).

Thanks for the background set.
The differences from diff core/themes/bartik/css/components/tour.theme.css core/themes/seven/css/components/tour.theme.css are simple theming. As I mentioned above and as @laurii and @xjm noted, decisions on the design should not be picked up without someone from the design team have a say. So what I did is I tried to re-use whatever already exists so that nothing seems as new design decisions.

This means that the colours should also match the respective theme colours. So the arrow is filled with the colour of the border of the tour box which in the specific case is #ccc.

For example, I do not mind that you added the background for the case that is a generic text. I did not forget it, it just didn't exist before (it did in the Seven theme only) so I didn't want to mess with the FE implementation of the thing that much. But if this is accepted, indeed it looks nicer.

In any case, please update your patch to start off the latest patch (2069073-38.patch)

clemens.tolboom’s picture

I'm sorry I took the wrong file :-( ...I'll try to find time. #41 is now hidden.

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

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now 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.

idimopoulos’s picture

FileSize
11.65 KB
513 bytes

Following up @clemens.tolboom remarks.

idimopoulos’s picture

Status: Needs work » Needs review
clemens.tolboom’s picture

Status: Needs review » Reviewed & tested by the community

- Overlay is now styled as an overlay.
- Design wise the bartik variant is ok as we have #2935334: Theme tour help balloons and button

xjm’s picture

It looks like we should have a usability review or what exactly the block should be displayed. After that we should probably have Lauri look at it again too. Thanks!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 46: 2069073-46.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

clemens.tolboom’s picture

Hmmm ... the code sniffer reports about an untouched file AFAIKS. Should we comply?

The patch contains 1 item out of 6

tests/src/FunctionalJavascript/TourButtonBlockTest.php
69:   * @return \Behat\Mink\Element\NodeElement|FALSE

Checking the https://www.drupal.org/pift-ci-job/866976 it has (Errors and) 6 coding style issue.
Next test https://www.drupal.org/pift-ci-job/868774 has 6 coding style issues.

lauriii’s picture

+++ b/core/modules/tour/js/tour.es6.js
@@ -28,7 +28,7 @@
+          el: $(context).find('#toolbar-tab-tour, .block-tour-button-block'),

We should add a data attribute or js- prefixed class to ensure that developers are aware that the element has JS attached to it.

pfrenssen’s picture

@lauriii good idea, can you suggest a good class or data attribute to use?

lauriii’s picture

@pfrenssen How about js-tour-start-button?

pfrenssen’s picture

Status: Needs work » Needs review
FileSize
12.14 KB
2 KB

Great suggestion!

pfrenssen’s picture

Issue summary: View changes
lauriii’s picture

Status: Needs review » Needs work
Issue tags: -Needs frontend framework manager review
+++ b/core/modules/tour/tests/src/FunctionalJavascript/TourButtonBlockTest.php
@@ -0,0 +1,81 @@
+    $elements = $this->cssSelect('.block-tour-button-block button');

We could use the js prefixed selector added in the most recent version of the patch here as well 🙌 Other than that everything looks good for me ✨

Dinesh18’s picture

Status: Needs work » Needs review
FileSize
12.14 KB
721 bytes

Here is the interdiff and patch based on the comment #57.

Status: Needs review » Needs work

The last submitted patch, 58: 2069073-58.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

pfrenssen’s picture

Status: Needs work » Needs review
FileSize
12.14 KB
718 bytes

This should fix the test failure.

I'm wondering if this actually still need a usability review? The block only shows the toolbar button and it can be placed anywhere the site builder wants it.

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

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now 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.

claudiu.cristea’s picture

FileSize
13.03 KB

Straight reroll of #60.

Status: Needs review » Needs work

The last submitted patch, 62: 2069073-62.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

claudiu.cristea’s picture

Status: Needs work » Needs review
FileSize
13.03 KB
763 bytes

Fix the test.

claudiu.cristea’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs usability review

No, this needs no usability review. This is a block that shows the same button as in the toolbar.

I only did a reroll and a very small change to use WebDriverTestBase instead of the deprecated one. We tested this block and we're already running it for anonymous users in our project, in production. All the previous concerns and remarks were addressed. So, RTBC.

The last submitted patch, 60: 2069073-60.patch, failed testing. View results

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Usability

I do still think that we should get someone design oriented to review the new components this issue introduces. This doesn't use the pre-existing button styles, but rather introduces something new. If this would be just about using pre-existing components we have, we wouldn't necessarily need a review.

+++ b/core/themes/bartik/css/components/tour.theme.css
@@ -56,48 +49,40 @@
+.block-tour-button-block .tour-button {
...
+[dir="rtl"] .block-tour-button-block .tour-button {
...
+.block-tour-button-block .tour-button:before {
...
+[dir="rtl"] .block-tour-button-block .tour-button:before {
...
+.block-tour-button-block .tour-button:active:before,

+++ b/core/themes/seven/css/components/tour.theme.css
@@ -101,3 +101,41 @@
+.block-tour-button-block .tour-button {
...
+[dir="rtl"] .block-tour-button-block .tour-button {
...
+.block-tour-button-block .tour-button:before {
...
+[dir="rtl"] .block-tour-button-block .tour-button:before {
...
+.block-tour-button-block .tour-button:active:before,
+.block-tour-button-block .tour-button.is-active:before {

We should remove the block class name from the selectors since it should be possible to place the tour button outside the block.

claudiu.cristea’s picture

Issue tags: +Needs usability review
claudiu.cristea’s picture

I split the triggering element selector in #3012027: Decouple tour triggering from the toolbar.

maboresev’s picture

Version: 8.7.x-dev » 8.6.3
FileSize
2.98 KB

Hello,

I've trained to apply this patch at 8.6.3 version of Drupal Core and it fails. In 8.7-dev version it works properly.

I've made a patch with the Tour Block which applies on 8.6.3 version.

Please, check it. It has no tests nor CSS.

pfrenssen’s picture

Version: 8.6.3 » 8.7.x-dev

Thanks @maboresev for rolling this against 8.6.3. Unfortunately since this is a feature request this won't be accepted for Drupal 8.6.x which only receives bug fixes. New features are developed against the next release of Drupal core, so I will set this back to 8.7.x.

The current patch is the one from #64.

clemens.tolboom’s picture

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

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

jncruces’s picture

FileSize
13.13 KB

The previous patch submitted on #64 not working with 8.8.x branch.

The attached patch is the same but corrected with the changes on the original file.

I can't attach the interdiff file because it fails on creation because both patches are of different versions of the original files.

The patch attached on #64 not work with 8.7.1, for this reason I hide it.

Greetings.

yogeshmpawar’s picture

Status: Needs work » Needs review

Setting back to Needs Review & Triggering bots.

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

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

fprevos2’s picture

Patch in #74 works for me, thanks.

TomSaw’s picture

Applied #74 and works fine!
You need to clear your browser cache, otherwise the required java is not loaded

Thanks for the patch :)

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

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

psf_’s picture

Status: Needs review » Needs work

Work for me in Drupal 8.9.1, but the tests don't complete.

ridhimaabrol24’s picture

Status: Needs work » Needs review
FileSize
13.34 KB

Rerolling patch for 9.1.x!

Status: Needs review » Needs work

The last submitted patch, 81: 2069073-81.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

ridhimaabrol24’s picture

Status: Needs work » Needs review
FileSize
13.42 KB
796 bytes

Fixing test cases!

paulocs’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
44.62 KB
38.87 KB
37.03 KB

Patch #83 looks good to me.

Set to RTBC.

paulocs’s picture

Status: Reviewed & tested by the community » Needs review

Actually I think we need Usability review before commit it. Am I right?
I'll set back to needs review

coaston’s picture

Is there any update? When it will be available for drupal core update? Dont want to aply the patch for the core modules.

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

robin.ingelbrecht’s picture

Would be nice if we would be able to configure the button label?

gwvoigt’s picture

Any luck with 8.9.10? Seems like none fo the patches work for this version

eit2103’s picture

Same here, been waiting for this to be included in core for a while now.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

jimmynash’s picture

The patch in #83 applied to 8.9.13 for me with a little offset. This patch really helps with doing custom tours since we don't have to rely on the menu link and can use the block.

thejimbirch’s picture

In Drupal 9.2+ there are some pretty significant changes to Tours in core. The jQuery Joyride library has been deprecated and replaced with Shepherd JS.

This issue may be effected.

Deprecate and replace jQuery Joyride (for tours)
Issue: https://www.drupal.org/project/drupal/issues/3051766

Joyride library deprecated
Change Notice: https://www.drupal.org/node/3195234

Tour schema properties 'location' and 'attributes' deprecated
Change Notice: https://www.drupal.org/node/3204093

f0ns’s picture

FYI - Patch & functionality works perfectly on Drupal 9.2.4

edit 1: also works on 9.2.5
edit 2: also works on 9.2.6

f0ns’s picture

thejimbirch’s picture

thejimbirch’s picture

thejimbirch’s picture

ok, trying this again.

Attaching a reroll of the patch in #83 that removes the styling, and adds the .button class instead of the .tour-button class.

  • Most of the styling was for the previous joyride library.
  • The "Take a tour" button label change removed the need for the ? icon IMHO.
  • Using the theme's default button styles may remove the need for a UX review (?)
  • Shepherd and Tour's default styles are brought in using the tour/tour-styling library.
thejimbirch’s picture

Issue summary: View changes
benjifisher’s picture

Status: Needs review » Needs work

The testbot shows that there are some coding standards issues. That is what "Custom commands failed" means, and it also means that other tests were not run. One of these days, the testbot will set issues to NW in this case, but for now I will do that manually.

yogeshmpawar’s picture

Status: Needs work » Needs review
FileSize
6.02 KB
698 bytes
330.57 KB

Resolved CS issues

Status: Needs review » Needs work

The last submitted patch, 101: 2069073-101.patch, failed testing. View results

thejimbirch’s picture

Updated the patch to add the button class which I thought I had added in #98.

Status: Needs review » Needs work

The last submitted patch, 103: tour-block-no-css-2069073-103.patch, failed testing. View results

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

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

thejimbirch’s picture

Per discussion in Drupal Usability Meeting 2021-12-03, using the .button class and not adding additional CSS negates the need for a UX review/approval.

It was suggested to check with A11Y team, which I will queue.

Removing UX tags, adding A11Y review tag.

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

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now 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.

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

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now 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.

smustgrave’s picture

This sounds interesting wonder if the accessibility team had a chance to take a look.

smustgrave’s picture

Version: 10.1.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, which currently accepts only minor-version allowed changes. 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

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.

quietone’s picture

Project: Drupal core » Tour
Version: 11.x-dev » 1.0.x-dev
Component: tour.module » Code
Status: Postponed » Needs work