zooniverse / Panoptes-Front-End

Front end for zooniverse/Panoptes
https://www.zooniverse.org
Apache License 2.0
64 stars 75 forks source link

Pages Editor: implement Associated Subject Sets & fetch more data #7048

Closed shaunanoordin closed 4 months ago

shaunanoordin commented 4 months ago

PR Overview

Part of: Pages Editor MVP project and FEM Lab super-project Follows #7046 Staging branch URL: https://pr-7048.pfe-preview.zooniverse.org/lab/1982/workflows/editor/3711?env=staging

This PR implements the "Associated Subject Sets" feature on the Workflow Settings sub-page.

Also, some background work was required to fetch the Subject Sets, so the DataManager was updated as well.

Screenshot: example workflow with 3 available subject sets, 2 of which are linked.

image

Testing

Status

Ready for review!

This PR is currently targeting pages-editor-pt14 for review purposes. Do not merge until 6974 is ready and this branch's merge is re-targeted to master.

shaunanoordin commented 4 months ago

Thanks Travis! I'm going to rebase, then address some of the smaller feedback in this PR, before merging. 👍

To respond to the point you raised:

I expected refreshing the page to keep me on the same tab "workflow settings".

Good point. Perhaps ideally, each "tab" should be its own sub-page with a URL, like https://local.zooniverse.org:3735/lab/1982/workflows/editor/3711/workflow-settings. However, at the moment the constraint I've imposed on myself is that the PagesEditor should be as self-contained as possible, so using a single path (/lab/PROJECT_ID/workflows/editor/WORKFLOW_ID) for all the PagesEditor tabs/sub-pages/features allows me to side step adding router dependencies inside the PagesEditor (which would've been somewhat annoying should we plan to port this to FEM.)

EDIT: Wait, a thought occurs: ?tab=workflowSettings param instead of /workflow-settings subpath to circumvent having to use react-router? Worth experimenting with later.

coveralls commented 4 months ago

Coverage Status

coverage: 56.98%. remained the same when pulling 8dc7206cb7de4fbafc35010ef72f188add4830fd on pages-editor-pt15 into a8bcd3da1310eab67f0218e49f6f1398d66f3ba2 on master.