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

Setup for multi frame subjects #1345

Merged
merged 14 commits into from
Dec 5, 2019
Merged

Conversation

simensta
Copy link
Contributor

@simensta simensta commented Dec 2, 2019

Please request review from @zooniverse/frontend team. If PR is related to design, please request review from @beckyrother in addition.

Package: lib-classifier

Closes #1344

Describe your changes:
This PR sets up the folders, files, and logic for rendering the multiFrame subject viewer. For this PR, the MultiFrameViewer component itself is a simple placeholder.

The multiFrame viewer will render if:

  • there is a workflow configuration of { subject_viewer: 'multiFrame' } or the subject has between 2 and 10 frames
  • the workflow is not configured to display all frames at once

Review Checklist

General

  • Are the tests passing locally and on Travis?
  • Is the documentation up to date?

Components

Apps

  • Does it work in all major browsers: Firefox, Chrome, Edge, Safari?
  • Does it work on mobile?
  • Can you yarn panic && yarn bootstrap or docker-compose up --build and app works as expected?

Publishing

  • Is the changelog updated?
  • Are the dependencies updated for apps and libraries that are using the newly published library?

Post-merging

- Subject#getViewer() assigns the multiFrame subject viewer to subjects with between 2 and 10 frames.

- The SubjectFactory defaults to creating a subject with 11 frames to test for a default viewer of null when none of the viewer conditions are met.
@simensta simensta changed the title [WIP] Setup for multi frame subjects Setup for multi frame subjects Dec 3, 2019
@simensta simensta requested a review from mcbouslog December 3, 2019 20:27
Copy link
Contributor

@mcbouslog mcbouslog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

expect(subjectStore.viewer).to.be.null()
})

it('should return the multiFrame viewer if the workflow configuration for subject_viewer is defined as multiFrame', function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to test that regardless of the subject, including type or number of locations, if the workflow config is set to use multi frame viewer then the subject uses the multi frame viewer? Nice!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, however, I am realizing there is an assumption that { subject_viewer: 'multiFrame' } can only be enabled for subjects with between 2 and 10 frames.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will need to revisit this logic when creating a workflow config option in the lab editor. Thank you for the question!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@beckyrother is working on some preliminary ideas for the workflow lab editor page with these new configurations.

@simensta simensta merged commit 54b9c2f into master Dec 5, 2019
@simensta simensta deleted the setup-for-multi-frame-subjects branch December 5, 2019 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Configuring the display of a multiFrame subject viewer
3 participants