Tours for New Users (Deprecated)

This feature has been deprecated as the Hopscotch library it uses has also been deprecated.

Introducing new users to a new application or interface can be aided by providing pop-over annotations giving a self-guided tour of a page, project, or folder. Highlight important features, point out where to begin, and give a quick click through introduction to new content. Tours are defined in JSON using Hopscotch.

Tour Overview

The tour annotations appear as pop over 'bubbles' above the page contents. Each can be dismissed using an X or may contain one or more action buttons. Typically, click next to go to the next tour annotation. A tour may provide a series of annotations which change pages or tabs within a folder, or change folders within a project.

Once defined, tours can be run by selecting (User) > Tours > [name of tour]. Each may also be configured to run automatically when a user reaches the folder.

To see an example tour of a LabKey demo study, visit this project in another browser window:

Tour Builder

The tour builder allows an administrator to create, edit, export, and import tours. Navigate to the project or folder of interest and open the list of available tours:

  • Select (Admin) > Developer Links > Schema Browser.
  • Open the announcements schema.
  • Select Tours.
  • Click View Data.

Build a Tour

Above the list of available tours, select (Insert Data) > Insert New Row. Note that if any tours are set to "Run Always" they may also run in the tour builder UI, depending on selectors they use. Simply click the X in the first box to stop the tour.

  • Title: Enter a title for your tour. The title will be displayed on the (User) > Tours menu.
  • Description: Enter a description, which will be shown in the grid of tours and within the builder, but not on the menu.
  • Mode: Select whether you want your tour to run automatically. No matter what this setting, the user can always run a tour from the header Tours menu. Options are:
    • Run Always: Each time the user reaches the container, the tour will run.
    • Run Once: Run it the first time the user reaches the container.
    • Off: Never run unless the user selects it from the menu. This option may be the most practical during development.

Selectors and Steps

The body of the tour is defined in a numbered series of steps. Each step is accompanied by an HTML selector which defines what element of the page it is attached to. In a typical annotation, the popover annotation may "point" to the selector element, though you have the option to adjust position/location/direction of pointers and bubbles in a variety of ways relative to the chosen selector. Identify your selector by using "right click>Inspect" in your browser.

For example, the selector for the first step in the study tour is ""; the content of the Study Overview web part which appears in HTML as <td class="study-properties" valign="top">.

The definition of the step includes using options to place the bubble on top of the element, offset the position by an X and Y value and center the arrow in the center:

content: "<br>Welcome! <br> A LabKey Study integrates and aligns diverse clinical research data...",
placement: "top",
xOffset: 150,
yOffset: 50,
arrowOffset: "center",
title: "Guided Study Tour"

If you run the (User) > Tours > Study Tour-old in the same folder (after clicking X to exit the main tour), you will see the default position of the bubble for the same selector is below, and left-justified with a left-justified pointer.

For more about the options available in step definitions, see Hopscotch Options for Tours (Deprecated).

Span Multiple Pages

To have a tour span multiple pages, the step before the page switch should include "multipage:true" and define "onNext". For instance, the second step in the sample tour shows the Study Navigator; clicking Next moves the tour to the Participants tab for the third step. The second step definition is:

content: "<br>Visual overview of study progress and data...." ,
placement: "left",
title: "Study Navigator",
multipage: true,
yOffset: -20,
onNext: function (){

Export/Import/Edit a Tour

Export a Tour

Exporting the JSON for a tour gives you a convenient way to jumpstart the process of creating additional tours. Click Export for the tour we just created. A popup window showing the tour definition will appear. Copy the contents of that window to your browser clipboard or an offline file.

Import a Tour

Import the tour we just exported into a new tour.

  • Return to the tours view and select (Insert Data) > Insert New Row.
  • Click Import.
  • Paste the exported tour into the popup window.
  • Click Import.
  • The imported tour will populate the builder.
  • You may need to change the name of the "newly imported" tour to avoid overwriting the old one.
  • Click Save and proceed to edit, or Save and Close.

Edit a Tour

Click Edit for the tour. Make changes as needed.

Clicking Add Step will add a new empty selector and step at the end of the existing tour.

If you need to reorder the steps in a tour, add an additional one early in a long tour, or remove one or more from the middle, the easiest way to do so is to export the tour, make changes directly in the JSON export, and reimport with the steps in the new order.

Example Tour


Was this content helpful?

Log in or register an account to provide feedback

expand allcollapse all