Skip to content

feat: add basic toast functionality inspired by pinesui#4

Merged
kauffinger merged 6 commits intomainfrom
feat/toast
Jun 29, 2025
Merged

feat: add basic toast functionality inspired by pinesui#4
kauffinger merged 6 commits intomainfrom
feat/toast

Conversation

@kauffinger
Copy link
Copy Markdown
Owner

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.php component for managing toast notifications. Below are the most important changes grouped by theme:

Documentation Updates:

  • Expanded the README.md to include a new section detailing the toast notification system, its setup, usage, and configuration options.

Feature Implementation:

  • Added the resources/views/components/toast.blade.php file, 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:

  • Updated app/Livewire/Chats/Show.php by adding toast notifications for share and unshare actions to provide feedback when a chat's visibility changes. [1] [2]

UI Enhancements:

  • Modified the resources/views/components/layouts/app/sidebar.blade.php file to include the toast container with a default position of top-right. This ensures the toast system is available across the application.

Minor Documentation Update:

  • Added a bullet point for "Toast Notifications" under the feature list in README.md to highlight the new functionality.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link

Copilot AI Jun 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copilot uses AI. Check for mistakes.
dismissible: true,
duration: 5000,
}
console.log(options)
Copy link

Copilot AI Jun 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the console.log statement if it is not intended for production to avoid unnecessary logging.

Suggested change
console.log(options)

Copilot uses AI. Check for mistakes.
@kauffinger kauffinger merged commit b3666bc into main Jun 29, 2025
2 checks passed
@kauffinger kauffinger deleted the feat/toast branch June 29, 2025 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants