zooniverse / front-end-monorepo

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

Dropdown task marked as required, not required #3639

Closed mcbouslog closed 2 years ago

mcbouslog commented 2 years ago

Package

Describe the bug

A dropdown task set as required doesn't have to be answered to proceed with Done or Next in the classifier.

To Reproduce

Steps to reproduce the behavior:

  1. Create workflow with dropdown task that's required - (production test project - https://www.zooniverse.org/lab/4312/workflows/3852)
  2. Go to production test project - https://frontend.preview.zooniverse.org/projects/markbouslog/test-project-mb/classify/workflow/3852
  3. Note can click Done or Done & Talk

Expected behavior

Done, Done & Talk, or Next is disabled for a required task until answered, production test project - https://www.zooniverse.org/projects/markbouslog/test-project-mb/classify?reload=0&workflow=3852

Additional context

Staging test project:

eatyourgreens commented 2 years ago

The dropdown task story works for a required task. That’s interesting.

https://zooniverse.github.io/front-end-monorepo/@zooniverse/classifier/index.html?path=/story/tasks-simple-dropdown--light-theme&args=required:true&globals=locale:en;locales.en:English;locales.test:Test+Language

eatyourgreens commented 2 years ago

The required flag isn’t copied over from old-style dropdown tasks. https://github.com/zooniverse/front-end-monorepo/blob/0c7bab65eaba1959662293dc5e5235cd97e69d2f/packages/lib-classifier/src/plugins/tasks/dropdown-simple/models/helpers/legacyDropdownAdapter/legacyDropdownAdapter.js#L6-L13