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

Explicitly set margin classes #3196

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/assets/stylesheets/blacklight/_constraints.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.constraints-container {
@extend .mb-2;
display: flex;
flex-wrap: wrap;
gap: 0.5rem 0.25rem;
Expand Down
4 changes: 0 additions & 4 deletions app/assets/stylesheets/blacklight/_search_history.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@
padding: $spacer;
}

.constraints-container {
@extend .mb-0;
}

.constraint {
@extend .px-4;
display: block;
Expand Down
2 changes: 1 addition & 1 deletion app/components/blacklight/constraints_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def self.for_search_history(**kwargs)
def initialize(search_state:,
tag: :div,
render_headers: true,
id: 'appliedParams', classes: 'clearfix constraints-container',
id: 'appliedParams', classes: 'clearfix constraints-container mb-2',
query_constraint_component: Blacklight::ConstraintLayoutComponent,
query_constraint_component_options: {},
facet_constraint_component: Blacklight::ConstraintComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div id="appliedParams" class="clearfix constraints-container">
<div id="appliedParams" class="clearfix constraints-container mb-2">
<%= render 'start_over' %>
<%= link_back_to_catalog class: 'btn btn-outline-secondary' %>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

module Blacklight
module SearchContext
# This is displayed on the show page when the user has a search session.
class ServerAppliedParamsComponent < Blacklight::Component
delegate :current_search_session, :link_back_to_catalog, to: :helpers

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/blacklight/url_helper_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,6 @@ def link_back_to_catalog(opts = { label: nil })
# Use in e.g. the search history display, where we want something more like text instead of the normal constraints
def link_to_previous_search(params)
search_state = controller.search_state_class.new(params, blacklight_config, self)
link_to(render(Blacklight::ConstraintsComponent.for_search_history(search_state: search_state)), search_action_path(params))
link_to(render(Blacklight::ConstraintsComponent.for_search_history(search_state: search_state, classes: 'clearfix constraints-container mb-0')), search_action_path(params))
end
end
Loading