[PR #14238] [CLOSED] fix(app): prevent sidebar animation on initial page load #61280

Closed
opened 2026-04-29 16:21:50 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14238
Author: @tysoncung
Created: 2/13/2026
Status: Closed

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


📝 Commits (1)

  • f501658 fix(app): prevent sidebar animation on initial page load

📊 Changes

1 file changed (+13 additions, -4 deletions)

View changed files

📝 app/ui/app/src/components/layout/layout.tsx (+13 -4)

📄 Description

Summary

Fixes the sidebar animating open when the app first loads instead of appearing in its correct state immediately.

Problem

When the app loads, the sidebar defaults to sidebarOpen: false until the actual settings are fetched. Once settings load with sidebarOpen: true, the CSS transition causes the sidebar to animate from closed to open.

Solution

Track the initial render state and only enable CSS transitions after the first render completes. This allows the sidebar to appear in its correct position immediately without animation on page load, while preserving the smooth animation when users manually toggle the sidebar.

Changes

  • Add isInitialRender state to track first render
  • Conditionally apply transition classes based on render state
  • Transitions are enabled after the first render via useEffect

Test Plan

  • Sidebar appears open immediately on page load (no animation)
  • Toggling sidebar still animates smoothly
  • Works on both Windows and non-Windows platforms

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/14238 **Author:** [@tysoncung](https://github.com/tysoncung) **Created:** 2/13/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/sidebar-animation-on-load` --- ### 📝 Commits (1) - [`f501658`](https://github.com/ollama/ollama/commit/f501658e5ace5655e17c60837c443fcf67d5d9c0) fix(app): prevent sidebar animation on initial page load ### 📊 Changes **1 file changed** (+13 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `app/ui/app/src/components/layout/layout.tsx` (+13 -4) </details> ### 📄 Description ## Summary Fixes the sidebar animating open when the app first loads instead of appearing in its correct state immediately. ## Problem When the app loads, the sidebar defaults to `sidebarOpen: false` until the actual settings are fetched. Once settings load with `sidebarOpen: true`, the CSS transition causes the sidebar to animate from closed to open. ## Solution Track the initial render state and only enable CSS transitions after the first render completes. This allows the sidebar to appear in its correct position immediately without animation on page load, while preserving the smooth animation when users manually toggle the sidebar. ## Changes - Add `isInitialRender` state to track first render - Conditionally apply transition classes based on render state - Transitions are enabled after the first render via `useEffect` ## Test Plan - [x] Sidebar appears open immediately on page load (no animation) - [x] Toggling sidebar still animates smoothly - [x] Works on both Windows and non-Windows platforms 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-29 16:21:50 -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#61280