Skip to content

Commit e9e7eff

Browse files
authored
Merge pull request #3196 from projectblacklight/contraint-margin
Explicitly set margin classes
2 parents f1e9b68 + 64c991d commit e9e7eff

File tree

6 files changed

+4
-8
lines changed

6 files changed

+4
-8
lines changed

app/assets/stylesheets/blacklight/_constraints.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.constraints-container {
2-
@extend .mb-2;
32
display: flex;
43
flex-wrap: wrap;
54
gap: 0.5rem 0.25rem;

app/assets/stylesheets/blacklight/_search_history.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
padding: $spacer;
77
}
88

9-
.constraints-container {
10-
@extend .mb-0;
11-
}
12-
139
.constraint {
1410
padding-inline-end: $spacer;
1511
display: block;

app/components/blacklight/constraints_component.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def self.for_search_history(**kwargs)
2020
def initialize(search_state:,
2121
tag: :div,
2222
render_headers: true,
23-
id: 'appliedParams', classes: 'clearfix constraints-container',
23+
id: 'appliedParams', classes: 'clearfix constraints-container mb-2',
2424
query_constraint_component: Blacklight::ConstraintLayoutComponent,
2525
query_constraint_component_options: {},
2626
facet_constraint_component: Blacklight::ConstraintComponent,
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div id="appliedParams" class="clearfix constraints-container">
1+
<div id="appliedParams" class="clearfix constraints-container mb-2">
22
<%= render 'start_over' %>
33
<%= link_back_to_catalog class: 'btn btn-outline-secondary' %>
44
</div>

app/components/blacklight/search_context/server_applied_params_component.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

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

app/helpers/blacklight/url_helper_behavior.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@ def link_back_to_catalog(opts = { label: nil })
114114
# Use in e.g. the search history display, where we want something more like text instead of the normal constraints
115115
def link_to_previous_search(params)
116116
search_state = controller.search_state_class.new(params, blacklight_config, self)
117-
link_to(render(Blacklight::ConstraintsComponent.for_search_history(search_state: search_state)), search_action_path(params))
117+
link_to(render(Blacklight::ConstraintsComponent.for_search_history(search_state: search_state, classes: 'clearfix constraints-container mb-0')), search_action_path(params))
118118
end
119119
end

0 commit comments

Comments
 (0)