[PR #14079] [CLOSED] fix(app): skip sidebar transition animation on initial page load #19773

Closed
opened 2026-04-16 07:15:49 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14079
Author: @adityaidev
Created: 2/4/2026
Status: Closed

Base: mainHead: fix/skip-sidebar-animation-on-initial-load


📝 Commits (1)

  • 5fcf300 fix(app): skip sidebar transition animation on initial page load

📊 Changes

1 file changed (+12 additions, -3 deletions)

View changed files

📝 app/ui/app/src/components/layout/layout.tsx (+12 -3)

📄 Description

Summary

The sidebar animates open when the page first loads instead of appearing instantly. This PR defers CSS transitions until after the first mount, so the sidebar renders in its correct state without animation on initial load.

Changes

  • Added hasMounted state that becomes true after first requestAnimationFrame
  • CSS transition classes (transition-[width], transition-[left]) are only applied after mount
  • Subsequent sidebar toggles still animate smoothly

Before

Sidebar slides open from collapsed state on every page load.

After

Sidebar appears instantly in its saved state on load. Toggle animations work normally after mount.

Fixes #12954


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/14079 **Author:** [@adityaidev](https://github.com/adityaidev) **Created:** 2/4/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/skip-sidebar-animation-on-initial-load` --- ### 📝 Commits (1) - [`5fcf300`](https://github.com/ollama/ollama/commit/5fcf3006f51f84410f1f65afa93c6598b91eeb32) fix(app): skip sidebar transition animation on initial page load ### 📊 Changes **1 file changed** (+12 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `app/ui/app/src/components/layout/layout.tsx` (+12 -3) </details> ### 📄 Description ## Summary The sidebar animates open when the page first loads instead of appearing instantly. This PR defers CSS transitions until after the first mount, so the sidebar renders in its correct state without animation on initial load. ## Changes - Added `hasMounted` state that becomes `true` after first `requestAnimationFrame` - CSS transition classes (`transition-[width]`, `transition-[left]`) are only applied after mount - Subsequent sidebar toggles still animate smoothly ## Before Sidebar slides open from collapsed state on every page load. ## After Sidebar appears instantly in its saved state on load. Toggle animations work normally after mount. Fixes #12954 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-16 07:15:49 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#19773