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

Workflow Selector in project homepage exceeds bounds of layout after refresh #3541

Closed MaysaB closed 2 years ago

MaysaB commented 2 years ago

Package

app-project

How it should look:

Initial landing page of project page eg Davy Notebooks page is fine. The workflow selector on the right hand side is within the bounds of the container.

(Screenshot of correct view)

Screenshot 2022-08-16 at 13 45 06

How it actually looks

When page is refreshed, workflow selector component shifts down and behind the Zooniverse Talk thumbnails.

(Screenshot of incorrect view)

Screenshot 2022-08-16 at 13 47 08

Steps to Replicate

  1. Go to 'https://frontend.preview.zooniverse.org/projects/humphrydavy/davy-notebooks-project'
  2. Scroll down so you can see the five workflow options.
  3. Refresh the page.
  4. See how the entire component shifts down.

Device information

Desktop (please complete the following information):

Additional context

Problem may be less obvious if the project has single workflow. Please test on incognito window to confirm. Bug does not exist as of the most recent production (commit 839972e) Can confirm that bug exists on most recent master(commit e502449)

eatyourgreens commented 2 years ago

The Workflow Selector code assumes that the component needs to wait for a user to load from the API, but that's no longer true as of this PR: https://github.com/zooniverse/front-end-monorepo/pull/2979

I think the bug is in the Loader component, or in the logic that shows the loader while waiting for a user to load.

EDIT: you can verify this by going into window session storage, in dev tools, and deleting the panoptes-user key for the current tab. The bug goes away if you reload the page with empty session storage.