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

Light curve subject data not loading #2871

Closed mcbouslog closed 2 years ago

mcbouslog commented 2 years ago

Package

Describe the bug

https://www.zooniverse.org/projects/nora-dot-eisner/planet-hunters-tess/talk/2108/2356909

The light curve data is not loading in the subject viewer, within the classification interface. Sometimes the light curve data does load after clicking the subject info button or tutorial, and loads ok in Talk.

To Reproduce

If I throttle my connection to Fast 3G I think I’m consistently recreating the bug where the subject data won’t load on https://www.zooniverse.org/projects/nora-dot-eisner/planet-hunters-tess/classify/workflow/11235?demo=true

Expected behavior

Light curve data to load in the subject viewer.

Additional context

~Possibly related specifically to Sector 47 subjects (https://www.zooniverse.org/lab/7929/subject-sets/102590).~ recreated bug in different subject set than Sector 47 subject sets

mcbouslog commented 2 years ago

if I throttle my connection to Fast 3G I think I’m consistently recreating the bug where the subject data won’t load on https://www.zooniverse.org/projects/nora-dot-eisner/planet-hunters-tess/classify/workflow/11235?demo=true

compared to if I throttle my connection to Fast 3G on the commit before https://github.com/zooniverse/front-end-monorepo/pull/2719 the subject data does eventually load.

mcbouslog commented 2 years ago

I think the underlying issue is that the subject ID is defined before the dataPoints are. the viewer initially renders, but isn’t updated once the dataPoints are defined.

https://github.com/zooniverse/front-end-monorepo/blob/master/packages/lib-classifier/src/components/Classifier/components/SubjectViewer/components/LightCurveViewer/LightCurveViewerContainer.js#L94-L99

eatyourgreens commented 2 years ago

Sounds like the render should be dependent on JSONData, rather than subject ID, so that it runs after the data loads from the server.