Skip to content

Upgrade to Blacklight 8 #6316

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

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from
Open

Upgrade to Blacklight 8 #6316

wants to merge 12 commits into from

Conversation

masaball
Copy link
Contributor

Related issue: #5056

@masaball
Copy link
Contributor Author

masaball commented May 20, 2025

Since we build/populate the Media Objects page from IIIF rather than Blacklight results, should we remove the section from catalog_controller.rb that sets show fields? (config.add_show_field ...)

Copy link
Contributor Author

@masaball masaball May 21, 2025

Choose a reason for hiding this comment

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

This component is for the publish/unpublish actions on the bookmarks page. They do not require generating a modal or other confirmation so we add method: post to the link creation so the action is automatically performed when the button is clicked.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This component copies the regular DocumentComponent in order to rearrange how entries display information on the index page. The biggest difference is that the thumbnail is the last thing in the default blacklight 8, whereas we have the thumbnail included as the second item.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This adds our expected styling classes to the media object title field on the index page. It is possible that this is logic that could be passed in from the config or by overriding the partial that renders the component, but this seemed like the easier/more obvious approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This partial adds the found in: fields to the metadata display

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In order to have the found in: information available to the partial, we need to make sure that the SolrDocument is passed through to the partial. This also adds our specific styling classes to the initialization of the component.

Copy link
Contributor Author

@masaball masaball May 21, 2025

Choose a reason for hiding this comment

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

This component adds our placeholder image if a thumbnail is not found.

<%= render Blacklight::Document::ActionsComponent.new(document: nil,
tag: 'div',
classes: "#{controller_name}Tools",
link_classes: 'btn btn-outline',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This partial override is specifically to change the classes passed into the initialization of the actions component to match prior Avalon behavior/rendering.

@joncameron joncameron self-requested a review May 21, 2025 19:01
joncameron
joncameron previously approved these changes May 21, 2025
Copy link
Contributor

@joncameron joncameron left a comment

Choose a reason for hiding this comment

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

👍

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.

2 participants