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

Add image selection for item embed viewers #2845

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

taylor-steve
Copy link
Contributor

Closes #2604.

Continuation & partial refactor of the work done in #2752.
Still needs sul-dlss/sul-embed#2279 to work (additional changes to come).

This can be run locally. For example if sul-embed is running at localhost:3001:

# config/initializers/oembed.rb
purl_provider = OEmbed::Provider.new('http://localhost:3001/embed.json?&hide_title=true')

projectblacklight/spotlight#3431 causes a problem when there are multiple copies of the same item in a single embed block. In that case, the panels have duplicate IDs and the first panel will always get the image selection update regardless of which panel the area selection was initiated from. Will need to fix that first.

Changes from #2752:

  • Isolates widget modification & viewer state sync to their own classes
  • Removes the mutation observer in favor of specific events
  • Reduces the scope of the SirTrevor overrides
  • Removes the wildcard origin in postMessage
  • Syncs the state between the existing Spotlight "multi-image selector" page selection and the viewer

@taylor-steve taylor-steve force-pushed the sct-sul-embed-img-area branch from 2543d03 to 2ef13f0 Compare February 7, 2025 22:34
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 Item Embed - Mirador
2 participants