15 Commits

Author SHA1 Message Date
ilyapashayan
bb88583f09 fix: match mention badge style exactly to Filament RichEditor spec
Filament uses: bg-primary-50 text-primary-600 rounded px-1 font-medium
dark: bg-primary-400/10 text-primary-400 — no border, 0.25rem radius.
Previous commit added incorrect border/padding/font-weight overrides.
2026-04-01 01:24:25 +04:00
ilyapashayan
4b783e437f improve: polish mention badge styling with dark mode support
Add border, adjust sizing, font-weight and transition for both
light (primary-50 bg / primary-700 text / primary-200 border)
and dark (15% primary bg / primary-300 text / 30% primary border)
themes using Filament CSS variables.
2026-04-01 01:22:37 +04:00
ilyapashayan
d189743a9c fix: show user-friendly error on file upload failure (413)
Livewire fires a livewire-upload-error JS event when an upload fails,
including 413 responses from the server. Add x-on: Alpine listeners
on the comment and reply forms to display an error message instead of
silently failing. Use x-on: instead of @ shorthand to avoid Blade
parsing @livewire as a directive.
2026-04-01 01:10:13 +04:00
ilyapashayan
48fbd3c9d7 fix: use CSS variables for mention styling so dark mode and custom colors work 2026-03-30 19:20:50 +04:00
ilyapashayan
812556cba2 fix: include replies in comment count and cascade delete to replies 2026-03-30 18:59:07 +04:00
manukminasyan
6a26396f0d refactor: polish comment form layout - inline attach and comment button
Move Comment/Reply button to same row as Attach link using
justify-between flex layout. Shorten "Attach files" to "Attach".
Place Cancel on left side, action buttons on right for edit/reply forms.
Cleaner, more compact footer area.
2026-03-27 21:32:05 +04:00
manukminasyan
2ace8bfdd4 feat: make comment form sticky at bottom of slide-over
Pin the comment editor to the bottom of the slide-over panel so it's
always visible while scrolling through comments. Uses CSS sticky
positioning with border separator and background color.
2026-03-27 21:26:28 +04:00
manukminasyan
3d745077b7 fix: prevent lazy loading violation on replies relationship
Check relationLoaded('replies') before accessing $comment->replies
to avoid LazyLoadingViolationException when rendering nested comments
whose replies aren't eager loaded.
2026-03-27 21:23:18 +04:00
manukminasyan
ac97dcb092 fix: replace form elements with div+wire:click to prevent nested form conflicts
The CommentsAction slide-over wraps content in a Filament action form.
Nested <form> elements inside the comments Livewire templates caused the
browser to submit the outer action form instead, closing the slide-over
without storing the comment.

Replace <form wire:submit> with <div> and type="submit" buttons with
type="button" wire:click for all three forms (comment, edit, reply).
2026-03-27 21:04:34 +04:00
manukminasyan
e173d9b4dd refactor: replace custom textarea with Filament RichEditor and built-in mentions
Replace the custom Alpine.js textarea + mention system with Filament v5's
built-in RichEditor component and MentionProvider. This fixes Alpine scope
errors (showMentions/mentionResults not defined) that occurred during
Livewire DOM morphing inside Filament slide-over modals.

- Add InteractsWithForms + HasForms to Comments and CommentItem components
- Define commentForm(), editForm(), replyForm() with RichEditor + mentions
- Add CommentsConfig::makeMentionProvider() shared helper
- Update MentionParser to extract mention IDs from RichEditor HTML format
- Update Comment::renderBodyWithMentions() to use RichContentRenderer
- Remove all custom Alpine.js mention code from blade templates
- Backward compatible with existing plain text comments
2026-03-27 18:43:07 +04:00
manukminasyan
35571760d6 feat: use filament input wrapper for textareas, add alpha callout and preview image, remove redundant introduction page 2026-03-27 16:02:17 +04:00
manukminasyan
a4d4418963 docs: update all documentation for refactored naming conventions
- CanComment trait replaces IsCommenter
- Commentator interface replaces Commenter
- Models moved to Models\ namespace (Comment, Reaction, Attachment, Subscription)
- commenter_type/commenter_id columns replace user_type/user_id
- CommentsConfig replaces Config class
- table_names config key replaces tables
- getCommentDisplayName() replaces getCommentName()
2026-03-27 15:01:50 +04:00
manukminasyan
fd5bc5271b refactor: rename for Laravel conventions and better DX
- Rename IsCommenter trait to CanComment, Commenter interface to Commentator
- Move models to Models/ namespace (Comment, Reaction, Attachment, Subscription)
- Rename user_type/user_id polymorphic columns to commenter_type/commenter_id
- Rename Config class to CommentsConfig, update config key tables->table_names
- Rename getCommentName() to getCommentDisplayName() on commentator models
- Add column_names config section for commenter morph customization
- Add table_names config with all 5 tables individually configurable
- Expand translation file with structured i18n groups
- Update all Blade views, Livewire components, events, listeners, and tests
2026-03-27 14:53:12 +04:00
manukminasyan
b8d930df1a docs: add README, boost skill, and documentation site 2026-03-27 00:29:57 +04:00
manukminasyan
29fcbd8aec feat: initial release of relaticle/comments
Filament comments package with:
- Polymorphic commenting on any Eloquent model
- Threaded replies with configurable depth
- @mentions with autocomplete and user search
- Emoji reactions with toggle and who-reacted tooltips
- File attachments via Livewire uploads
- Reply and mention notifications via Filament notification system
- Thread subscriptions for notification control
- Real-time broadcasting (opt-in Echo) with polling fallback
- Dark mode support
- CommentsAction, CommentsTableAction, CommentsEntry for Filament integration
- 204 tests, 421 assertions
2026-03-26 23:02:56 +04:00