Skip to content

fix(cloud-nav): smooth label fade on side-nav collapse/expand#3628

Open
bilal-karim wants to merge 1 commit into
mainfrom
cloud-nav-label-fade
Open

fix(cloud-nav): smooth label fade on side-nav collapse/expand#3628
bilal-karim wants to merge 1 commit into
mainfrom
cloud-nav-label-fade

Conversation

@bilal-karim

@bilal-karim bilal-karim commented Jul 2, 2026

Copy link
Copy Markdown
Member

Follow-up to #3606.

Problem

The Cloud side-nav item labels used a plain symmetric opacity transition. On collapse they stayed opaque while the panel narrowed over them (a visible "chop"), and expand/collapse felt abrupt (see Standalone Activities and Namespace Settings as an example).

Change

Direction-aware label motion, paired with the nav's existing 150ms transition-width, scoped to the Cloud nav only (OSS unchanged). The panel width moves continuously in both directions (no stall); the label transitions on the roomy side of the width change:

  • Collapse — the label leads: a fast 75ms ease-out fade so it clears before the shrinking panel reaches it.
  • Expand — the label lags: waits 75ms for the panel to open, then fades in linearly over 150ms.
Before After
Before.mp4
After.mp4

Implementation

  • Adds a data-cloud attribute on the nav container — mirrors the existing data-nav pattern the labels already read via group-data-[nav=…].
  • Timing is a few Tailwind utilities on the label in navigation-item.svelte, each scoped to Cloud + nav state; the OSS nav resolves to its original opacity-only transition.
  • No keyframes, plugin, or design-system changes.

Diff: 2 files, +2/−1.

Testing

Verified against the real cloud-ui CSS bundle:

  • Cloud collapse: 75ms ease-out; label ≈ 0.04 opacity by the time the panel edge reaches it (no chop).
  • Cloud expand: panel opens 0–150ms, label fades in 75–225ms.
  • OSS nav: 150ms opacity-only fade, default easing — unchanged.

🤖 Generated with Claude Code

@vercel

vercel Bot commented Jul 2, 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 Jul 2, 2026 6:13pm

Request Review

Follow-up to #3606. The nav item labels used a plain symmetric opacity
transition, so on collapse they stayed opaque as the panel narrowed over
them (a visible "chop") and expand/collapse felt abrupt.

Make the label motion direction-aware and paired with the nav's 150ms
transition-width, scoped to the Cloud nav via a new data-cloud attribute
(OSS unchanged):

- Collapse: the label leads — a fast 75ms ease-out fade so it clears before
  the shrinking panel reaches it.
- Expand: the label lags — waits 75ms for the panel to open, then fades in
  linearly over 150ms.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@bilal-karim bilal-karim force-pushed the cloud-nav-label-fade branch from abf6a03 to 2c549ca Compare July 2, 2026 18:11
@bilal-karim bilal-karim marked this pull request as ready for review July 2, 2026 18:15
@bilal-karim bilal-karim requested a review from a team as a code owner July 2, 2026 18:15
@bilal-karim bilal-karim requested a review from laurakwhit July 2, 2026 18:19
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