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

[Search Application] Update pageTemplate header to grey and rename nav item to "Search preview" #155795

Merged
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: 'searchApplciationHeaderBackgroundColor',
pageTitle,
rightSideItems: [],
}}
Expand All @@ -84,6 +88,8 @@ export const EngineConnect: React.FC = () => {
pageViewTelemetry={EngineViewTabs.CONNECT}
isLoading={isLoadingEngine}
pageHeader={{
bottomBorder: false,
className: 'searchApplciationHeaderBackgroundColor',
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: 'searchApplciationHeaderBackgroundColor',
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: 'searchApplciationHeaderBackgroundColor',
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: 'searchApplciationHeaderBackgroundColor',
pageTitle,
rightSideItems: [
<EuiButton
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

.searchApplciationHeaderBackgroundColor {
background-color: rgba(247, 248, 252, 1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be an variable from EUI? cc @daveyholler

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find a EUI variable for "subdued". As per the design it's useEuiBackgroundColor('subdued')

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to use $euiColorLightShade for this. The color isn't actually called subdued, but the light shade is the background color for a subdued panel.

Copy link
Member Author

@saarikabhasi saarikabhasi Apr 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think $euiColorLightestShade is closest to subdued as $euiColorLightShade is little more of dark shade

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Page with background color $euiColorLightestShade

Screenshot 2023-04-26 at 9 39 39 AM

cc: @julianrosado WDYT?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩 Beautiful!


}
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