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

[Workspace]Fix the UI of recent assets in the header #8156

Merged
merged 8 commits into from
Dec 24, 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/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"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Icon type changed to gear?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, please check the issue tracker:
截屏2024-12-24 10 12 23

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