Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Interactive Web Tour for Virtual Studies and Group Comparison #4687

Merged
merged 4 commits into from
Aug 22, 2023

Conversation

Beking0912
Copy link
Contributor

@Beking0912 Beking0912 commented Aug 8, 2023

Summarize

Description

This pull request introduces an Interactive Web Tour that aims to enhance the user experience and facilitate the exploration of less prominent features on the site. The interactive web tour guides new users through the functionalities of Virtual Studies (Create a Virtual Study - Not Logged In and Logged In) as well as Group Comparison (Compare User-defined Groups of Samples). The project is one of this year's Google Summer of Code (GSoC) projects.

The tour is implemented using the reactour library to provide an interactive UI, leveraging localStorage for seamless page transitions and TypeScript for robust type definitions.

Related Issue

Achievements

  • Implemented an extensible tour component, allowing for easy addition of new tour by creating new step file.
  • Created tours for two major features:
    • Virtual Studies
      • Create a Virtual Study for Not Logged In users
      • Create a Virtual Study for Logged In users
    • Group Comparison
      • Compare User-defined Groups of Samples
  • Completed end-to-end tests for the above two tour functionalities.

File Structure

  • src/tours
    • Steps
      • GroupComparison.tsx // Steps for group comparison
      • VirtualStudy.tsx // Steps for virtual study
      • index.tsx // Exports all the steps under the folder
    • Tour
      • index.tsx // Main file, the entry for tours and the tour that actually runs
      • types.tsx // Types for functions and props
      • styles.scss
    • index.tsx // Exports all tours here

Testing

E2E tests have been completed for the Create a Virtual Study for Logged In users and Compare User-defined Groups of Samples tour. The tests focus on validating the presence and functionality of expected buttons and elements by simulating user interactions. (Note: Test code is not included in this pull request but will be added separately.)
👉 See more about e2e testing on PR #4700.

Documentation

For detailed steps of each tour, test procedures, and instructions on adding new tours, refer to the detailed documentation or more detailed blog.

Demonstration

  • Create a Virtual Study for Not Logged In users: video
  • Create a Virtual Study for Logged In users: video
  • Compare User-defined Groups of Samples: video

UI Screenshots

Tour Entries in on the right bar:
Tour Entries

Normal Step UI:
Normal Step

Last Step UI:
Last Step

@inodb
Copy link
Member

inodb commented Aug 8, 2023

This looks really great!

Quick comments:

  • Change text here (this table only allows selection by mutation, other tables are for CNA):
    image
    "Click the check box in the “#” column to select three samples such as IDH1 mutations, TP53 mutant samples and EGFR amplified samples." -> Click the check box in the “#” column to select samples with e.g. IDH1 or TP53 mutations.
  • In that same step, when you select two and then deselect one, I see this screen:
    image

@Beking0912
Copy link
Contributor Author

Thanks for your feedback on the PR, Ino. I've fixed these two issues in the commit a28c584.

  1. I modified the text at that step:
    From: Select three samples
    To: Select two samples
    From: Click the check box in the “#” column to select three samples such as IDH1 mutations, TP53 mutant samples and EGFR amplified samples.
    To: Click the check box in the “#” column to select samples with e.g. IDH1 or TP53 mutations.
  2. Now, when the user selects two "#", the process advances automatically to the next step without the option to deselect.

@inodb
Copy link
Member

inodb commented Aug 10, 2023

Great! Thanks so much @Beking0912

Some other thoughts, which we can follow up on later. Not necessary for this PR, just writing it down:

  • When you click anywhere else on the page one exists the tour. This is great but sometimes one might accidentally click in the wrong area (happened to me :). Not sure if there's an easy way to bring the tour back. Alternatively maybe an additional confirmation button could work ("Do you really want to exit the tour?")
  • Is there a way to enforce selection of a specific cohort? It might make sense to highlight some more specific cancer biology in future tours. Like e.g. in the mutations table one can explain what the most commonly mutated gene in glioma is. For the genomic alterations one could use e.g. this example and explain why AR is enriched in metastatic samples
  • It might also be good to have a separate "intro to the website" tour like here: https://deploy-preview-3101--cbioportalfrontend.netlify.app/ (goes over the main navigation at the top etc)

@inodb
Copy link
Member

inodb commented Aug 15, 2023

@Beking0912 apologies, one more request from the product team (Niki). On the frontpage could you change:

  • the tour section to be below the "What's New?" section?
  • Rename the "Web tours" header to "Interactive Tours"

@Beking0912
Copy link
Contributor Author

Beking0912 commented Aug 15, 2023

Thanks for your feedback on the PR, @inodb @alisman . I'd like to share some updates:

  • DONE the tour section to be below the "What's New?" section.
  • DONE Rename the "Web tours" header to "Interactive Tours".
  • DONE put isLoading in a computed getter of the component.
  • DONE Rename the function that determines number of studies.
  • DONE Add the property show_web_tours to hide/show the web tour on frontend. (DOING I'll create another PR on backend repo for adding show_web_tours, will update the PR link here later)

Feel free to give more feedback!

src/tours/Tour/styles.scss Outdated Show resolved Hide resolved
src/tours/Tour/index.tsx Outdated Show resolved Hide resolved
src/tours/Tour/index.tsx Outdated Show resolved Hide resolved
src/tours/Tour/index.tsx Outdated Show resolved Hide resolved
@alisman
Copy link
Collaborator

alisman commented Aug 15, 2023

@Beking0912 let me know if you want to discuss some of my comments. most of these are minor things. nice work!

@Beking0912
Copy link
Contributor Author

Thanks for your comments, @inodb @alisman ! I've make many updates on my code, take a look whenever you can, and feel free to give me any more suggestions for improvements!
In addition, there are two more related pull requests that require your attention:

Thanks again for your time!

optimize file structure

complete virtual-study-not login

complete virtual-study-login

customize local storage id
update virtual-study-login

optimize code structure

add more steps for group comparison tour

add types comments

complete user-defined group comparison tour

update virtual study styles

update group comparison styles

add web tour parameter detection

update styles and delete useless code

fix prettier styles

revert the change
add property to show/hide web tour

updates based on feedback

define data-tour attribute for the tours
@inodb inodb merged commit b79cc3e into cBioPortal:master Aug 22, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants