From bfec5a05b9fce991cdfeb4b554cf926bc31c6298 Mon Sep 17 00:00:00 2001 From: Mohamed Boudra Date: Tue, 4 Aug 2026 12:05:18 +0200 Subject: [PATCH] feat(app): open the workspace actions menu as a sheet on compact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The trigger was a vertical ellipsis on compact and a horizontal one elsewhere. Use the horizontal glyph everywhere: it is the wider shape, and it is the one sitting above a menu that now presents from the bottom edge. The button draws at 32pt, under the 44pt touch minimum, and three of them sit flush beside the title, so the slop can only grow vertically — widening it would put two buttons' hit areas over the same pixels. --- .../screens/workspace/workspace-screen.tsx | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/packages/app/src/screens/workspace/workspace-screen.tsx b/packages/app/src/screens/workspace/workspace-screen.tsx index f92e5d967..51a05b3f1 100644 --- a/packages/app/src/screens/workspace/workspace-screen.tsx +++ b/packages/app/src/screens/workspace/workspace-screen.tsx @@ -26,7 +26,6 @@ import { ChevronDown, Copy, Ellipsis, - EllipsisVertical, Globe, Import as ImportIcon, PanelRight, @@ -246,7 +245,6 @@ function buildWorkspaceFileLocation( const ThemedLoadingSpinner = withUnistyles(LoadingSpinner); const ThemedEllipsis = withUnistyles(Ellipsis); -const ThemedEllipsisVertical = withUnistyles(EllipsisVertical); const ThemedChevronDown = withUnistyles(ChevronDown); const ThemedCopy = withUnistyles(Copy); const ThemedRotateCw = withUnistyles(RotateCw); @@ -1045,18 +1043,16 @@ function HeaderMenuProfileItem({ ); } -function WorkspaceHeaderMenuTriggerIcon({ - hovered, - open, - isMobile, -}: { - hovered: boolean; - open: boolean; - isMobile: boolean; -}) { - const Icon = isMobile ? ThemedEllipsisVertical : ThemedEllipsis; +/** + * The compact header buttons draw at 32pt, under the 44pt touch minimum, and sit flush against + * each other — so the slop can only grow vertically. Widening it would put two buttons' slop over + * the same pixels, which is a worse miss than a small target. + */ +const COMPACT_HEADER_BUTTON_HIT_SLOP = { top: 8, bottom: 8 } as const; + +function WorkspaceHeaderMenuTriggerIcon({ hovered, open }: { hovered: boolean; open: boolean }) { const colorMapping = hovered || open ? foregroundColorMapping : mutedColorMapping; - return ; + return ; } function WorkspaceHeaderMenu({ @@ -1097,22 +1093,28 @@ function WorkspaceHeaderMenu({ const renderTriggerIcon = useCallback( ({ hovered, open }: { hovered: boolean; open: boolean }) => ( - + ), - [isMobile], + [], ); return ( - + {renderTriggerIcon} - +