Action Buttons on Database Notification migrate from V3 to V4 are not same

I just upgraded from Filament v3 to v4, but the notification database in the action button ui (the background) seems to be different. V4 has the background color, but V3 doesn't. Does anyone know how to make it the same?
No description
Solution:
This is my first github issue and sorry if my English is not very good. Hopefully you guys can understand clearly https://github.com/filamentphp/filament/issues/17600 Please let me know if anything needs improvement....
GitHub
Action button on database notification when upgrade from v3 to v4 a...
Package filament/filament Package Version v4.0.4 Laravel Version v12.26.3 Livewire Version v3.6.4 PHP Version 8.2.14 Breaking change description When sending notifications with action buttons to da...
Jump to solution
5 Replies
Dennis Koch
Dennis Koch2mo ago
The old one was ->link() the new one is ->button(). You can set that manually. Don’t know how to set it globally, though.
Sharpshooter
SharpshooterOP2mo ago
I did some digging and it turns out v4 uses filament::components.button.index while v3 uses filament-actions::button-action Had to run this code to make it the same:
use Illuminate\Notifications\DatabaseNotification;

DatabaseNotification::query()->get()->each(function (DatabaseNotification $notification) {
$data = $notification->data;

$data['actions'][0]['view'] = 'filament::components.button.index';
$notification->update([
'data' => $data
]);
});
use Illuminate\Notifications\DatabaseNotification;

DatabaseNotification::query()->get()->each(function (DatabaseNotification $notification) {
$data = $notification->data;

$data['actions'][0]['view'] = 'filament::components.button.index';
$notification->update([
'data' => $data
]);
});
Sharpshooter
SharpshooterOP2mo ago
This should probably be documented in the upgrade guide, right?https://filamentphp.com/docs/4.x/upgrade-guide
Dan Harrin
Dan Harrin2mo ago
Can you report it as an issue please on the repository please? You shouldnt need to run any scripts
Solution
Sharpshooter
Sharpshooter2mo ago
This is my first github issue and sorry if my English is not very good. Hopefully you guys can understand clearly https://github.com/filamentphp/filament/issues/17600 Please let me know if anything needs improvement. Reproduction repository is not yet available. I will add it tomorrow cuz I'm on phone right now
GitHub
Action button on database notification when upgrade from v3 to v4 a...
Package filament/filament Package Version v4.0.4 Laravel Version v12.26.3 Livewire Version v3.6.4 PHP Version 8.2.14 Breaking change description When sending notifications with action buttons to da...

Did you find this page helpful?