feat: add basic toast functionality inspired by pinesui#4
Merged
kauffinger merged 6 commits intomainfrom Jun 29, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new toast notification system to enhance user feedback across the application. The changes include a new toast Blade component with configurable options and positions, integration of toast notifications via Livewire in chat actions, and updated documentation to reflect the added functionality.
- Added the toast component (resources/views/components/toast.blade.php) supporting various configurations and transitions.
- Integrated toast dispatch events in Livewire components for chat share/unshare actions.
- Updated the sidebar to include the toast container and expanded the README documentation.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| resources/views/components/toast.blade.php | New toast component with Alpine.js functionality and configurable options. |
| resources/views/components/layouts/app/sidebar.blade.php | Inserts the toast container for global availability. |
| app/Livewire/Chats/Show.php | Dispatches toast notifications on chat share/unshare actions. |
| README.md | Documentation updates to explain the toast notification system. |
Comments suppressed due to low confidence (1)
README.md:155
- The component alias in the documentation does not match the usage in the sidebar. Consider updating to '' for consistency.
<x-toast.toast-container position="bottom-right" />
| {{-- | ||
| This component is inspired by | ||
| https://devdojo.com/pines and styled | ||
| in a way that looks consitent with FluxUI |
There was a problem hiding this comment.
Typo found: 'consitent' should be 'consistent' to improve clarity in the component description.
Suggested change
| in a way that looks consitent with FluxUI | |
| in a way that looks consistent with FluxUI |
| dismissible: true, | ||
| duration: 5000, | ||
| } | ||
| console.log(options) |
There was a problem hiding this comment.
Remove the console.log statement if it is not intended for production to avoid unnecessary logging.
Suggested change
| console.log(options) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new toast notification system to enhance user feedback across the application. It includes updates to documentation, integration into Livewire components, and the addition of a reusable
toast.blade.phpcomponent for managing toast notifications. Below are the most important changes grouped by theme:Documentation Updates:
README.mdto include a new section detailing the toast notification system, its setup, usage, and configuration options.Feature Implementation:
resources/views/components/toast.blade.phpfile, which defines the toast notification component. It supports configurable positions, variants, and dismissible options, with integration for Alpine.js and Livewire.Integration into Livewire Components:
app/Livewire/Chats/Show.phpby adding toast notifications forshareandunshareactions to provide feedback when a chat's visibility changes. [1] [2]UI Enhancements:
resources/views/components/layouts/app/sidebar.blade.phpfile to include the toast container with a default position oftop-right. This ensures the toast system is available across the application.Minor Documentation Update:
README.mdto highlight the new functionality.