zooniverse / front-end-monorepo

A rebuild of the front-end for zooniverse.org
https://www.zooniverse.org
Apache License 2.0
104 stars 30 forks source link

Project: Classify page allows the classifier tutorial to appear when other modals are already open. #2909

Closed eatyourgreens closed 2 years ago

eatyourgreens commented 2 years ago

Package

app-project lib-classifier

Describe the bug

After signing out then signing back in again, the workflow tutorial appears on top of the sign-in popup.

The sign in for Planet Hunters TESS, but the tutorial has popped up over the log-in box, preventing me from logging in.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://www.zooniverse.org/projects/nora-dot-eisner/planet-hunters-tess/classify/workflow/11235
  2. Click 'Sign Out'
  3. Click 'Sign In'

Expected behavior

The tutorial shouldn't be shown until after login is resolved.

Additional context

The browser console shows annotation missing for T1 and the classifier is empty (no subject or task) so it seems like the store is getting itself into an unexpected state. The missing task annotation in the screenshot is a red herring. It's bug #2891, which is fixed on staging but still open in production.

eatyourgreens commented 2 years ago

The annotation missing for T1 error is #2891, which is fixed on staging. https://frontend.preview.zooniverse.org/projects/nora-dot-eisner/planet-hunters-tess/classify/workflow/11235

eatyourgreens commented 2 years ago

The classifier is detecting that I'm not logged in, and correctly opening a tutorial in that case. It doesn't know that there's also a login form open, since the login form is controlled by the containing page, so the tutorial opens on top of the existing form.

eatyourgreens commented 2 years ago

You can also reproduce this on In The Spotlight. Choose a workflow and the tutorial will appear before you can choose a subject set, because tutorials listen to changes in workflows.active. https://frontend.preview.zooniverse.org/projects/bldigital/in-the-spotlight In The Spotlight, showing the workflow tutorial popping up in front of the subject set selection choices.

eatyourgreens commented 2 years ago

I think this bug also affects workflow selection: https://frontend.preview.zooniverse.org/projects/bldigital/in-the-spotlight/classify

In The Spotlight, with the popup tutorial obscuring the workflow selection menu.
eatyourgreens commented 2 years ago

See also the comments here. https://github.com/zooniverse/front-end-monorepo/pull/1976#issuecomment-761023499

The active tutorial appears when workflows.active changes in the classifier.

eatyourgreens commented 2 years ago

This is a bit of a hack, but the Classify page could pass a showTutorial boolean prop into the classifier, which tells the classifier whether or not it's safe to show the ModalTutorial component.

eatyourgreens commented 2 years ago

We could also extract ModalTutorial from the classifier, and make the Classify page responsible for managing all the popups, so that we don't get two open at the same time.

There's a related bug when both the popup workflow menu and the login form are open at the same time. Try it here: https://www.zooniverse.org/projects/humphrydavy/davy-notebooks-project/classify?login=true

Davy Notebooks with the workflow menu popup open on top of the sign-in popup.
eatyourgreens commented 2 years ago

Based on @goplayoutside3's comments on #2904, the Transformers project on staging might be a good place to test these bugs eg. https://frontend.preview.zooniverse.org/projects/darkeshard/test-project-2022/classify/workflow/3581?env=staging

Tutorial appearing above the workflow menu.

Screenshot of the Ultraman workflow, with the tutorial open on top of the workflow selection menu.

Tutorial appearing in front of the sign-in form.

Screenshot of the Ultraman workflow, with the tutorial open on top of the login form.
eatyourgreens commented 2 years ago

2918 fixed this for workflow selection and #2963 fixed the sign-in form.