pxlrbt / filament-spotlight

Quickly navigate your Filament pages
MIT License
239 stars 31 forks source link

Fix sidebar flicker #16

Closed austincarpenter closed 1 year ago

austincarpenter commented 1 year ago

This package's CSS rule for elements matching [x-cloak] conflicts with Filament's default of [x-cloak=""].

The reason this is a problem is because the admin sidebar now has x-cloak="-lg" which is only applied on non-lg screens to prevent a flicker on page load before Alpine initialises.

https://github.com/filamentphp/filament/blob/e1b3aea563a10ef1d094014c08043cd278ac94b8/packages/admin/resources/views/components/layouts/base.blade.php#L31

This PR tweaks the source spotlight.css file to ensure only elements with an x-cloak attribute without a value are matched and hidden.

austincarpenter commented 1 year ago

Have also added /node_modules to the .gitignore file as for me (and perhaps others) this is configured on a per-project basis instead of by the IDE.

pxlrbt commented 1 year ago

Thanks!