Skip to content

Commit

Permalink
[8.8] [Search Application] Update pageTemplate header to grey and ren…
Browse files Browse the repository at this point in the history
…ame nav item to "Search preview" (#155795) (#156071)

# Backport

This will backport the following commits from `main` to `8.8`:
- [[Search Application] Update pageTemplate header to grey and rename
nav item to "Search preview"
(#155795)](#155795)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Saarika
Bhasi","email":"55930906+saarikabhasi@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-04-27T17:46:22Z","message":"[Search
Application] Update pageTemplate header to grey and rename nav item to
\"Search preview\" (#155795)\n\n## Summary\r\n* Rename nav item from
\"Preview\" to \"Search Preview\"\r\n* Update page Header to
grey\r\n\r\n\r\n### Screenshots\r\n\r\n<img width=\"1728\" alt=\"Search
preview\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397633-003e4e99-680d-4531-8d94-528152fa2799.png\">\r\n\r\n<img
width=\"1728\"
alt=\"Content\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397654-fb678a29-2c55-47d7-8d96-d8ce9f5164a2.png\">\r\n\r\n<img
width=\"1728\"
alt=\"Connect\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397677-57823b14-16bf-44eb-9f01-eb6adca2a3fa.png\">","sha":"e199282adaa1dc25eec4ee53adb5bf052710814b","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:EnterpriseSearch","v8.8.0","v8.9.0"],"number":155795,"url":"https://github.com/elastic/kibana/pull/155795","mergeCommit":{"message":"[Search
Application] Update pageTemplate header to grey and rename nav item to
\"Search preview\" (#155795)\n\n## Summary\r\n* Rename nav item from
\"Preview\" to \"Search Preview\"\r\n* Update page Header to
grey\r\n\r\n\r\n### Screenshots\r\n\r\n<img width=\"1728\" alt=\"Search
preview\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397633-003e4e99-680d-4531-8d94-528152fa2799.png\">\r\n\r\n<img
width=\"1728\"
alt=\"Content\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397654-fb678a29-2c55-47d7-8d96-d8ce9f5164a2.png\">\r\n\r\n<img
width=\"1728\"
alt=\"Connect\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397677-57823b14-16bf-44eb-9f01-eb6adca2a3fa.png\">","sha":"e199282adaa1dc25eec4ee53adb5bf052710814b"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/155795","number":155795,"mergeCommit":{"message":"[Search
Application] Update pageTemplate header to grey and rename nav item to
\"Search preview\" (#155795)\n\n## Summary\r\n* Rename nav item from
\"Preview\" to \"Search Preview\"\r\n* Update page Header to
grey\r\n\r\n\r\n### Screenshots\r\n\r\n<img width=\"1728\" alt=\"Search
preview\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397633-003e4e99-680d-4531-8d94-528152fa2799.png\">\r\n\r\n<img
width=\"1728\"
alt=\"Content\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397654-fb678a29-2c55-47d7-8d96-d8ce9f5164a2.png\">\r\n\r\n<img
width=\"1728\"
alt=\"Connect\"\r\nsrc=\"https://user-images.githubusercontent.com/55930906/234397677-57823b14-16bf-44eb-9f01-eb6adca2a3fa.png\">","sha":"e199282adaa1dc25eec4ee53adb5bf052710814b"}}]}]
BACKPORT-->

Co-authored-by: Saarika Bhasi <55930906+saarikabhasi@users.noreply.github.com>
  • Loading branch information
kibanamachine and saarikabhasi committed Apr 27, 2023
1 parent 1a79030 commit 4ef2af3
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import { EngineViewLogic } from '../engine_view_logic';

import { SearchApplicationAPI } from './search_application_api';

import '../search_application_layout.scss';

const pageTitle = i18n.translate(
'xpack.enterpriseSearch.content.searchApplications.connect.pageTitle',
{
Expand Down Expand Up @@ -68,6 +70,8 @@ export const EngineConnect: React.FC = () => {
pageViewTelemetry={EngineViewTabs.CONNECT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
}}
Expand All @@ -84,6 +88,8 @@ export const EngineConnect: React.FC = () => {
pageViewTelemetry={EngineViewTabs.CONNECT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
tabs: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ import {
ResultsView,
Sorting,
} from './search_ui_components';
import '../search_application_layout.scss';

class InternalEngineTransporter implements Transporter {
constructor(
Expand Down Expand Up @@ -313,6 +314,8 @@ export const EngineSearchPreview: React.FC = () => {
pageViewTelemetry={EngineViewTabs.PREVIEW}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle: (
<FormattedMessage
id="xpack.enterpriseSearch.content.engine.searchPreview.pageTitle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export const EngineView: React.FC = () => {
pageChrome={[engineName]}
pageViewTelemetry={tabId}
pageHeader={{
bottomBorder: false,
pageTitle: engineName,
rightSideItems: [],
}}
Expand Down Expand Up @@ -91,6 +92,7 @@ export const EngineView: React.FC = () => {
pageChrome={[engineName]}
pageViewTelemetry={tabId}
pageHeader={{
bottomBorder: false,
pageTitle: engineName,
rightSideItems: [],
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import { EngineIndices } from './engine_indices';
import { EngineIndicesLogic } from './engine_indices_logic';
import { EngineSchema } from './engine_schema';
import { EngineViewLogic } from './engine_view_logic';
import './search_application_layout.scss';

const pageTitle = i18n.translate(
'xpack.enterpriseSearch.content.searchApplications.content.pageTitle',
Expand Down Expand Up @@ -78,6 +79,8 @@ export const SearchApplicationContent = () => {
pageViewTelemetry={EngineViewTabs.CONTENT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
}}
Expand All @@ -103,6 +106,7 @@ export const SearchApplicationContent = () => {
pageViewTelemetry={EngineViewTabs.CONTENT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
breadcrumbs: [
{
color: 'primary',
Expand All @@ -119,6 +123,7 @@ export const SearchApplicationContent = () => {
),
},
],
className: 'searchApplicationHeaderBackgroundColor',
pageTitle,
rightSideItems: [
<EuiButton
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.searchApplicationHeaderBackgroundColor {
background-color: $euiColorLightestShade;

}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export const EnterpriseSearchEnginesPageTemplate: React.FC<
const navItems = useEnterpriseSearchEngineNav(engineName, pageTemplateProps.isEmptyState);
return (
<EnterpriseSearchPageTemplateWrapper
panelled
{...pageTemplateProps}
solutionNav={{
items: navItems,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ describe('useEnterpriseSearchEngineNav', () => {
{
href: `/app/enterprise_search/content/engines/${engineName}/preview`,
id: 'enterpriseSearchEnginePreview',
name: 'Preview',
name: 'Search Preview',
},
{
href: `/app/enterprise_search/content/engines/${engineName}/content`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const useEnterpriseSearchEngineNav = (engineName?: string, isEmptyState?:
{
id: 'enterpriseSearchEnginePreview',
name: i18n.translate('xpack.enterpriseSearch.nav.engine.previewTitle', {
defaultMessage: 'Preview',
defaultMessage: 'Search Preview',
}),
...generateNavLink({
shouldNotCreateHref: true,
Expand Down

0 comments on commit 4ef2af3

Please sign in to comment.