Skip to content

Commit 5660cca

Browse files
committed
[ui] Add product tour for first time users
Redirects to the '/product-tour' route the first time the UI is loaded on a device. The tour uses vue-shepherd to display a series of tooltips that describe some of the website's features and can be skipped any time. When the tour is finished or skipped it is saved as viewed on a cookie to avoid loading it again. Signed-off-by: Eva Millán <[email protected]>
1 parent 7dfc53f commit 5660cca

File tree

17 files changed

+725
-5
lines changed

17 files changed

+725
-5
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: New user onboarding
3+
category: added
4+
author: Eva Millan <[email protected]>
5+
issue: null
6+
notes: >
7+
Loading the user interface for the fist time
8+
takes users to an optional tour explaining
9+
SortingHat's most relevant features.

ui/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"vue": "^2.7.14",
2525
"vue-apollo": "^3.1.0",
2626
"vue-router": "^3.4.9",
27+
"vue-shepherd": "0.3.0",
2728
"vuetify": "^2.6.10",
2829
"vuex": "^3.1.3",
2930
"yargs": "^17.0.1"

ui/public/images/affiliate.gif

93 KB
Loading

ui/public/images/lock.gif

24.3 KB
Loading

ui/public/images/merge.gif

51.1 KB
Loading

ui/public/images/workspace.gif

26.3 KB
Loading

ui/src/App.vue

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,26 @@
5252
</v-list-item>
5353
</v-list>
5454
</v-menu>
55+
<v-menu v-if="user" offset-y left>
56+
<template v-slot:activator="{ on }">
57+
<v-btn depressed small color="primary" v-on="on">
58+
<v-icon small left> mdi-help-circle </v-icon>
59+
Help
60+
<v-icon small right> mdi-chevron-down </v-icon>
61+
</v-btn>
62+
</template>
63+
<v-list color="primary" dark dense>
64+
<v-list-item
65+
href="https://chaoss.github.io/grimoirelab-tutorial/sortinghat"
66+
target="_blank"
67+
>
68+
<v-list-item-title>Documentation</v-list-item-title>
69+
</v-list-item>
70+
<v-list-item to="/product-tour">
71+
<v-list-item-title>Product tour</v-list-item-title>
72+
</v-list-item>
73+
</v-list>
74+
</v-menu>
5575
</v-app-bar>
5676
<transition name="fade" mode="out-in">
5777
<router-view />

ui/src/components/IndividualsTable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
:items-per-page="itemsPerPage"
115115
:loading="loading"
116116
>
117-
<template v-slot:item="{ item, expand, isExpanded }">
117+
<template v-slot:item="{ item, expand, isExpanded, index }">
118118
<individual-entry
119119
draggable
120120
:name="item.name"
@@ -144,6 +144,7 @@
144144
@lock="handleLock(item.uuid, $event)"
145145
@enroll="confirmEnroll(item, $event)"
146146
@openMatchesModal="openMatchesModal(item.uuid)"
147+
:ref="`indv_entry_${index}`"
147148
/>
148149
</template>
149150
<template v-if="isExpandable" v-slot:expanded-item="{ item }">

ui/src/components/OrganizationsTable.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
:page.sync="page"
6565
:loading="loading"
6666
>
67-
<template v-slot:item="{ item, expand, isExpanded }">
67+
<template v-slot:item="{ item, expand, isExpanded, index }">
6868
<organization-entry
6969
:name="item.name"
7070
:enrollments="getEnrolledIndividuals(item.enrollments)"
@@ -79,6 +79,7 @@
7979
@delete="confirmDelete(item.name)"
8080
@getEnrollments="$emit('getEnrollments', { enrollment: item.name })"
8181
@addTeam="createTeam(item.name, $event)"
82+
:ref="`org_entry_${index}`"
8283
/>
8384
</template>
8485
<template v-slot:expanded-item="{ item }">

ui/src/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Cookies from "js-cookie";
1212
import { ApolloLink } from "apollo-link";
1313
import Logger from "./plugins/logger";
1414
import GetErrorMessage from "./plugins/errors";
15+
import VueShepherd from "vue-shepherd";
1516

1617
const API_URL = process.env.VUE_APP_API_URL || `${process.env.BASE_URL}api/`;
1718

@@ -54,6 +55,7 @@ fetch(API_URL, { credentials: "include" }).then(() => {
5455
Vue.use(VueRouter);
5556
Vue.use(Logger);
5657
Vue.use(GetErrorMessage);
58+
Vue.use(VueShepherd);
5759

5860
const apolloProvider = new VueApollo({
5961
defaultClient: apolloClient,

0 commit comments

Comments
 (0)