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

As a content editor I want to select images in the related fragment view in order to determine which images belong with the document. #982

Closed
4 tasks done
richmanrachel opened this issue Jul 26, 2022 · 3 comments
Assignees

Comments

@richmanrachel
Copy link

richmanrachel commented Jul 26, 2022

testing notes (qa)

  • In the admin interface for a document on a fragment with attached images, confirm you can click the side(s) to determine which images actually belong with the document
  • Save and confirm the image selection is persisted
  • If the side is recto, verso, or recto and verso (i.e. selected image is first, second, or first and second) confirm that the "side" column in the related fragments section of the document admin correctly states this
  • For a fragment with more than 2 images, confirm you can select images other than just the first two

Is your feature request related to a problem? Please describe.
To improve on the work in #955, we would like to click on fragment images rather than rely on the "Side" drop down in order to handle more complicated documents.

Describe the solution you'd like
Click on the related fragment thumbnails to curate the correct IIIF images to view on the front end for each document.

@rlskoeser
Copy link
Contributor

@blms how does this approach sound:

  • we add a new field to TextBlock for selected image indexes (either array field or comma-separated text field, whichever is easier to manipulate with js)
  • add the new image index field to textblock inline edit as a hidden field
  • side (recto/verso) is a shortcut to set image index to 0, 1, or 0,1 (on model save I think? but probably also needs to interact with js); suggest adding a mapping to the model that defines this and passes it through to the page if needed for js to use
  • add javascript to make the images selectable; clicking on images toggles whether they are selected and updates the list in the hidden image index field

@blms
Copy link
Contributor

blms commented Jul 27, 2022

@rlskoeser That sounds good to me! I'm wondering about the side as shortcut—what should the side display when the selected images are 2, 3, etc? During our conversation I was actually thinking we'd just do a data migration to get rid of the "side" field and replace it with the selected images indices, but maybe that's important metadata to keep.

Edit from meeting: decided to replace side field with a computed property based on indices.

blms added a commit that referenced this issue Jul 27, 2022
blms added a commit that referenced this issue Aug 2, 2022
@blms blms added the 🗜️ awaiting testing Implemented and ready to be tested label Aug 3, 2022
@richmanrachel richmanrachel removed the 🗜️ awaiting testing Implemented and ready to be tested label Aug 3, 2022
@richmanrachel
Copy link
Author

Love it! Great first step towards getting the full functionality we need :D

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

No branches or pull requests

3 participants