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] [Workspace]Fix the UI of recent assets in the header #9115

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Open
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/8156.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fix:
- Fix the UI of recent assets in the header ([#8156](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/8156))
23 changes: 11 additions & 12 deletions src/core/public/chrome/ui/header/recent_items.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,15 @@ export const RecentItems = ({
ownFocus={false}
panelPaddingSize="s"
button={
<EuiButtonEmpty
data-test-subj="preferencesSettingButton"
flush="left"
<EuiButtonIcon
color="primary"
size="xs"
onClick={() => {
setIsPreferencesPopoverOpen((IsPreferencesPopoverOpe) => !IsPreferencesPopoverOpe);
}}
>
{i18n.translate('core.header.recent.preferences', {
defaultMessage: 'Preferences',
})}
</EuiButtonEmpty>
iconType="managementApp"
data-test-subj="preferencesSettingButton"
/>
}
isOpen={isPreferencesPopoverOpen}
anchorPosition="downLeft"
Expand Down Expand Up @@ -273,12 +270,13 @@ export const RecentItems = ({
panelPaddingSize="m"
>
{renderBreadcrumbs}
<EuiSpacer size="s" />
<EuiSpacer size="m" />
<EuiPanel
hasShadow={false}
hasBorder={false}
paddingSize="none"
style={{ maxHeight: '35vh', overflow: 'auto' }}
style={{ maxHeight: '35vh' }}
className="euiYScrollWithShadows"
>
<EuiTitle size="xxs">
<h4>
Expand Down Expand Up @@ -309,8 +307,9 @@ export const RecentItems = ({
<EuiIcon
style={{ marginRight: widthForRightMargin }}
type={item.meta.icon || 'apps'}
color="text"
/>
{item.label}
{item.label + ' '}
{item.workspaceName ? (
<EuiTextColor color="subdued">({item.workspaceName})</EuiTextColor>
) : null}
Expand All @@ -328,7 +327,7 @@ export const RecentItems = ({
})}
</EuiText>
)}
<EuiSpacer size="s" />
<EuiSpacer size="m" />
</EuiPanel>
{preferencePopover}
</EuiPopover>
Expand Down
Loading