drupal/iiif_media_source

Layout Paragraphs

0.0.2-alpha1 2024-10-28 07:56 UTC

This package is auto-updated.

Last update: 2024-11-28 12:45:20 UTC


README

todo: write description implementing the Image API 3.0

Crop (Not Crop API entity): Primarily used for redefining the source image. Focal Point: Used primarily for "Art Direction" when automatically sizing images so we don't loose focus

Table of contents

  • Requirements
  • Recommended modules
  • Installation
  • Configuration
  • Troubleshooting
  • FAQ
  • Maintainers
  • Changelog

Requirements

todo: add reqs.

Installation

Install as you would normally install a contributed Drupal module.

Configuration

todo: write configuration.

Troubleshooting

todo:

FAQ

Q: What kind of questions are being asked?

A: i dunno...

Maintainers

Changelog

TODOs

Field:

  • [x] Field - should just be a copy of a text field
    • [x] Field has settings for server/prefix
    • [ ] (LC) re-work Drupal\iiif_media_source\Plugin\Field\FieldType\IiifId:getImg() so it doesn't require the values param.
    • [ ] Could add in some validation? but not sure what that would be... https://iiif.io/api/image/3.0/#2-uri-syntax
    • [x] (LC) getLocalThumbnailUri() still has hardcoded URLs.
  • [x] Default Widget should just be plain text, i think.
  • [x] Default Formatter should just display ID.
    • [ ] (LC) need to verify and have fallbacks for each section.
  • [x] Secondary (basic image) Widget includes image thumbnail.
  • [x] Secondary (basic image) Formatter, should implement and validate all the uri options.
    • [ ] (LC) Add in loading attribute (lazy, eager) to basic formatter.
  • [ ] (LC) Do we need the base Iiif class?
    • [ ] If so, needs to be a service?
    • [ ] Inject it into the field class?

Image Styles / Responsive Images

  • [x] Image Style entity
  • [x] Responsive Image style entity
  • [x] IIIF Image style formatter
  • [x] IIIF Responsive Image style formatter
  • [x] We're going to need plugins... Imagestyle with plugins for the transformers.
  • [x] Add in some default IIIF Image Styles
  • [ ] Admin library w/ CSS.
  • [ ] (LC) Add in preview on Image Styles.
  • [ ] (LC) Document plugin so others can create plugins.
  • [ ] (LC) Documentation and helper text for forms.
  • [ ] (LC) Fix errors when using "original image" for responsive images

Media Source

  • [ ] Source just provides data for fields, if wanted on the media item.
  • [ ] (LC) Provides:
    • [ ] version
    • [ ] width
    • [ ] height
    • [ ] sizes
    • [ ] tiles???
    • [ ] formats
    • [ ] qualities
    • [ ] maxArea
    • [ ] maxHeight
    • [ ] maxWidth
    • [ ] supports

Submodule: Image Handling

  • [x] Class to handle form elements for adding to widgets.
    • [x] Need logic for 1 or other handlers.
  • [ ] Class to handle form elements for own widgets.
  • [ ] Need a common (CSS) library.

Submodule: Focalpoint

  • [x] Add in widget to define a focal point of the image.
  • [x] Third party settings or something so we can combine everything into 1 form element.
  • [x] Add third party settings for thumbnail size
  • [ ] Allow for Contextual Media field
  • [ ] Make sure settings are correct for Widget and 3rd party settings. (Add Test)

Submodule: Crop

  • [x] Add in widget to define a crop for the image.
  • [x] Third party settings or something so we can combine everything into 1 form element.
  • [x] Add third party settings for thumbnail size
  • [x] "Drupalize" js file.
  • [x] Need JS solution to hide field (copy from FP)
  • [ ] Settings Page to variabalize settings for the cropper.js plugin.
  • [ ] Allow for Contextual Media field
  • [ ] Make sure settings are correct for Widget and 3rd party settings. (Add Test)

General:

  • [ ] (LC) Check and confirm Config inspector
  • [ ] Process js/css files

Tests:

  • Prep
    • (LC) Need IIIF sources to test against.
  • Unit Tests
    • [ ] (LC) Need to test and finish Dimension in IiifImageUrlParams
  • Functional Tests
    • [ ]
  • Browser Tests
    • [ ] (LC) Check each image style effect and combination. We should be able to set it and check the end of any image url string.
    • [ ] Check responsive images
    • [ ] Check "fallbacks" for responsive images
    • [ ] (LC) lazy and eager loading attr
      • [ ] Default IIIF Image Formatter
      • [ ] Crop Image Formatter
      • [ ] Focal Point Image formatter