mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-11-17 08:20:12 +00:00
feat: space the sidebar's sections apart and give its rows a little more height
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
2128fd1d01
commit
d1466d0c4e
@@ -126,8 +126,9 @@
|
||||
compact ? 'w-auto' : 'w-full',
|
||||
sidebarClasses.hoverBg,
|
||||
'transition-all relative',
|
||||
// Compact rows sit in the page header and keep its height; the nav's are h-7.
|
||||
sublabel ? 'h-10' : compact ? 'h-8' : 'h-7',
|
||||
// Compact rows sit in the page header and keep its height; the nav's are 30px, and
|
||||
// square on the collapsed rail.
|
||||
sublabel ? 'h-10' : compact || isCollapsed ? 'h-8' : 'h-[30px]',
|
||||
classNames,
|
||||
buttonClass
|
||||
)}
|
||||
|
||||
@@ -60,7 +60,9 @@
|
||||
}}
|
||||
{onclick}
|
||||
class={twMerge(
|
||||
'group flex items-center px-2 py-1 text-sm font-light rounded-md h-7 gap-2',
|
||||
'group flex items-center px-2 py-1 text-sm font-light rounded-md gap-2',
|
||||
// Collapsed, the rail's rows are squares, as its footer buttons are.
|
||||
isCollapsed ? 'h-8' : 'h-[30px]',
|
||||
isSelected
|
||||
? sidebarClasses.selectedBg
|
||||
: item
|
||||
|
||||
@@ -341,7 +341,7 @@
|
||||
|
||||
<!-- Workers and Logs are full pages (not account/instance actions), so they sit
|
||||
as plain links above the Settings dropdown rather than inside it. -->
|
||||
<div class="flex flex-col gap-0.5 pb-1">
|
||||
<div class="flex flex-col gap-0.5 mb-0.5">
|
||||
<MenuLink
|
||||
class="!text-xs"
|
||||
label="Workers"
|
||||
@@ -357,15 +357,16 @@
|
||||
items={logsItems}
|
||||
placement="top-start"
|
||||
class="w-full"
|
||||
fixedHeight={false}
|
||||
enableFlyTransition
|
||||
aiId="sidebar-menu-link-logs"
|
||||
aiDescription="Button to open the logs menu (audit logs, service logs, critical alerts)"
|
||||
>
|
||||
{#snippet buttonReplacement()}
|
||||
<span
|
||||
class="relative flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-secondary text-xs hover:bg-surface-hover cursor-pointer {isCollapsed
|
||||
? 'justify-center'
|
||||
: ''}"
|
||||
class="relative flex items-center gap-2 w-full px-2 rounded-md text-secondary text-xs hover:bg-surface-hover cursor-pointer {isCollapsed
|
||||
? 'h-8 justify-center'
|
||||
: 'h-[30px]'}"
|
||||
>
|
||||
<Logs size={16} />
|
||||
{#if !isCollapsed}
|
||||
@@ -407,14 +408,15 @@
|
||||
{items}
|
||||
placement="top-start"
|
||||
class="w-full"
|
||||
fixedHeight={false}
|
||||
enableFlyTransition
|
||||
on:close={onChangelogsOpened}
|
||||
>
|
||||
{#snippet buttonReplacement()}
|
||||
<span
|
||||
class="relative flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-secondary text-xs hover:bg-surface-hover cursor-pointer {isCollapsed
|
||||
? 'justify-center'
|
||||
: ''}"
|
||||
class="relative flex items-center gap-2 w-full px-2 rounded-md text-secondary text-xs hover:bg-surface-hover cursor-pointer {isCollapsed
|
||||
? 'h-8 justify-center'
|
||||
: 'h-[30px]'}"
|
||||
>
|
||||
<Settings size={16} />
|
||||
{#if !isCollapsed}
|
||||
|
||||
@@ -526,7 +526,7 @@
|
||||
])
|
||||
</script>
|
||||
|
||||
<!-- Expanded, each section opens 8px under the one before, the gap the layout's scroll area puts
|
||||
<!-- Expanded, each section opens 10px under the one before, the gap the layout's scroll area puts
|
||||
between this nav and the sections after it; the collapsed rail keeps one pitch instead. -->
|
||||
<nav
|
||||
class={twMerge(
|
||||
@@ -586,8 +586,8 @@
|
||||
{/if}
|
||||
{#if showMain}
|
||||
{#if dataSection}
|
||||
<!-- 6px: the layout's 2px gap above this nav makes it 8 under Runs. -->
|
||||
<div class={isCollapsed ? '' : 'mt-1.5'}>
|
||||
<!-- 8px: the layout's 2px gap above this nav makes it 10 under Runs. -->
|
||||
<div class={isCollapsed ? '' : 'mt-2'}>
|
||||
<!-- Collapsed, no title row: the rail's icons keep one pitch across sections. -->
|
||||
{#if !isCollapsed}
|
||||
<SidebarSectionHeader
|
||||
@@ -648,7 +648,7 @@
|
||||
{/snippet}
|
||||
</Menu>
|
||||
{/snippet}
|
||||
<div class={isCollapsed ? '' : 'mt-2'}>
|
||||
<div class={isCollapsed ? 'mt-0.5' : 'mt-2.5'}>
|
||||
<!-- Collapsed, no title row: the rail's icons keep one pitch across sections. -->
|
||||
{#if !isCollapsed}
|
||||
<SidebarSectionHeader
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div
|
||||
bind:this={viewport}
|
||||
onscroll={measure}
|
||||
class="sidebar-scroll h-full overflow-y-auto overflow-x-hidden scrollbar-hidden flex flex-col gap-2"
|
||||
class="sidebar-scroll h-full overflow-y-auto overflow-x-hidden scrollbar-hidden flex flex-col gap-2.5"
|
||||
>
|
||||
{@render children()}
|
||||
</div>
|
||||
|
||||
@@ -1260,10 +1260,10 @@ outside this layout, and their shortcut must reopen the URL that is their creden
|
||||
</Button>
|
||||
{/if}
|
||||
</div>
|
||||
<!-- Pulled up into the Home band's slack under its centred row (48px band, 28px row), so
|
||||
Runs sits as far below Home as the nav's rows sit apart. Kept outside the scroll
|
||||
area: a negative margin inside it would clip Runs. -->
|
||||
<div class="flex flex-col flex-1 min-h-0 -mt-2">
|
||||
<!-- Pulled up into the Home band's slack under its centred row (48px band; rows 30px, 32px
|
||||
on the rail), so the next row sits 2px under Home, as the nav's rows sit apart. Kept
|
||||
outside the scroll area: a negative margin inside it would clip that row. -->
|
||||
<div class={twMerge('flex flex-col flex-1 min-h-0', collapsed ? '-mt-1.5' : '-mt-[7px]')}>
|
||||
<!-- The workspace nav: Runs → Settings scroll as ONE block with an
|
||||
overflow fade hint. The sections (Runs + workspace items / AI sessions /
|
||||
instance settings) are spaced by the scroll area's
|
||||
|
||||
Reference in New Issue
Block a user