-
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: Basic Styling & Simple Workflow Settings Page #6822
Conversation
Note to self: I think form.onSubmit and input.onBlur can both trigger |
PR UpdateOK, this is now ready! I've got the basic styles done, and project owners can adjust a few Workflow settings... which ain't much at this stage.
Accessibility:
Testing NotesStaging Example: https://pr-6822.pfe-preview.zooniverse.org/lab/1982/workflows/editor/3711?env=staging As a project owner,
StatusReady for review! |
2df7dd7
to
431b947
Compare
aria-label="Subject viewer" | ||
className="flex-item" | ||
data-updaterule="undefined_if_empty" | ||
defaultValue={workflow?.configuration?.subject_viewer || ''} |
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 default to the viewer that's automatically set for you, but that requires a bunch of code that's buried in @zooniverse/classifier
in the monorepo.
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.
Looks good to me. The tabs will need to be marked up as tabs at some point.
<div className="flex-row flex-item justify-around"> | ||
<button className="unselected" type="button" onClick={onClick}> | ||
{strings.PagesEditor.components.WorkflowHeader.tasks} | ||
</button> | ||
<button className="selected" type="button" onClick={onClick}> | ||
{strings.PagesEditor.components.WorkflowHeader.workflow_settings} | ||
</button> | ||
</div> |
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.
These are styled visually as tabs but aren't marked up to use the Tabs pattern.
/* eslint-disable no-console */ | ||
/* eslint-disable react/react-in-jsx-scope */ | ||
/* eslint-disable react/require-default-props */ | ||
/* eslint-disable radix */ |
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.
I think these can be added to .eslintrc
.
431b947
to
bc5ca19
Compare
PR Overview
Part of: Pages Editor MVP project and FEM Lab super-project
Follows #6795
Staging Example: https://pr-6822.pfe-preview.zooniverse.org/lab/1982/workflows/editor/3711?env=staging
Sean's designs: on Figma
The original intent of this PR is to add some basic styling and the Workflow Settings Page, but I had to scale back some ambition as even this stage had a lot going on.
Styling:
Components:
<form>
standardsOther:
Minor stuff:
🍐 indicates code that sits outside the
🅰️ indicate components that should have accessibility checks/reviews. Please flag any issues noted.
/lab-pages-editor
folder.Dev Notes
My initial idea of "just create the Workflow Config Page, it'll be easy!" has run arse-first into the reality that adding Subject Sets to Workflows can be a bit complex. (see Subject Set Linker) Probably linking Tutorials too.
Anyway,
project
it's editing, which means that variable either needs to be passed down from the parent (is there a parent?) or the DataManager needs a fetchProject() function and share that on the context. HMMM.Status
WIP