filament icon indicating copy to clipboard operation
filament copied to clipboard

On mobile, filament panel loads with sidebar expanded

Open Persaeus opened this issue 1 year ago • 1 comments

Package

filament/filament

Package Version

v3.2.128

Laravel Version

v11.34.2

Livewire Version

v3.5.12

PHP Version

PHP 8.4.1

Problem description

The page loads with the sidebar expanded by default on mobile...

https://github.com/user-attachments/assets/6ecf2e3b-3d79-4170-ac19-13b390665ef4

The reason, is that the sidebar's isOpen parameter is initialized as true:

https://github.com/filamentphp/filament/blob/0a867664655559540fbb18506002652caa2efd03/packages/panels/resources/js/index.js#L7

Expected behavior

The page should load normally and not be obscured by the sidebar slideover. The sidebar navigation can be accessed by clicking on the hamburger button

Steps to reproduce

  1. Open new browser window with private/incognito mode, so localStorage is empty
  2. Use a mobile browser, or use something like "Responsive Design Mode" to simulate narrow screen width
  3. Navigate to any panel page
  4. Observe that the page loads with sidebar expanded

Reproduction repository (issue will be closed if this is not valid)

https://github.com/filamentphp/demo

Relevant log output

No response

Persaeus avatar Dec 11 '24 05:12 Persaeus

Confirming this is still an issue with Filament 4 beta 5. I'm building a desktop app with NativePHP + Filament and the app always opens with the sidebar open.

binaryfire avatar Jun 17 '25 15:06 binaryfire

Changed the v4 default, I am too afraid to do so in v3 though #16647

danharrin avatar Jun 22 '25 17:06 danharrin