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

[Backport 2.x] Change page title of application headers to h1 and xs #8341

Merged
merged 1 commit into from
Sep 26, 2024
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
2 changes: 2 additions & 0 deletions changelogs/fragments/8227.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Adjust semantics and sizing of page titles in application headers ([#8227](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8227))
2 changes: 1 addition & 1 deletion src/plugins/navigation/public/top_nav_menu/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

.osdTopNavMenuScreenTitle {
// stylelint-disable-next-line @osd/stylelint/no_modifying_global_selectors
.euiText {
.euiTitle {
line-height: $euiFormControlCompressedHeight;
white-space: nowrap;
overflow: hidden;
Expand Down
14 changes: 10 additions & 4 deletions src/plugins/navigation/public/top_nav_menu/top_nav_menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* under the License.
*/

import { EuiFlexGroup, EuiFlexItem, EuiHeaderLinks, EuiText } from '@elastic/eui';
import { EuiFlexGroup, EuiFlexItem, EuiHeaderLinks, EuiText, EuiTitle } from '@elastic/eui';
import classNames from 'classnames';
import React, { ReactElement, useRef } from 'react';

Expand Down Expand Up @@ -182,7 +182,9 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {
<MountPointPortal setMountPoint={setMenuMountPoint}>
<EuiFlexGroup alignItems="stretch" gutterSize="none">
<EuiFlexItem grow={false} className="osdTopNavMenuScreenTitle">
<EuiText size="s">{screenTitle}</EuiText>
<EuiTitle size="xs">
<h1>{screenTitle}</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false} className="osdTopNavMenu">
{renderMenu(menuClassName)}
Expand All @@ -201,7 +203,9 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {
<MountPointPortal setMountPoint={setMenuMountPoint}>
<EuiFlexGroup alignItems="stretch" gutterSize="none">
<EuiFlexItem grow={false} className="osdTopNavMenuScreenTitle">
<EuiText size="s">{screenTitle}</EuiText>
<EuiTitle size="xs">
<h1>{screenTitle}</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem className="osdTopNavMenu">
{renderMenu(menuClassName, true)}
Expand All @@ -221,7 +225,9 @@ export function TopNavMenu(props: TopNavMenuProps): ReactElement | null {
<MountPointPortal setMountPoint={setMenuMountPoint}>
<EuiFlexGroup alignItems="stretch" gutterSize="none">
<EuiFlexItem grow={false} className="osdTopNavMenuScreenTitle">
<EuiText size="s">{screenTitle}</EuiText>
<EuiTitle size="xs">
<h1>{screenTitle}</h1>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false} className="osdTopNavMenu">
{renderMenu(menuClassName)}
Expand Down
Loading