Skip to content

Commit

Permalink
[Workspace]Fix the UI of recent assets in the header (#8156)
Browse files Browse the repository at this point in the history
* resolve conflicts

Signed-off-by: Qxisylolo <[email protected]>

* fix/ fix the_UI_of_recent_assets, delete comments

Signed-off-by: Qxisylolo <[email protected]>

* fix/ fix the recent title size

Signed-off-by: Qxisylolo <[email protected]>

* fix/the_UI_of_recent_assets, use icon button

Signed-off-by: Qxisylolo <[email protected]>

* fix/the_UI_of_recent_assets, a small fix

Signed-off-by: Qxisylolo <[email protected]>

* remove comment

Signed-off-by: Qxisylolo <[email protected]>

* new resolve conflicts

Signed-off-by: Qxisylolo <[email protected]>

* Changeset file for PR #8156 created/updated

---------

Signed-off-by: Qxisylolo <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
Qxisylolo and opensearch-changeset-bot[bot] authored Dec 24, 2024
1 parent 66331eb commit b1113f4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
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

0 comments on commit b1113f4

Please sign in to comment.