diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.scss index faa1fbf425c1c..ed8ce512a2eb8 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.scss +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.scss @@ -1,40 +1,24 @@ .appSearchResult { - overflow: hidden; display: flex; - justify-content: space-between; - width: 100%; - &__contentWrap { + &__content { width: 100%; padding: $euiSize; - display: grid; - grid-template-rows: 1fr $euiSizeXS * 5; - border-right: $euiBorderThin; - } - - &__contentInner { - display: grid; - grid-gap: $euiSizeS; overflow: hidden; } - &__fieldsetContainer { - display: flex; - flex-direction: column; - } - &__hiddenFieldsIndicator { font-size: $euiFontSizeXS; color: $euiColorDarkShade; - align-self: end; - padding-top: 0; + margin-top: $euiSizeS; } - &__toggleExpandButton { - justify-self: stretch; - align-self: stretch; + &__actionButton { display: flex; + justify-content: center; + align-items: center; width: $euiSizeL * 2; + border-left: $euiBorderThin; &:hover, &:focus, @@ -43,13 +27,4 @@ cursor: pointer; } } - - &__toggleExpandButton { - grid-column: 2; - } - - &__toggleIcon { - align-self: center; - margin: auto; - } } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.tsx index 035de461392e7..b45e9f31b4792 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result.tsx @@ -34,40 +34,36 @@ export const Result: React.FC = ({ result, showScore }) => { return ( -
-
- -
-
- {resultFields - .slice(0, isOpen ? resultFields.length : RESULT_CUTOFF) - .map(([field, value]: [string, FieldValue]) => ( - - ))} -
-
+
+ +
+ {resultFields + .slice(0, isOpen ? resultFields.length : RESULT_CUTOFF) + .map(([field, value]: [string, FieldValue]) => ( + + ))}
{numResults > RESULT_CUTOFF && !isOpen && ( -
+
{i18n.translate('xpack.enterpriseSearch.appSearch.result.numberOfAdditionalFields', { defaultMessage: '{numberOfAdditionalFields} more fields', values: { numberOfAdditionalFields: numResults - RESULT_CUTOFF, }, })} -
+ )} -
+ {numResults > RESULT_CUTOFF && ( )} diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.scss index 3bdb9a57be319..15509b98d465b 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.scss +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.scss @@ -2,10 +2,12 @@ font-size: $euiFontSizeS; line-height: $euiLineHeight; display: grid; - grid-template-columns: calc(35% + #{$euiSizeS * 7} ) $euiSize * 2 1fr; + grid-template-columns: 0.85fr $euiSizeXL 1fr; grid-gap: $euiSizeXS; &__separator { + text-align: center; + &:after { content: '=>'; color: $euiColorDarkShade; @@ -13,7 +15,11 @@ } &__value { - padding-left: $euiSizeS; + padding-left: $euiSize; overflow: hidden; + + @include euiBreakpoint('xs') { + padding-left: 0; + } } } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.tsx index ce0d4a4b32b9c..bc6329aa4fa4a 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_field.tsx @@ -19,11 +19,9 @@ interface Props { export const ResultField: React.FC = ({ field, raw, snippet, type }) => { return ( -
-
- {field} -
-
+
+
{field}
+
diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.scss b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.scss index 1c5066f3b86a1..73372d7c4aca0 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.scss +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.scss @@ -2,25 +2,27 @@ display: flex; justify-content: space-between; align-items: flex-start; -} + margin-bottom: $euiSizeS; -.appSearchResultHeaderColumn { - display: flex; - flex-wrap: wrap; + @include euiBreakpoint('xs') { + flex-direction: column; + } - &--left { - justify-content: flex-start; + &__column { + display: flex; + flex-wrap: wrap; - .appSearchResultHeaderItem { - margin-right: $euiSizeL; + @include euiBreakpoint('xs') { + flex-direction: column; } - } - - &--right { - justify-content: flex-end; + & + &, .appSearchResultHeaderItem + .appSearchResultHeaderItem { margin-left: $euiSizeL; + + @include euiBreakpoint('xs') { + margin-left: 0; + } } } } diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.tsx index 64bf4f41e1e55..9b83014d041dd 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header.tsx @@ -20,9 +20,9 @@ export const ResultHeader: React.FC = ({ showScore, resultMeta }) => { const showEngineLabel: boolean = resultMeta.id !== resultMeta.scopedId; return ( -
+
{showScore && ( -
+
= ({ showScore, resultMeta }) => {
)} -
+
{showEngineLabel && ( = ({ showScore, resultMeta }) => { )}
-
+
); }; diff --git a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header_item.tsx b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header_item.tsx index 100e7e28d1ab2..2aeef79227547 100644 --- a/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header_item.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/app_search/components/result/result_header_item.tsx @@ -26,7 +26,7 @@ export const ResultHeaderItem: React.FC = ({ field, type, value }) => { } return ( -
+