-
Notifications
You must be signed in to change notification settings - Fork 48
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
Prime hyrax 5 upgrade refactor for pals #2115
Prime hyrax 5 upgrade refactor for pals #2115
Conversation
6261004
to
df49b98
Compare
# @!attribute iiif_video_labels_and_mime_types [r|w] | ||
# @see Hyrax::IiifAv::DisplaysContentDecorator | ||
# @return [Hash<String,String>] Hash of valid video labels and their mime types. | ||
class_attribute :iiif_video_labels_and_mime_types, default: { "mp4" => "video/mpeg", "webm" => "audio/webm" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need Hyrax::IiifAv::DisplaysContent
in front of it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. It's a Hyku::Application
class attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been moving too quickly between two branches. I committed changes to reflect the correct state.
# Hyrax::Engine.routes.url_helpers.download_url(document, host:, protocol: 'https') | ||
# end | ||
class_attribute :iiif_video_url_builder, | ||
default: ->(document:, label:, host:) { Hyrax::IiifAv::Engine.routes.url_helpers.iiif_av_content_url(document.id, label:, host:) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a styling comment, this indent looks a little wonky
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool looks good!
Dear reviewer, put on your reading glasses. This commit looks at the newly refactored `Hyrax::IiifAv::DisplaysContentDecorator` as well as the current state of [PALS's Hyrax::IiifAv::DisplaysContentDecorator][1] and attempts to account for the variances between the two by introducing configurations. Yes, we could port this to the hyrax-iiif_av gem, but for now that would not solve the underlying issue of how we've been handling things. Why the Hyku::Application class attribute? Because the decorator is being mixed into a module, which does not response to `.class_attribute` methods. [1]: https://github.com/scientist-softserv/palni-palci/blob/8754556c0225ce9f04674c1ffac6403586fd65f4/app/presenters/concerns/hyrax/iiif_av/displays_content_decorator.rb
f72c7e9
to
87df9b0
Compare
Confirming that the failure also happens locally |
Dear reviewer, put on your reading glasses.
This commit looks at the newly refactored
Hyrax::IiifAv::DisplaysContentDecorator
as well as the current stateof PALS's Hyrax::IiifAv::DisplaysContentDecorator and attempts to
account for the variances between the two by introducing configurations.
Yes, we could port this to the hyrax-iiif_av gem, but for now that would
not solve the underlying issue of how we've been handling things.
Why the Hyku::Application class attribute? Because the decorator is
being mixed into a module, which does not response to
.class_attribute
methods.