[PR #13743] fix(app): skip sidebar animation on initial load #14373

Open
opened 2026-04-13 00:52:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13743
Author: @VedantMadane
Created: 1/16/2026
Status: 🔄 Open

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


📝 Commits (1)

  • 4a356c1 fix(app): skip sidebar animation on initial load

📊 Changes

1 file changed (+14 additions, -5 deletions)

View changed files

📝 app/ui/app/src/components/layout/layout.tsx (+14 -5)

📄 Description

Summary

Fixes #12954 - The sidebar was animating open on first load instead of appearing open immediately.

Problem

When the app loads, CSS transitions are applied immediately while settings are being fetched asynchronously. The sidebar starts with sidebarOpen: false (default), then transitions to sidebarOpen: true when settings load, causing an unwanted animation.

Solution

Added a hasMounted state that tracks whether the component has completed its initial render. CSS transition classes are only applied after the first paint using requestAnimationFrame.

This ensures:

  • Initial render: Sidebar appears in correct state instantly (no animation)
  • Subsequent toggles: Sidebar animates smoothly as expected

Testing

  • Open the app fresh - sidebar should appear open instantly without animation
  • Toggle sidebar button - should still animate smoothly

🔄 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/13743 **Author:** [@VedantMadane](https://github.com/VedantMadane) **Created:** 1/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/sidebar-animation-on-load` --- ### 📝 Commits (1) - [`4a356c1`](https://github.com/ollama/ollama/commit/4a356c1be9cc686f5d2246f7dc475a4e20e478da) fix(app): skip sidebar animation on initial load ### 📊 Changes **1 file changed** (+14 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `app/ui/app/src/components/layout/layout.tsx` (+14 -5) </details> ### 📄 Description ## Summary Fixes #12954 - The sidebar was animating open on first load instead of appearing open immediately. ## Problem When the app loads, CSS transitions are applied immediately while settings are being fetched asynchronously. The sidebar starts with sidebarOpen: false (default), then transitions to sidebarOpen: true when settings load, causing an unwanted animation. ## Solution Added a hasMounted state that tracks whether the component has completed its initial render. CSS transition classes are only applied after the first paint using requestAnimationFrame. This ensures: - Initial render: Sidebar appears in correct state instantly (no animation) - Subsequent toggles: Sidebar animates smoothly as expected ## Testing - Open the app fresh - sidebar should appear open instantly without animation - Toggle sidebar button - should still animate smoothly --- <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-13 00:52:12 -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#14373