UX: Styling adjustments for filters page (#20768)
Change styling of filter input & remove button. This follows the same pattern of design we use for search. In the search dropdown we do not have a button to search. We rely on pressing enter. I've also provided an example of Github's PR filter UI at the bottom of this comment. We also do not have buttons like this on any other topic-list header. On tag and category dropdowns, we also rely on pressing enter to filter the topic list by chosen categories & tags. Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
This commit is contained in:
parent
41ed4cac91
commit
4cb79ce8be
|
@ -1,17 +1,14 @@
|
|||
{{#if this.isQueryFilterMode}}
|
||||
<div class="topic-query-filter">
|
||||
<div class="topic-query-filter__input">
|
||||
{{d-icon "filter" class="topic-query-filter__icon"}}
|
||||
<Input
|
||||
class="topic-query-filter__input"
|
||||
class="topic-query-filter__filter-term"
|
||||
@value={{this.queryString}}
|
||||
@enter={{action @updateTopicsListQueryParams this.queryString}}
|
||||
@type="text"
|
||||
/>
|
||||
|
||||
<DButton
|
||||
@action={{action @updateTopicsListQueryParams this.queryString}}
|
||||
@icon="filter"
|
||||
@class="btn-primary topic-query-filter__button"
|
||||
@label="filters.filter.button.label"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
{{else}}
|
||||
<BreadCrumbs
|
||||
|
|
|
@ -3,8 +3,41 @@
|
|||
flex-direction: row;
|
||||
margin-right: auto;
|
||||
margin-bottom: var(--nav-space);
|
||||
min-width: 50%;
|
||||
|
||||
.topic-query-filter__input {
|
||||
&__label {
|
||||
background-color: var(--primary-low);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.25em 0.65em;
|
||||
border: 1px solid var(--primary-low-mid);
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
&__input {
|
||||
position: relative;
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
&__icon {
|
||||
position: absolute;
|
||||
left: 0.5em;
|
||||
top: 0.65em;
|
||||
color: var(--primary-low-mid);
|
||||
}
|
||||
|
||||
input.topic-query-filter__filter-term {
|
||||
margin: 0 0.5em 0 0;
|
||||
border-color: var(--primary-low-mid);
|
||||
padding-left: 1.75em;
|
||||
color: var(--primary);
|
||||
width: 100%;
|
||||
|
||||
&:focus {
|
||||
border-color: var(--tertiary);
|
||||
outline: none;
|
||||
outline-offset: 0;
|
||||
box-shadow: inset 0px 0px 0px 1px var(--tertiary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,12 +4,7 @@ module PageObjects
|
|||
module Components
|
||||
class TopicQueryFilter < PageObjects::Components::Base
|
||||
def fill_in(text)
|
||||
page.fill_in(class: "topic-query-filter__input", with: text)
|
||||
|
||||
page.click_button(
|
||||
I18n.t("js.filters.filter.button.label"),
|
||||
class: "topic-query-filter__button",
|
||||
)
|
||||
page.fill_in(class: "topic-query-filter__filter-term", with: "#{text}\n")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue