From 0a8a1e95d4693bf4fb5e2b9cf9cebce6ccc61468 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96stberg?= Date: Thu, 29 Feb 2024 14:54:40 +0100 Subject: [PATCH] Remove -5px from SidebarScrollWrapper because it covers buttons and makes SidebarSubmenuItems hard to click MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mikael Östberg --- .changeset/smart-hairs-lick.md | 5 +++++ packages/core-components/src/layout/Sidebar/Items.tsx | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/smart-hairs-lick.md diff --git a/.changeset/smart-hairs-lick.md b/.changeset/smart-hairs-lick.md new file mode 100644 index 0000000000..45b5800150 --- /dev/null +++ b/.changeset/smart-hairs-lick.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-components': patch +--- + +Fix a spacing issue for the SidebarSubmenu in case a SidebarScrollWrapper is used that made it hard to reach the SidebarSubmenu diff --git a/packages/core-components/src/layout/Sidebar/Items.tsx b/packages/core-components/src/layout/Sidebar/Items.tsx index b2449075cc..cb5b801b6d 100644 --- a/packages/core-components/src/layout/Sidebar/Items.tsx +++ b/packages/core-components/src/layout/Sidebar/Items.tsx @@ -701,8 +701,7 @@ export const SidebarScrollWrapper = styled('div')(({ theme }) => { return { flex: '0 1 auto', overflowX: 'hidden', - // 5px space to the right of the scrollbar - width: 'calc(100% - 5px)', + width: '100%', // Display at least one item in the container // Question: Can this be a config/theme variable - if so, which? :/ minHeight: '48px',