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

[Code] adjust search bar suggestions style #32726

Merged
merged 1 commit into from
Mar 8, 2019
Merged
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
14 changes: 11 additions & 3 deletions x-pack/plugins/code/public/components/main/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@
}

.codeSearch__suggestion-item {
background: $euiColorLightestShade;
height: 3rem;
margin: 0 $euiSize;
border-radius: $euiSizeXS;
Expand All @@ -146,7 +145,7 @@
}
}

.codeSearch__suggestion--active {
.codeSearch__suggestion-item--active {
background: $euiColorLightShade;
}

Expand Down Expand Up @@ -188,15 +187,24 @@
overflow-x: hidden;
}

.codeSearch-suggestion__group {
border-top: $euiBorderThin;
}

.codeSearch-suggestion__group-header {
padding: $euiSizeL;
border-top: $euiBorderThin;
}
.codeSearch-suggestion__group-title {
font-weight: bold;
margin-left: $euiSizeS;
display: inline-block;
}

.codeSearch-suggestion__group-result {
color: $euiColorDarkShade;
font-size: $euiFontSizeXS;
}

.codeSearch-suggestion__link {
height: $euiSize;
line-height: $euiSize;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ exports[`render full suggestions component 1`] = `
className="kbnTypeahead__popover"
>
<div
className="kbnTypeahead__items"
className="kbnTypeahead__items codeSearch-suggestion__group"
data-test-subj="codeTypeaheadList-symbol"
id="kbnTypeahead__items"
key="symbol-suggestions"
Expand Down Expand Up @@ -215,7 +215,9 @@ exports[`render full suggestions component 1`] = `
</EuiText>
</div>
</EuiFlexGroup>
<div>
<div
className="codeSearch-suggestion__group-result"
>
1
Result
</div>
Expand Down Expand Up @@ -317,7 +319,7 @@ exports[`render full suggestions component 1`] = `
</Component>
</div>
<div
className="kbnTypeahead__items"
className="kbnTypeahead__items codeSearch-suggestion__group"
data-test-subj="codeTypeaheadList-file"
id="kbnTypeahead__items"
key="file-suggestions"
Expand Down Expand Up @@ -400,7 +402,9 @@ exports[`render full suggestions component 1`] = `
</EuiText>
</div>
</EuiFlexGroup>
<div>
<div
className="codeSearch-suggestion__group-result"
>
1
Result
</div>
Expand Down Expand Up @@ -454,7 +458,7 @@ exports[`render full suggestions component 1`] = `
</Component>
</div>
<div
className="kbnTypeahead__items"
className="kbnTypeahead__items codeSearch-suggestion__group"
data-test-subj="codeTypeaheadList-repository"
id="kbnTypeahead__items"
key="repository-suggestions"
Expand Down Expand Up @@ -538,7 +542,9 @@ exports[`render full suggestions component 1`] = `
</EuiText>
</div>
</EuiFlexGroup>
<div>
<div
className="codeSearch-suggestion__group-result"
>
2
Result
s
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class SuggestionsComponent extends Component<Props> {
{this.getGroupTitle(group.type)}
</EuiText>
</EuiFlexGroup>
<div>
<div className="codeSearch-suggestion__group-result">
{total} Result
{total === 1 ? '' : 's'}
</div>
Expand All @@ -117,7 +117,7 @@ export class SuggestionsComponent extends Component<Props> {
return (
<div
id="kbnTypeahead__items"
className="kbnTypeahead__items"
className="kbnTypeahead__items codeSearch-suggestion__group"
role="listbox"
data-test-subj={`codeTypeaheadList-${type}`}
ref={node => (this.parentNode = node)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export class CodeResult extends React.PureComponent<Props> {
<EuiBadge color="default">{hits}</EuiBadge>
</EuiFlexItem>
<EuiText size="s">
&nbsp;hits from
&nbsp;hits from&nbsp;
<Link to={fileLinkUrl} data-test-subj="codeSearchResultFileItem">
&nbsp;{filePath}
{filePath}
</Link>
</EuiText>
</EuiFlexGroup>
Expand Down