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

Enable selection of image area for non-embed item widgets (other than uploaded item) #3350

Merged
merged 25 commits into from
Dec 20, 2024

Conversation

hudajkhan
Copy link
Contributor

@hudajkhan hudajkhan commented Dec 12, 2024

Closes #3186

What this pull request does:

  • Sets up an image selection link for resources, with a flag indicating if a specific resource type (e.g. embed or uploaded item) should or should not display (this version of) the image selection link. The link passes along the id of the block item as well as the index of the item (e.g. the block item corresponds to the first item row widget on the page, whereas the index corresponds to the specific item that has been selected from autocomplete)
  • Sets up a modal that opens on clicking the image selection link.
  • Updates the crop module and some of the other pages that also use the crop module to enable a consistent mechanism for identifying the IIIF fields needed for the cropping functions. Also allows for not preserving the aspect ratio of the original crop box for the item widgets (while preserving that functionality for masthead/thumbnail cropping)
  • Sets up listeners for opening and saving the modal that are able to transfer information properly for the IIIF fields between the modal and the widget form.

How to test:

  • Click edit on the home page.
  • Add an item row (or item grid or item carousel or item slideshow) widget.
  • Select an item from the autocomplete
  • Click "select image area" under the item
  • Select an area in the cropping tool
  • Click "save changes" on the modal

The thumbnail should change to reflect the cropping selection.

  • Click save changes on the form.

The home page should now show the image from the added item where the image should display according to the cropped selection.

@hudajkhan hudajkhan marked this pull request as ready for review December 14, 2024 01:02
@hudajkhan hudajkhan changed the title Selectimage Enable selection of image area for non-embed item widgets (other than uploaded item) Dec 14, 2024
@taylor-steve taylor-steve merged commit e52cea0 into main Dec 20, 2024
5 checks passed
@taylor-steve taylor-steve deleted the selectimage branch December 20, 2024 19:05
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.

Enable image area selection for non-Embed widgets
3 participants