Skip to content
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

Workflow selection modal showing on PH TESS #2910

Closed
mrniaboc opened this issue Mar 1, 2022 · 5 comments · Fixed by #2912
Closed

Workflow selection modal showing on PH TESS #2910

mrniaboc opened this issue Mar 1, 2022 · 5 comments · Fixed by #2912
Assignees
Labels
bug Something isn't working

Comments

@mrniaboc
Copy link

mrniaboc commented Mar 1, 2022

The workflow selection modal that was built as part of the Engaging Crowds Indexing Tool effort is now showing on Planet Hunters TESS. It was originally designed to only show on projects with more than one live workflow, and should not be showing on PH TESS as it adds an unnecessary extra step for the volunteers to get through when they navigate to the classify tab.

See https://zooniverse.slack.com/archives/CANKLB50E/p1645782976011779

image

@mrniaboc mrniaboc added the bug Something isn't working label Mar 1, 2022
@mcbouslog mcbouslog self-assigned this Mar 1, 2022
@eatyourgreens
Copy link
Contributor

We used to set a default workflowID in the Classify page props, but I think I removed that, somewhere along the line. Probably a mistake, to be honest.

const { workflowID } = params
const { project } = getSnapshot(store)
const language = project.primary_language
const { active_workflows, default_workflow } = project.links
const workflowOrder = project.configuration?.workflow_order || []

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Mar 1, 2022

I removed the default workflow in #2580. I think that was an accident.

EDIT: Declaring a default, with URL params taking precedence, might fix this issue:

const workflowID = params.workflowID || store.project.defaultWorkflow

@mcbouslog
Copy link
Contributor

mcbouslog commented Mar 1, 2022

I removed the default workflow in #2580. I think that was an accident.

EDIT: Declaring a default, with URL params taking precedence, might fix this issue:

const workflowID = params.workflowID || store.project.defaultWorkflow

I think removing reference to a default workflow was ok, is in line with ADR 34.

Shortly I'll open a PR that sets the workflow ID to the only workflow if there's only one active workflow. I think that solves the issue and is consistent with our intent to remove default workflow? Completely open to suggestion though, I don't have a staunch opinion.

Noting TESS' only active workflow isn't set as it's default workflow.

@eatyourgreens
Copy link
Contributor

project.defaultWorkflow returns a project’s single active workflow.

@eatyourgreens
Copy link
Contributor

Sorry, that was the wrong link but this should save you some work.

get defaultWorkflow() {
const activeWorkflows = self.links['active_workflows']
let singleActiveWorkflow
if (activeWorkflows.length === 1) {
[singleActiveWorkflow] = self.links['active_workflows']
}
return singleActiveWorkflow
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants