-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor getStaticPageProps workflowID to project's single active workflow, if no query param #2912
Conversation
…ow if undefined in params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code read looks good. I'll run through the code locally later today but the changes seem harmless. I've suggested clarifying the comments and also using mock data that reflects real API data.
ADR 34 says the following about default workflows, which won't be possible if they're removed completely.
Default workflows programmatically no longer has any meaning. We could still use this to visually indicate a preferred or suggested workflow from the project team in the UI. This is a design question to explore if we are asked for it.
Maybe restrict this PR just to fixing the bug and open a second PR to suggest removing default workflows completely? I've got no strong opinions.
packages/app-project/src/helpers/getStaticPageProps/getStaticPageProps.js
Outdated
Show resolved
Hide resolved
packages/app-project/src/helpers/getStaticPageProps/getStaticPageProps.spec.js
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good.
https://local.zooniverse.org:3000/projects/nora-dot-eisner/planet-hunters-tess/classify redirects to https://local.zooniverse.org:3000/projects/nora-dot-eisner/planet-hunters-tess/classify/workflow/11235.
https://local.zooniverse.org:3000/projects/pmlogan/poets-and-lovers/classify/workflow/19770 loads a finished workflow by ID.
I've suggested some changes but nothing blocking.
Package:
Closes #2910.
Describe your changes:
defaultWorkflow
(which was not necessarily the default workflow as defined inproject.configuration.default_workflow
) tosingleActiveWorkflow
(which is what the returned value is based on)Note - removing references to default workflow in accordance with ADR 34
Helpful explanations that will make your reviewer happy:
Review Checklist
General
Components
Apps
yarn panic && yarn bootstrap
ordocker-compose up --build
and app works as expected?Publishing
Post-merging