zooniverse / panoptes

Zooniverse API to support user defined volunteer research projects
Apache License 2.0
103 stars 41 forks source link

Add preview images to subject sets #3451

Closed eatyourgreens closed 2 years ago

eatyourgreens commented 4 years ago

For Engaging Crowds, we'd like to show a preview image for each subject set (similar to the project cards that are used to list projects.) Ouroboros used to serialise the locations of 5 preview subjects with each subject set/group. Would it be possible to serialise the first 5 subject locations from a subject set, with the set? Or maybe set up a cards route similar to the cards route for projects?

camallen commented 4 years ago

Do you want this to be a curated set of image locations or just randomly selected? We've got the metadata object on subject_sets https://github.com/zooniverse/panoptes/blob/679bd8df1379e18ac2a220aab50fe24a41132894/app/serializers/subject_set_serializer.rb#L6-L7 that could be used to store this information.

Alternatively we could look to do something more formal with the resource links like you mention, a subject_sets.cards relation.

eatyourgreens commented 4 years ago

I was thinking the first few subjects, in order. If this is being used mainly to preview volumes for transcription workflows, then that would give us the title pages as a preview.

eatyourgreens commented 4 years ago

For the time being, I think I’m going to make a second request for the first subject of each set, unless there’s a faster way to get the linked subject?

eatyourgreens commented 3 years ago

Currently I'm using set_member_subjects to get the preview image for each set, which is turning out to be pretty fast anyway. https://github.com/zooniverse/front-end-monorepo/blob/892120c64c016edc2f6b11aa88eabef44055e9e1/packages/app-project/src/screens/ProjectHomePage/components/Hero/helpers/fetchWorkflowsHelper/fetchWorkflowsHelper.js#L29-L38

camallen commented 2 years ago

closing this in favour of the approach outlined in https://github.com/zooniverse/panoptes/issues/3451#issuecomment-731318542