Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database Notifications - Customizable "Mark All as Read" Action #14157

Open
wants to merge 4 commits into
base: 4.x
Choose a base branch
from

Conversation

leandrocfe
Copy link
Contributor

Description

This feature introduces the databaseNotificationsMarkAllAsReadAction() method, which allows passing a closure that returns a custom action. It enables full customization of the Mark All as Read button using the same methods available for customizing trigger buttons.

public function panel(Panel $panel): Panel
{
    return $panel
        ...
        ->databaseNotifications()
        ->databaseNotificationsMarkAllAsReadAction(fn (Action $action) => $action
            ->button()
            ->outlined()
            ->size('sm')
            ->color('success')
        )
...

Visual changes

image

Functional changes

  • Code style has been fixed by running the composer cs command.
  • Changes have been tested to not break existing functionality.
  • Documentation is up-to-date.

@leandrocfe
Copy link
Contributor Author

If this is approved, I can also submit the Clear Notifications actions.

@danharrin danharrin added the enhancement New feature or request label Sep 8, 2024
@danharrin danharrin added this to the v4 milestone Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants