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

Prime hyrax 5 upgrade refactor for pals #2115

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

jeremyf
Copy link
Contributor

@jeremyf jeremyf commented Dec 22, 2023

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 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.

@jeremyf jeremyf added the patch-ver for release notes label Dec 22, 2023
@jeremyf jeremyf force-pushed the prime-hyrax-5-upgrade-refactor-for-pals branch from 6261004 to df49b98 Compare December 22, 2023 17:04
# @!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" }
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

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've been moving too quickly between two branches. I committed changes to reflect the correct state.

@jeremyf jeremyf marked this pull request as draft December 22, 2023 17:13
config/application.rb Outdated Show resolved Hide resolved
config/application.rb Outdated Show resolved Hide resolved
@jeremyf jeremyf marked this pull request as ready for review December 22, 2023 17:18
# 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:) }
Copy link
Collaborator

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

Copy link
Collaborator

@kirkkwang kirkkwang left a 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
@jeremyf jeremyf force-pushed the prime-hyrax-5-upgrade-refactor-for-pals branch from f72c7e9 to 87df9b0 Compare December 22, 2023 17:37
@jeremyf
Copy link
Contributor Author

jeremyf commented Dec 22, 2023

Confirming that the failure also happens locally

@jeremyf jeremyf merged commit 5e58fd9 into hyrax-5-upgrade Dec 22, 2023
2 of 3 checks passed
@jeremyf jeremyf deleted the prime-hyrax-5-upgrade-refactor-for-pals branch December 22, 2023 18:01
@kirkkwang kirkkwang mentioned this pull request Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants