RFC: Integrating project links into the Classifier component #2165
Replies: 6 comments 36 replies
-
Going home could be done by: |
Beta Was this translation helpful? Give feedback.
-
Another possible pain point is the 'Subject Selection Modal' link, which relates to #2166 You can open subject set selection by linking directly to a workflow eg. https://www.zooniverse.org/projects/msalmon/hms-nhs-the-nautical-health-service/classify/workflow/18109 You can also open it by setting state in the Classify page component (or the Project Home component.) Subject selection can similarly be triggered by URLs or by setting state within the project app. Ideally, the Classifier doesn't know anything about the page that it's embedded in, but here we've got a control for a feature of the project app. |
Beta Was this translation helpful? Give feedback.
-
Now that #2132 has merged, you can try out subject selection at https://fe-project.preview.zooniverse.org/projects/bogden/scarlets-and-blues/classify/workflow/17077 The Minutes workflow has subject sets that are indexed in Datasette. The classifier hasn't been updated to use indexed selection yet, so it will crash after you select a subject. |
Beta Was this translation helpful? Give feedback.
-
If we pass in the router as an external dependency, then accessible routing might look something like this (without having a direct dependency on /*
The router could also be injected into the store, like the API client is.
*/
const { router } = props
function onClick(event) {
if (!event.metaKey) {
event.preventDefault()
const { href } = event.target
router.push(href)
}
}
<a href="/some/url">Client-side link in the parent app</a> Marcy Sutton did a bunch of user-testing of accessible client-side routing, for Gatsby, in 2019. That's worth reading because any solution we adopt will have to work with assistive technology. Gatsby published details of their React implementation in February last year. |
Beta Was this translation helpful? Give feedback.
-
Having a decision about this soon would be beneficial to me as well. I'm getting closer to the point that I need to wire up #2143. There are two ways I'm thinking of doing this:
Users will always be able to cancel the prompt and have no routing or load of new workflow take place. |
Beta Was this translation helpful? Give feedback.
-
Ok, here's a summarization of where I think we are in this discussion Let me know if this is agreeable to everyone. Prompting a volunteer to work on something elseThe context is we have persistently had problems with volunteers continuing to work on workflows where classifications are no longer needed. We have an improved design of the banners that appear with subjects, however, there is still a need to more specifically prompt to do something else. Possible prompt triggersAll projectsThe project or workflow is entirely finished. Projects using ordered subject set selection (like Engaging Crowds)For humanities projects that follow the Engaging Crowds model subjects are ordered and can be loaded in the classifier regardless of retirement or already seen status. A subject can be loaded by way of a selection process provided in modal form on page load or by direct URL link. Workflow assignment (like Gravity Spy)There are projects who wish to assign workflows. Some wish to do it like Gravity Spy where user weighing is analyzed by previously submitted classification quality and access to more complex workflows are blocked by this analysis. Others may have some other determining mechanism. The assigned workflow is received by a workflow id set in the user project preferences. If a volunteer gets directly linked to a workflow they do not have permission to access yet, then this will prompt the workflow selection modal to open instead with a message saying it's not available to them yet. Proposed solutionsA variety of scenarios exist where different prompts should load:
All prompts should be cancelable to allow the project, workflow, and subject to continue to load for education, demonstration, and citation purposes. We might consider a future session demo and/or education mode for the classifier that toggles these various modals off for the session. General project applicationThis applies to all projects where the project or workflow may be finished. This check pauses the classifier from fully loading and waits for the volunteer selection on what to do? Ordered subject set applicationThere is a provided design for prompting when the subject is retired and already seen, but needs several modifications:
Workflow selection applicationCurrently the user project preferences is being loaded twice. Once by the project app and once by the classifier. This is unnecessary. We should refactor these so that it is only loaded by the project and a callback is passed by prop to the classifier to make updates to the UPP as needed for tracking seen states for tutorials and mini-courses. The workflow assignment modal prompt will move to the project app and handle routing. The triggering of this prompt is still TBD and we may implement web sockets or a polling mechanism. There is already a callback for the project app to keep track of classification counts for the session so if we use polling, this can be easily implemented. For websockets, we need to add this anyway at some point to wire up talk notifications for the header in the project app, so could leverage this if Sugar is updated for this functionality. |
Beta Was this translation helpful? Give feedback.
-
For Engaging Crowds, we want to block the task area when you load a subject that' you've already classified, or which has been retired. Instead of classifying the subject, you'll be given the option to return to the project home page, navigate to the next (or previous) subject, or choose a new subject to view (or classify.) See #2027 and the designs in the comments.
The classifier could import
next/link
, then write each of the links in that popup as something like:That would make the Classifier component implicitly part of the project app, so it couldn't really be published and used as a self-contained component.
The router could be passed to the Classifier as a prop, like the client is now. Routes could then be handled by the store but this still ties the Classifier component to the specific routing of the NextJS project app.
I'm looking for a way to embed that popup in the Classifier component, without explicitly adding the project app routes to the Classifier. I wondered if anyone has any suggestions?
Beta Was this translation helpful? Give feedback.
All reactions