ITISFoundation / osparc-issues

🐼 issue-only repo for the osparc project
3 stars 5 forks source link

Guided tours #1040

Open ignapas opened 1 year ago

ignapas commented 1 year ago

After the first POCs were implemented for oSPARC and the Postpro/Analysis service (PAS from now on) and a first meeting with @cosfor1, a new preliminary set of requirements can be defined. Requirements are different for oSPARC and PAS, so the implementations for both apps can be different. It is still to be decided what to do and when, to be discussed with @odeimaiz, @mguidon and @cosfor1.

Related to #931

Types of guided tours

For the moment we identified two possible types of tours:

Self-triggering tours

These are tours that are started spontaneously after some user action. Some examples of these kind of tours and what they could show to the user:

The majority of these tours are triggered by the backend, which also needs to remember if they have been shown and/or dismissed already, not to show them again.

On-demand tours

The user wants to learn about some specific feature of the app for which a tour is available. Examples:

These tours are actively searched by the user to learn the app's features and need to be easily accessible for relaunching.

Both types of tours are not mutually exclusive, a tour could be triggered by the server but still be available for the user to run it again.

Implementation

As a result of the requirements captured so far, a first implementation is proposed

UI

Tour steps

Highlighting

Guided tours catalog

For the user to browse and launch (or relaunch) tours, a view is created where the tours are displayed. The view has search functionality and shows a list of available tours, with a title and description. Could be useful to have it categorised.

Client-server communication

There are two moments where client and server could have to communicate:

Definition files

Proposed model

type AllTours = {
  [id]: GuidedTour
}

type GuidedTour = {
  id: string,
  title?: string,
  description?: string, // Title and description are needed when showInCatalog = true
  showInCatalog?: boolean = false,
  notifyStart?: boolean = false,
  notifyCompleted?: boolean = false, // Should the client notify the server upon starting/completing a tour?
  steps: Step[]
}

type Step = {
  title?: string,
  text: string,
  anchorEl?: string, // CSS selector. The step follows this element in the UI. If undefined, the step is centered in the screen
  highlightedEl?: string | string[], // CSS selector. The items to highlight, it defaults to the anchorEl
  blockUI?: boolean = true,
  placement?: 'top' | 'right' | 'bottom' | 'left' = 'bottom'
  beforeClick?: ClickSequence,
  afterClick?: ClickSequence
}

type ClickSequence = {
  selector: string | string[], // CSS selector
  revertSequence?: string | string[] // CSS selector
}
ignapas commented 1 year ago

For planning meeting (just ideas for discussion)

mguidon commented 1 year ago

@ignapas After discussion with @sanderegg and @GitHK we decided to have a way to pass user based json data from/to the db via a file in a volume mount. That will allow us to bi-directionally talk with the db through the sidecar.