awcodes / filament-sticky-header

A Filament Panels plugin to make headers sticky when scrolling.
MIT License
54 stars 8 forks source link

EditRecord page and header actions in group #31

Closed dreftas closed 3 months ago

dreftas commented 5 months ago

Filament Version

v3.2.27

Plugin Version

v2.0.5

PHP Version

PHP 8.3

Problem description

If EditRecord page getHeaderActions() has ActionGroup it expands when header is not sticky, but won't work when header is sticky.

image

Expected behavior

ActionGroup should expand whenever header is sticky or not.

Steps to reproduce

Add StickyHeaderPlugin to panel provider:

$panel->plugin(Awcodes\FilamentStickyHeader\StickyHeaderPlugin::make());

In resource EditRecord page add header actions:

class EditMyModel extends EditRecord
{
    protected static string $resource = MyResource::class;

    protected function getHeaderActions(): array
    {
        return [
            \Filament\Actions\ActionGroup::make([
                \Filament\Actions\Action::make('Action 1'),
                \Filament\Actions\Action::make('Action 2'),
                \Filament\Actions\Action::make('Action 3'),
            ])->button()
        ];
    }
}

Scroll down in edit page (make sure form is big enough :) ) for header to be sticky, then try to press on action group.

Reproduction repository

No response

Relevant log output

No response

awcodes commented 5 months ago

Looked into this today. I'm afraid the fix isn't going to be simple. Will have to update the alpine floating ui package. And filament will have to update its dependency too.

But I'm working on it, just may not be something addressable quickly.

awcodes commented 3 months ago

There may still be a bug in the plugin, but can you update to the latest filament version and let me know if this is still an issue. Latest filament has updated alpine floating ui package to support v1 of floating-ui which might address this out of the box.

Thank you in advance.

dreftas commented 3 months ago

Yes, it is still an issue. However, I've noticed, that group menu appearing if sidebar is collapsed. It appears too low, but kind of works. I can't tell if it worked like this on older version.

image

awcodes commented 3 months ago

Thanks for letting me know. Will dig further soon.

awcodes commented 3 months ago

Closing this as I can no longer replicate it with latest Filament version.

Screenshot 2024-04-10 at 8 56 58 AM