-
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: implement Branching Controls #6991
Conversation
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.
Overall LGTM. Small suggestions that are inline with other PR's.
<StepItem | ||
key={`stepItem-${step[0]}`} |
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.
camelCase vs kebab-case
const task = allTasks[taskKey]; | ||
return ( | ||
<EditTaskForm | ||
key={`editTaskForm-${taskKey}`} |
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.
camelCase vs kebab
const answers = task.answers || [] | ||
|
||
function onChange(e) { | ||
const next = e.target?.value; |
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.
should be e?.
or e.
between this line and the below line.
); | ||
} | ||
|
||
function NextStepArrow({ |
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.
This should probably be pulled out as an Icon / it's own file so it's usable in other parts of the codebase (if needed)
PR looks good to me and doesn't create any weird error states. The video below shows the behavior of having empty values for answer/choices and then editing those answer/choices after you've set some branching conditions. Not sure if this is the desired behavior to delete/destroy the branching conditions upon changing answer/choices. Also, your PR Overview has an unfinished sentence: "The visual UI doesn't fully match Sean's design (notably, the yellow arrows aren't going beyond the Step body's container) but that's" (and ends with that... What were you trying to say? pr-review-6991.mov |
b168974
to
faede1e
Compare
Thanks Travis!
Holy crap, did I leave that sentence hanging?? I meant to say "visual UI doesn't fully match Sean's design, but that's something I'll take care of in a future PR. " Sorry, I should have re-read my PR overview before I posted. Now on to the TODO List:
I'll append a few of those updates to this PR, then start on pt14 to address the rest of the feedback. |
OK I'm finally ready to merge this. I've incorporated a lot of the feedback taken from 6981 and 6973. (Thanks Jim, Mark, and Travis!) PR Update
Investigated, but no action taken (other than making a note that this behaviour should be documented):
StatusMerging, go! Next for Pages Editor: either Deleting Tasks (easy?) or linking Subject Sets & Tutorials to Workflows. |
PR Overview
Part of: Pages Editor MVP project and FEM Lab super-project
Follows #6981
Staging branch URL: https://pr-6991.pfe-preview.zooniverse.org/lab/1982/workflows/editor/3711?env=staging
This PR adds the ability to choose the next Page, for Steps with branching Tasks.
Other changes:
Status
Ready for review!
Do not merge until 6981 is merged. Currently targets pages-editor-pt12 for reviewing purposes; this will be re-targeted to master when ready.