filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.6k stars 2.75k forks source link

Filament modals are ignoring configured alignment #2413

Closed bernhardh closed 2 years ago

bernhardh commented 2 years ago

Package

filament/filament

Package Version

v2.12.7

Laravel Version

v9.12.2

Livewire Version

v2.1.05

PHP Version

PHP 8

Bug description

Filament admin is ignoring or not using at all the filament.layout.forms.actions.alignment config setting on modals.

Steps to reproduce

Set in your filament config the alignment to center

   'layout' => [
        'forms' => [
            'actions' => [
                'alignment' => 'center',
            ],
        ],
    ],

And then open any modal which has a form inside.

Expected result:

The buttons should be centered exactly like the are on regular forms. So more or less like this:

image

Actual result

The buttons are on the left side:

image

danharrin commented 2 years ago

Fixed by #2415, please confirm

bernhardh commented 2 years ago

Now the button alignment is correct. Thanks!

The only issue now: Why has the button this weird border around it? Looks like it has a focus or something. Or is this a bug from my side?

https://user-images.githubusercontent.com/642292/168250096-a167c339-8be3-4bee-acdc-40a12bf2e443.mp4

danharrin commented 2 years ago

I don't believe it's a bug, I think it's default behaviour of x-trap to focus the first button?

bernhardh commented 2 years ago

Ok, it looks odd to me. But if its not a bug, but a feature, then I am ok with this :D. Thanks!