Skip to content

fix(nav): polish cloud side-nav collapse animation#3606

Draft
bilal-karim wants to merge 2 commits into
mainfrom
fix/cloud-nav-collapsed-header-shift
Draft

fix(nav): polish cloud side-nav collapse animation#3606
bilal-karim wants to merge 2 commits into
mainfrom
fix/cloud-nav-collapsed-header-shift

Conversation

@bilal-karim

@bilal-karim bilal-karim commented Jun 25, 2026

Copy link
Copy Markdown
Member

Polishes the Cloud side-nav expand/collapse transition. Two related fixes:

1. Stable header height (cloud-nav-bar.svelte, Cloud-only)

When the nav collapsed, its header reflowed from a single row into a stacked column (group-data-[nav=closed]:flex-col gap-2, while min-h-7 was dropped). That changed the header's height, and because the nav icon list sits directly below it, every icon shifted vertically on each expand/collapse. Fix: keep the header a constant-height single row in both states (pin min-h-7, hide the logo/subtitle block when collapsed, center the toggle). The OSS nav bar is a separate component and is untouched.

2. Fade labels instead of clipping them (navigation-item.svelte, shared)

The label already cross-faded via transition-opacity, but it ran concurrently with the container's width animation, so the half-faded text was clipped by the narrowing rail and read as a slide. Fix: sequence it — fade out fast on collapse (duration-100, no delay) and delay the fade-in on expand until the rail has widened (delay-100), so the label reads as a clean fade in both directions. This file is shared by the OSS nav bar, so the improved fade applies there too.

Context

Surfaced while adding a width transition to the Cloud side nav in cloud-ui: once the width animated smoothly, both the icons' vertical jump and the labels' clip-slide became obvious. These remove the rough edges at the source.

Testing

Visually verified in cloud-ui (via a locally rebuilt tarball) across expanded and collapsed states for project/namespace nav and the Cloud root.

🤖 Generated with Claude Code

The Cloud nav header reflowed from a single row (expanded) into a stacked
column (collapsed: flex-col + gap-2, dropping min-h-7), changing its height.
Because the nav icon list sits directly below the header, the icons shifted
vertically on every expand/collapse.

Keep the header a constant-height single row in both states: pin min-h-7,
hide the logo/subtitle block when collapsed, and center the toggle. The icon
list's top edge no longer moves. OSS nav bar is unaffected.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bilal-karim bilal-karim requested a review from a team as a code owner June 25, 2026 20:36
@vercel

vercel Bot commented Jun 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
holocene Ready Ready Preview, Comment Jun 25, 2026 8:48pm

Request Review

The label already cross-faded via transition-opacity, but it ran concurrently
with the container's width animation, so the half-faded text was clipped by the
narrowing rail and read as a slide. Sequence it instead: fade out fast on
collapse (duration-100, no delay) and delay the fade-in on expand until the rail
has widened (delay-100), so the label reads as a clean fade in both directions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bilal-karim bilal-karim changed the title fix(cloud-nav): keep collapsed nav header height stable fix(nav): polish cloud side-nav collapse animation Jun 25, 2026
@bilal-karim bilal-karim marked this pull request as draft June 25, 2026 20:53
@bilal-karim bilal-karim removed the request for review from a team June 26, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant