Coder Social home page Coder Social logo

pagetour-sdk's Introduction

PageTour SDK

npm npm Build Status Gated Build CodeQL

Page Tour

Overview

User readiness, digital app adoption, and app feature visibility in enterprise and consumer products is efficacious when driven interactively, and within the context of the application. However, the cost and delay in engineering such assets significantly impacts fast adoption, smooth engagement, and overall user satisfaction for your application. PageTour SDK addresses this ubiquitous challenge through interactive page tours, System Annoucement and Smart Tips. It also supports Voice-to-Text transcript generation to add transcripts on-the-go for audio voiceovers.

PageTour is a lightweight, Typescript SDK distributed as an NPM package. The SDK can be consumed in Angular, React, Typescript, and Plain JavaScript web apps. It provides an intuitive UI to web developers and application admins to author guided tours for web apps. Tours can be shared with end users through generated URLs, and also be targeted to a defined set of users.

PageTour SDK is easy to use and provides a number of options to customize your product for feature readiness, release announcement and landing efforts.

To address the user needs below tours can be created using Page tour

Page tour and Interactive Guides

Page Tour has been split into two separate features, enhanced with stability fixes, and improved component selectors

• Page Tours blur out rest of the page, except for highlighted component

• Allows users to stay focused on the tour step

• Reduces tour failures due to users interacting with page when a tour is running

• Interactive Guides allows users to interact with page as a tour is running to allow short immersive in-system training (existing feature)

System Announcements

System Announcements allow you to notify users about new major releases, such as a feature, workflows change etc., with a hero content for each page. Key features:

• Author multiple pages in a single announcement

• Customizable hero content on top with support for image, gif, video

• Customizable page titles, with rich editing options in body text

• Live preview in authoring experience

Smart Tips

Smart Tips enable authors to highlight a component in a page to draw user’s attention. It acts as a focal point to provide additional details on hover, without leaving the page context. Key features:

• Non-intrusive design

• Options to permanently or temporarily dismiss Tips

• Author multiple tips in a single bundle with common start/end dates

Installation

PageTour SDK

npm install pagetour-sdk

Repository package

PageTour SDK requires a repository object for initialization. One can either use one of the two available repository packages, or write a new custom repository class by implementing IPageTourRepository interface. (Insert link)

Install the repository package as per the requirement:

1. Install the HttpRepository package: This package is meant for development and production use. For production use, a custom API needs to be implemented for storing and retrieving PageTours. HttpRepository makes network calls to the provided API.

npm install pagetour-sdk.httprepository

2. Install the LocalStorageRepository package: This package is meant for quickly checking out PageTour in your application and doing a POC.

npm install pagetour-sdk.localrepository

Note: This package only persists the data in browser local storage. It is meant for only trying out the SDK and should not be used otherwise.

Usage

Import the library

import { PageTour } from 'pagetour-sdk';
...
const options = {};

Import and initialize the available repository or implement the IPageTourRepository

1. LocalStorageRepository

import { LocalStorageRepository } from 'pagetour-sdk.localrepository';
...
this.repository = new LocalStorageRespository();

2. HttpRepository

import { HttpRepository } from 'pagetour-sdk.httprepository';

...
/**
HttpRepository takes a configuration object containing
baseUrl of the API to be called for storing and retrieving tours.
Additionlly getEndpoint, putEndpoint, postEndpoint and deleteEnedpoints
can be provided.
*/
import { HttpRepository } from 'pagetour-sdk.httprepository';
...
this.repository = new HttpRepository({baseUrl:'https://api-baseUrl.com/'});

3. Implement the interface: Refer the docs for implementing the interface.

Initialize PageTour and get the instance

Pagetour.init(this.repository, options);
this.pagetour = PageTour.GetInstance();

Install and import bootstrap

Pagetour uses bootstrap. Install it if not already installed. Import it in the global stylesheet.

@import '~bootstrap/dist/css/bootstrap.css';

Import css in the global stylesheet

@import '~pagetour-sdk/dist/css/pagetour.css';

Open PageTour manager on button click

Add a button in the UI to open the PageTour manager.

const OpenManagerButton = document.getElementById('manage-tours');
OpenManagerButton.onClick = Pagetour.GetInstance().openPageTourManageDialog();

Sample App

Location:

  1. Clone the repo

  2. go to PageTour-SDK/apps/sample and run npm install and then npm run start

  3. Browse to http://localhost:4200

Authoring Tours

Author Page tour or Interactive Guide

Once installed, the authoring experience allows tours to be created within the web apps. Follow the below steps:

  1. Open the Author Tour Dialog. Enter the basic details of the tour like Name, Description etc. Then click the 'Add Step' button.

Author Tour Dialog

  1. The choose element modal pops up. It is a draggable element allowing author to interact with the web page before making the selection. Click on choose and the select the element on the page to be highlighted.

Choose Element

  1. Click on Next to open the Step Details dialog. Enter the step details like the event type, position of the tour box relative to the html element, message to be displayed to the user and so on. Find more details here.

Step Details Dialog

  1. Similarly add more steps to the tour. Preview the tour or click on save to save the created tour.

Save Tour

  1. Run the Tour!

Run Tour

For System announcement and Smart Tip check the documentation.

Documentation

See GitHub Wiki.

Development Environment Setup

The repository is a Lerna Monorepo. Learn more about Lerna here.

  1. Instal Node Version >=10.16.0
  2. Clone the repository and run npm install inside the root directory
  3. Run npm run build in the root to concurrently build all the packages inside the 'apps' folder.

pagetour-sdk's People

Contributors

deepakparamesh avatar deepakparameshms avatar dependabot[bot] avatar iswar7892 avatar kartikdot avatar kcsenthil7 avatar microsoftopensource avatar pratikgolchha avatar sumitparakh avatar vandanakvs avatar vanessalobo11 avatar vanessalobo211 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pagetour-sdk's Issues

After invoking the 'Close(x)' button in the take tour, Keyboard tab focus is not moving to triggered control.

Test Environment:
OS Version: 22H2 OS Build 22621.674
Browser: Chrome Version 96.0.4664.110 (Official Build) (64-bit)
#URL: Reactour Demo Template [live] - CodeSandbox

Repro steps:

  1. Open URL: Reactour Demo Template [live] - CodeSandbox
  2. Focus lands on the code editor as soon as page gets opened
  3. Press Ctrl+f6 key from keyboard then press 1 tab, then again press CTRL+M from keyboard and then press 1 tab to move focus out of editor pane.
  4. Press 6 tabs to land on ‘Try It’ control and press it. Pop-up gets displayed.
  5. Press 11 tabs to navigate to the close control and press it.
  6. Verify whether once after invoking the close control focus is landing on the triggered control or not.

Actual Results:
After invoking the 'Close(x)' button in the take tour, Keyboard tab focus is not moving to triggered control.
Observation: After invoking 'Close(x)' button, keyboard tab focus loss is observed and on pressing tab key, focus is not moving anywhere.

Expected Results:
After invoking the 'Close(x)' button in the take tour, Keyboard tab focus should move to triggered (i.e., Tack a tour) control.

Attachments:

Issue-202163-After.invoking.the.Close.x.button.in.the.take.tour.Keyboard.tab.focus.is.not.moving.to.triggered.control.mp4

Issue-202163-Keyboard focus

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.