Don't show anything if there is no tour for the page

Created on 19 November 2024, 5 months ago

Problem/Motivation

In πŸ› Show (disabled) Tour and Edit buttons on pages with no tour/edit available Fixed the module was updated to show 'No tour' if there is no tour available for a page. In that issue, the stated reason was that it was confusing to not see anything after applying the patch to add the feature. Although that could be confusing, it is quite a specific scenario that no longer really valid, or even so is purely considering the developer experience. But especially now that Tour is in contrib, someone installing the module would not expect to see anything by default, since you have to bring your own tours.

If we consider the experience of a Drupal CMS user, this is even more stark. The presence of this 'No tour' at the top of the navigation on every page is considerably worse than having an occasional confused developer. We only have two pages with a tour currently, and most pages will never have one.

Current behaviour:

Proposed resolution

Modify this so that nothing appears if there is no tour available.

Remaining tasks

  1. Action this change (& add tests?)
  2. Review
  3. Commit

User interface changes

Don't show anything if there is no tour available for a page.

API changes

N/A

Data model changes

N/A

✨ Feature request
Status

Active

Version

2.0

Component

User interface

Created by

πŸ‡¦πŸ‡ΊAustralia pameeela

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @pameeela
  • πŸ‡¦πŸ‡ΊAustralia pameeela
  • πŸ‡ͺπŸ‡ΈSpain ckrina Barcelona

    First, thanks for all the work put into Tours!

    I agree with the issue statement that if there is no Tour available the link should not there. But on a UX perspective, what makes sense for the user is what we should define as the default: so I would argue that there shouldn't be any setting to give the option, the trigger button should just be hidden by default if there is no Tour available.

    Another controversial point about this implementation, even if the issue isn't about this, is the placement of the Tour button trigger itself. The way the Navigation & Top Bar are supposed to work is:

    • The left sidebar navigation is for site-wide elements, that will appear on all pages regardless on where the user is. That ensures that the Navigation remains consistent across the UI without elements disappearing based on the page (which would confuse users)
    • The Top Bar is meant to hold any "contextual" elements relative to the existing page you are in

    So based on this, it doesn't make sense to have a Tour link at the top of the main Navigation, taking up valuable space. But if it will also show&hide based on context, its place is not the left sidebar: its place is the Top bar. I see this was agreed in ✨ Integrate with the new experimental navigation module Fixed without any input from the Navigation maintainers, who could have provided this guidance prior to implementing it.

    So my recommendation would be to completely remove it from the Navigation (and avoid having to do magic to hide the Tour as a menu item) and implement the Tour on the Top Bar appearing only when necessary.

  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    +1 to all of this!

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    So this is my plan

    For this ticket
    1. Add a configuration option to hide the button if no tips found
    2. Update hook, schema, and everything

    This should be easy and I can knock out tomorrow at the latest

    Open a new ticket
    1. Remove all code for navigation integration. Will put on the module page and README if users want to use tour with the navigation module they'll have to place the block somewhere for now.
    2. Add some styling so the button doesn't look like windows 98

    Open a postponed ticket
    1. Once navigation module top bar is implemented tour will use that.

    Thoughts?

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Opened πŸ“Œ Remove default integration with Navigation Active which is in review
    Opened πŸ“Œ Integrate with navigation top bar Postponed which is postponed
    Opened πŸ“Œ Better style tour block button Active which is WIP

    Now to start this one

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • πŸ‡ΊπŸ‡ΈUnited States thejimbirch Cape Cod, Massachusetts

    I applied the patch, ran drush updb, and the setting appeared. Switching it on immediately works as the setting page does not have a tour.

    Turning it off does require a cache clear to get the No Tour button to come back, but I feel that is acceptable.

    Marking as RTBC.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024