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

Add persistent and seconds methods to Toast notification #2974

Merged
merged 2 commits into from
Mar 13, 2025
Merged

Conversation

tabuna
Copy link
Member

@tabuna tabuna commented Mar 13, 2025

What’s New

This PR introduces two new methods to improve the Toast notification system:

  • persistent(bool $persistent = true): Prevents the toast from auto-hiding, keeping it visible until dismissed manually.
  • seconds(int $seconds): Allows setting the toast delay in seconds instead of milliseconds for better readability.

Why?

These additions provide more flexibility in managing toast notifications, making it easier to configure their behavior without manually handling milliseconds or overriding auto-hide settings.

Changes

  • Added the persistent method to toggle auto-hide behavior.
  • Added the seconds method to simplify delay configuration.
  • Added/updated test cases to ensure proper functionality.

How to Test

Run the test suite to verify that toast notifications behave as expected with the new methods.

This update improves usability while maintaining backward compatibility. 🚀

@tabuna tabuna merged commit 9224f77 into master Mar 13, 2025
@tabuna tabuna deleted the toast branch March 13, 2025 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant