From 627692c4ef0c19d27f67c416ec206c374722fbac Mon Sep 17 00:00:00 2001 From: Kate Sosedova <36230123+ek-so@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:32:51 +0100 Subject: [PATCH] =?UTF-8?q?Remove=20a=20condition=20to=20hide=20space=20fr?= =?UTF-8?q?om=20dropdown=20menu=20even=20if=20there's=20o=E2=80=A6=20(#199?= =?UTF-8?q?601)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - Based [on the issue](https://github.com/orgs/elastic/projects/1102/views/15?pane=issue&itemId=86718686&issue=elastic%7Ckibana%7C199594), I removed a condition to hide space from dropdown menu even if there's only one (for admins and regular users) - I also changed the wording from "Your spaces" to just "Spaces" so that we're consistent in all cases, [based on this comment](https://github.com/elastic/UX/issues/113#issuecomment-2464988675). --------- Co-authored-by: Elastic Machine --- .../spaces/public/nav_control/components/spaces_menu.tsx | 2 +- .../plugins/spaces/public/nav_control/nav_control_popover.tsx | 2 +- x-pack/plugins/translations/translations/fr-FR.json | 2 +- x-pack/plugins/translations/translations/zh-CN.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx b/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx index 29d360fe91f3f..3a055fabd2cbf 100644 --- a/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx +++ b/x-pack/plugins/spaces/public/nav_control/components/spaces_menu.tsx @@ -117,7 +117,7 @@ class SpacesMenuUI extends Component { {search || i18n.translate('xpack.spaces.navControl.spacesMenu.selectSpacesTitle', { - defaultMessage: 'Your spaces', + defaultMessage: 'Spaces', })} {list} diff --git a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx index cd08ff87e1a55..31a721e4b02ec 100644 --- a/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx +++ b/x-pack/plugins/spaces/public/nav_control/nav_control_popover.tsx @@ -97,7 +97,7 @@ class NavControlPopoverUI extends Component { const isTourOpen = Boolean(activeSpace) && this.state.showTour && !this.state.showSpaceSelector; let element: React.ReactNode; - if (this.state.loading || this.state.spaces.length < 2) { + if (this.state.loading) { element = (