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

Core mirador behaviors to provide a plugin target for text resources #4086

Merged
merged 1 commit into from
Feb 11, 2025

Conversation

barmintor
Copy link
Contributor

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.07%. Comparing base (e9f2bde) to head (cf770ed).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4086      +/-   ##
==========================================
+ Coverage   95.05%   95.07%   +0.02%     
==========================================
  Files         315      317       +2     
  Lines       15905    15973      +68     
  Branches     2494     2509      +15     
==========================================
+ Hits        15119    15187      +68     
  Misses        782      782              
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@barmintor barmintor marked this pull request as ready for review February 3, 2025 17:11
'level2',
'level1',
'level0',
'http://iiif.io/api/image/2/level2.json',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's an even older set of image profile urls, e.g.:

http://library.stanford.edu/iiif/image-api/compliance.html#level1

/** values for type/@type that indicate a video content resource */
const videoTypes = ['Video', 'MovingImage', 'dctypes:Video', 'dctypes:MovingImage'];

export default {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure how painful it'd be, but I wonder if we can push these into the config ( + redux store) so downstream applications can extend these lists? We've done something similar with thumbnails.preferredFormats, auth.serviceProfiles, and annotations.filteredMotivations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it would be that bad, with the usual caveat of "naming is hard"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I did this but it's a significant change - you need access to Mirador config everywhere you create a MiradorCanvas - so I put it in a separate branch. Do we want this in the PR? cul@d6e9db8

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, ew. Having to pass it around to make it available for ThumbnailFactory (especially) seems pretty bad. Maybe that has to wait until we get around to doing something about Manifesto and can inject that configuration early?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another option might be to push ThumbnailFactory into the redux store behind a memoized selector?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I should add that some of this is also background for Auth2, where you can't assume that image services are the only associated services)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

☝️ that commit takes the selector approach. I'm not sure it saves a lot of code, but it has a more appealing separation of concerns?

- stub TextViewer shows empty div, source elements for text resources, and canvas navigation
- fixes ProjectMirador#4085
@barmintor
Copy link
Contributor Author

@cbeer noting that it is separately desirable to have a TextViewer target component and to have configurable canvas types and service profiles, I'm pushing a branch here that only does the former.

@cbeer
Copy link
Collaborator

cbeer commented Feb 11, 2025

👍 Handling those two concerns separately makes sense to me.

@cbeer cbeer merged commit 5f72533 into ProjectMirador:main Feb 11, 2025
9 checks passed
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.

There is no component target for a plugin targeting paintable resources of type 'Text'
2 participants