-
Notifications
You must be signed in to change notification settings - Fork 65
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
refactoring navbar as component with slot for prepend component #3171
Conversation
<% end %> | ||
</div> | ||
</div> | ||
<%= render (blacklight_config&.view_config(document_index_view_type)&.exhibit_navbar_component || Spotlight::ExhibitNavbarComponent).new %> |
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 think this should probably be defined in the controller somewhere. i.e. in the catalogcontroller you should define
config.index.exhibit_navbar_component = Spotlight::ExhibitNavbarComponent
I would also update the deprecation warning to point to the catalog controller where it is set.
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 think I've addresses both comments @dnoneill
</div> | ||
</div> | ||
<%= render (blacklight_config&.view_config(document_index_view_type)&.exhibit_navbar_component || Spotlight::ExhibitNavbarComponent).new %> | ||
<% Spotlight.deprecator.warn("_exhibit_navbar.html.erb will be deprecated in future versions. Please use the catalog controller's exhibit_navbar_component setting.") %> |
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.
<% Spotlight.deprecator.warn("_exhibit_navbar.html.erb will be deprecated in future versions. Please use the catalog controller's exhibit_navbar_component setting.") %> | |
<% Spotlight.deprecator.warn("_exhibit_navbar.html.erb will be removed; customize the exhibit navbar using components instead") %> |
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.
Sorry when I meant update the comment I mean to link or point in some way to https://github.com/projectblacklight/spotlight/pull/3171/files#diff-6052daee924920472438cf797a49bcfdafd3787945da870c8b24e9dac6bf27e4R19
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.
@corylown I used a period instead of a semi-colon but otherwise it is the same :)
@@ -16,6 +16,7 @@ class CatalogController < ApplicationController | |||
# Blacklight 8 sets a default value to 'advanced' | |||
config.json_solr_path = nil | |||
config.header_component = Spotlight::HeaderComponent | |||
config.exhibit_navbar_component = Spotlight::ExhibitNavbarComponent |
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.
Think this is config.index?
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.
yes! thanks.
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 guess the question is, does it make sense to configure a different navbar depending on whether you're in the index or show view, or should this be configurable at the app level like the header component?
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 don't think it matters, but either this or this https://github.com/projectblacklight/spotlight/pull/3171/files#diff-de18dc9392ca38402d097f5d638e554a17c8b0ba6b2e341fe46ca6188e05cf1cR9 line need to be updated to be inline with each other.
Closes #3167 .
What this pull request does: