Skip to content

Commit

Permalink
[Look&Feel] Update sementic header to use correct size
Browse files Browse the repository at this point in the history
Signed-off-by: Zhongnan Su <[email protected]>
  • Loading branch information
zhongnansu committed Jul 8, 2024
1 parent 20cefab commit ce3d66d
Show file tree
Hide file tree
Showing 20 changed files with 74 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import React, { Fragment } from 'react';
import { FormattedMessage } from '@osd/i18n/react';
import { EuiButton, EuiEmptyPrompt, EuiLink } from '@elastic/eui';
import { EuiButton, EuiEmptyPrompt, EuiLink, EuiTitle } from '@elastic/eui';
import { ApplicationStart } from 'opensearch-dashboards/public';

export const getNoItemsMessage = (
Expand All @@ -18,12 +18,14 @@ export const getNoItemsMessage = (
<EuiEmptyPrompt
iconType="dashboardApp"
title={
<h1 id="dashboardListingHeading">
<FormattedMessage
id="dashboard.listing.noItemsMessage"
defaultMessage="Looks like you don't have any dashboards."
/>
</h1>
<EuiTitle size="l">
<h1 id="dashboardListingHeading">
<FormattedMessage
id="dashboard.listing.noItemsMessage"
defaultMessage="Looks like you don't have any dashboards."
/>
</h1>
</EuiTitle>
}
/>
);
Expand All @@ -33,12 +35,14 @@ export const getNoItemsMessage = (
<EuiEmptyPrompt
iconType="dashboardApp"
title={
<h1 id="dashboardListingHeading">
<FormattedMessage
id="dashboard.listing.createNewDashboard.title"
defaultMessage="Create your first dashboard"
/>
</h1>
<EuiTitle size="l">
<h1 id="dashboardListingHeading">
<FormattedMessage
id="dashboard.listing.createNewDashboard.title"
defaultMessage="Create your first dashboard"
/>
</h1>
</EuiTitle>
}
body={
<Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export function LoadingSpinner() {
<EuiEmptyPrompt
icon={<EuiLoadingSpinner data-test-subj="loadingSpinner" size="xl" />}
title={
<EuiTitle size="s" data-test-subj="loadingSpinnerText">
<EuiTitle size="m" data-test-subj="loadingSpinnerText">
<h2>
<FormattedMessage id="discover.searchingTitle" defaultMessage="Searching" />
</h2>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/plugins/inspector/public/ui/inspector_panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ export class InspectorPanel extends Component<InspectorPanelProps, InspectorPane
<EuiFlyoutHeader hasBorder>
<EuiFlexGroup justifyContent="spaceBetween" alignItems="center">
<EuiFlexItem grow={true}>
<EuiTitle size="s">
<h1>{title}</h1>
<EuiTitle size="m">
<h2>{title}</h2>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const ManagementLandingPage = ({ setBreadcrumbs }: ManagementLandingPageP
<div className="eui-textCenter">
<EuiIcon type="managementApp" size="xxl" />
<EuiSpacer />
<EuiTitle>
<EuiTitle size="l">
<h1>
<FormattedMessage
id="management.landing.header"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const AddData: FC<Props> = ({ addBasePath, features }) => {
<section className="osdOverviewDataAdd" aria-labelledby="osdOverviewDataAdd__title">
<EuiFlexGroup alignItems="center">
<EuiFlexItem grow={1}>
<EuiTitle size="s">
<EuiTitle size="m">
<h2 id="osdOverviewDataAdd__title">
<FormattedMessage
id="opensearchDashboardsOverview.addData.sectionTitle"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const ManageData: FC<Props> = ({ addBasePath, features }) => {
aria-labelledby="osdOverviewDataManage__title"
data-test-subj="osdOverviewDataManage"
>
<EuiTitle size="s">
<EuiTitle size="m">
<h2 id="osdOverviewDataManage__title">
<FormattedMessage
id="opensearchDashboardsOverview.manageData.sectionTitle"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const OverviewPageHeader: FC<Props> = ({
)}

<EuiFlexItem>
<EuiTitle size="m">
<EuiTitle size="l">
<h1 id="osdOverviewPageHeader__title">{title}</h1>
</EuiTitle>
</EuiFlexItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export const Header = ({
<EuiPageContentHeaderSection>
<EuiTitle>
{canEdit ? (
// <EuiTitle size="l">
<h1>
<FormattedMessage
id="savedObjectsManagement.view.editItemTitle"
Expand All @@ -69,13 +70,16 @@ export const Header = ({
/>
</h1>
) : (
<h1>
<FormattedMessage
id="savedObjectsManagement.view.viewItemTitle"
defaultMessage="View {title}"
values={{ title: type }}
/>
</h1>
// </EuiTitle>
<EuiTitle size="l">
<h1>
<FormattedMessage
id="savedObjectsManagement.view.viewItemTitle"
defaultMessage="View {title}"
values={{ title: type }}
/>
</h1>
</EuiTitle>
)}
</EuiTitle>
</EuiPageContentHeaderSection>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const Header = ({
<Fragment>
<EuiFlexGroup justifyContent="spaceBetween" alignItems="baseline">
<EuiFlexItem grow={false}>
<EuiTitle>
<EuiTitle size="l">
<h1>
<FormattedMessage
id="savedObjectsManagement.objectsTable.header.savedObjectsTitle"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function LinkedSearch({ savedSearch, eventEmitter }: LinkedSearchProps) {
</EuiFlexItem>

<EuiFlexItem grow={false} className="eui-textTruncate">
<EuiTitle size="xs" className="eui-textTruncate">
<EuiTitle size="m" className="eui-textTruncate">
<h2
title={i18n.translate('visDefaultEditor.sidebar.savedSearch.titleAriaLabel', {
defaultMessage: 'Saved search: {title}',
Expand Down Expand Up @@ -184,7 +184,7 @@ function SidebarTitle({ savedSearch, vis, isLinkedSearch, eventEmitter }: Sideba
return isLinkedSearch && savedSearch ? (
<LinkedSearch savedSearch={savedSearch} eventEmitter={eventEmitter} />
) : vis.type.options.showIndexSelection ? (
<EuiTitle size="xs" className="visEditorSidebar__titleContainer eui-textTruncate">
<EuiTitle size="m" className="visEditorSidebar__titleContainer eui-textTruncate">
<h2
title={i18n.translate('visDefaultEditor.sidebar.indexPatternAriaLabel', {
defaultMessage: 'Index pattern: {title}',
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/vis_type_markdown/public/markdown_options.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function MarkdownOptions({ stateParams, setValue }: VisOptionsProps<MarkdownVisP
<EuiFlexItem grow={false}>
<EuiFlexGroup gutterSize="none" justifyContent="spaceBetween" alignItems="baseline">
<EuiFlexItem grow={false}>
<EuiTitle size="xs">
<EuiTitle size="m">
<h2>
<label htmlFor="markdownVisInput">Markdown</label>
</h2>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class TypeSelection extends React.Component<TypeSelectionProps, TypeSelectionSta
<VisHelpText {...highlightedType} />
) : (
<React.Fragment>
<EuiTitle size="s">
<EuiTitle size="m">
<h2>
<FormattedMessage
id="visualizations.newVisWizard.selectVisType"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface VisHelpTextProps {
export const VisHelpText = ({ name, title, description, highlightMsg }: VisHelpTextProps) => {
return (
<React.Fragment>
<EuiTitle size="s">
<EuiTitle size="m">
<h2>{title}</h2>
</EuiTitle>
<EuiSpacer size="s" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@

import React from 'react';
import { History } from 'history';
import { EuiBetaBadge, EuiButton, EuiEmptyPrompt, EuiIcon, EuiLink, EuiBadge } from '@elastic/eui';
import {
EuiBetaBadge,
EuiButton,
EuiEmptyPrompt,
EuiIcon,
EuiLink,
EuiBadge,
EuiTitle,
} from '@elastic/eui';
import { i18n } from '@osd/i18n';
import { FormattedMessage } from '@osd/i18n/react';

Expand Down Expand Up @@ -167,12 +175,14 @@ export const getNoItemsMessage = (createItem: () => void) => (
<EuiEmptyPrompt
iconType="visualizeApp"
title={
<h1 id="visualizeListingHeading">
<FormattedMessage
id="visualize.listing.createNew.title"
defaultMessage="Create your first visualization"
/>
</h1>
<EuiTitle size="l">
<h1 id="visualizeListingHeading">
<FormattedMessage
id="visualize.listing.createNew.title"
defaultMessage="Create your first visualization"
/>
</h1>
</EuiTitle>
}
body={
<p>
Expand Down

0 comments on commit ce3d66d

Please sign in to comment.