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

deprecate _show_tools partial #3039

Merged
merged 2 commits into from Mar 20, 2023
Merged

Conversation

barmintor
Copy link
Contributor

@barmintor barmintor commented Mar 19, 2023

Deprecate the _show_tools partial in favor of a configurable component
fixes #3038

This PR also restores the helper method for inspecting whether a partial was overridden to minimize log noise when a Blacklight app is using default behaviors

@@ -181,6 +181,9 @@ def initialized_default_configuration?
# document presenter class used by helpers and views
document_presenter_class: nil,
document_component: Blacklight::DocumentComponent,
# in Blacklight 9, the default show_tools_component configuration will
# be Blacklight::Document::ShowToolsComponent
show_tools_component: nil,
Copy link
Member

@jcoyne jcoyne Mar 20, 2023

Choose a reason for hiding this comment

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

Can we set this as the default right now? I don't like how this forces people to set a component that would otherwise be the default. On the other hand, I can't think of a more backward-compatible mechanism for handling this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we set it now, we have to do a partial lookup first to see if an install has overridden the partial and render it rather than the component, instead of only looking it up if there's no configured component. I used nil here to avoid that overhead for installs that notice this and fix it without breaking the API. I don't think that's an perfect solution, but that's why I took that approach.

@barmintor barmintor merged commit d5c3822 into main Mar 20, 2023
12 checks passed
@barmintor barmintor deleted the issue-3038_deprecate-show_tools-partial branch March 20, 2023 16:43
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.

The _show_tools.html.erb partial should be deprecated in favor of a configurable show tools component
2 participants