-
Notifications
You must be signed in to change notification settings - Fork 75
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
Pages Editor: add rules to "Add Task to Page" functionality #7079
Conversation
f3db498
to
22dcb15
Compare
f51c4e3
to
571f1af
Compare
Looking good! I'm able to follow all of the testing steps above at the preview link: https://pr-7079.pfe-preview.zooniverse.org/lab/1982/workflows/editor/3711?env=staging (note that your Testing Steps section links to an older PR's staging, but I figured it out!) A couple of questions for clarification:
|
Revisiting my comment above because we talked through the reasoning behind "each single answer question gets its own page" during the weekly call. It was initially implemented this way to accommodate the fact that Single Answer Question tasks can branch, but Multiple Answer Question tasks cannot. @shaunanoordin do you plan to update this PR with different rules for adding question tasks to their own page, or should I go ahead with review as is? |
@goplayoutside3 Thanks Delilah! 👍 re: "each single answer question gets its own page", your assessment is on point. 👌 re: "should a Page's/Answer's Next Page be able loop back to itself?" (i.e. can T0 go to T0?) That's a good question. Currently, the PFE/FEM Lab Project Builder does allow a Task T0 to set its next task as Task T0. This is true whether it's a branching/single-type Task or a non-branching Task. Does it make sense? Not really. I'll add this to the list of questions to ask, but once we get confirmation, implementing a "you can't loop back in on yourself" rule is fairly trivial. Caveat: while a one-step loop of T0->T0 doesn't make sense, there is a case for a two-or-more-steps loop of T0->T1->T0. e.g. Next Steps:
|
…ask with additions)
571f1af
to
de56b91
Compare
Sorry, just a question out of curiosity but does this stop you from building transcription workflows, which combine a drawing task and a yes/no question into a single step? |
Transcription Tasks are whole different kettle of fish: they fall into something called "Pre-defined Pages" which is something we're planning for phase 2. |
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.
Thanks for the follow up Shaun - LGTM!
PR Overview
Part of: Pages Editor MVP project and FEM Lab super-project
Follows #7075
Staging branch URL: https://pr-7079.pfe-preview.zooniverse.org/lab/1982/workflows/editor/3711?env=staging
This PR adds special rules for the "Add Task to Page" functionality. (See #7065)
The overall rule is this: a Step can only have 1 branching task (single answer question task)
(New behaviour) The specific sub-rules are:
if a Step has a branching task, it can't have any other tasks.
Screenshot: The "Add New Task to Page" button is disabled when (and only when) there's a branching ('Single'-type) Task.
if a Step already has at least one task, any added Question task must be a Multiple Answer Question Task.
Screenshot: no visible changes, but clicking 'Question' will add a 'Multiple'-type Task, instead of a 'Single'-type Task
if a Step already has many tasks, any Multiple Answer Question Task can't be transformed into a Single Answer Question Task.
Screenshot: 'Allow multiple' checkboxes are disabled for all Question tasks on pages with > 1 tasks.
Other changes in this PR:
Old vs New:
FAQ
Q: how do I visually tell the difference between a Single Answer Question Task (aka "Single"-type Task) and a Multiple Answer Question Task (aka "Multiple"-type Task) on the Pages Editor?
A: check whether the "Allow Multiple" checkbox is ticked. Also, "Single"-type Tasks allows you to choose the next page for each answer, not for the whole page.
"Single"-type Task:
"Multiple"-type Task:
Testing Steps
It's also worth running some quick basic tests to make sure the refactor works as expected:
Status
Ready for review. 👌
EDIT: ready to review from a functional standpoint Improvements I could/should add to this PR: