From 6a26396f0de2a977adb9928731cc9c3bb1b39e83 Mon Sep 17 00:00:00 2001 From: manukminasyan Date: Fri, 27 Mar 2026 21:32:05 +0400 Subject: [PATCH] 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. --- .../views/livewire/comment-item.blade.php | 47 +++++++++---------- resources/views/livewire/comments.blade.php | 42 ++++++++--------- tests/Feature/AttachmentUploadTest.php | 4 +- 3 files changed, 46 insertions(+), 47 deletions(-) diff --git a/resources/views/livewire/comment-item.blade.php b/resources/views/livewire/comment-item.blade.php index 4609be1..9a6c1d8 100644 --- a/resources/views/livewire/comment-item.blade.php +++ b/resources/views/livewire/comment-item.blade.php @@ -34,9 +34,9 @@ @if ($isEditing)
{{ $this->editForm }} -
+
+ -
@else @@ -107,36 +107,35 @@
{{ $this->replyForm }} - @if (\Relaticle\Comments\CommentsConfig::areAttachmentsEnabled()) -
- + @if (!empty($replyAttachments)) +
+ @foreach ($replyAttachments as $index => $file) +
+ {{ $file->getClientOriginalName() }} + +
+ @endforeach
- @if (!empty($replyAttachments)) -
- @foreach ($replyAttachments as $index => $file) -
- {{ $file->getClientOriginalName() }} - -
- @endforeach -
- @endif - @error('replyAttachments.*')

{{ $message }}

@enderror @endif -
+
+
+ @if (\Relaticle\Comments\CommentsConfig::areAttachmentsEnabled()) + + @endif + +
-
@endif diff --git a/resources/views/livewire/comments.blade.php b/resources/views/livewire/comments.blade.php index 2cb22e7..3764b17 100644 --- a/resources/views/livewire/comments.blade.php +++ b/resources/views/livewire/comments.blade.php @@ -63,34 +63,34 @@
{{ $this->commentForm }} - @if (\Relaticle\Comments\CommentsConfig::areAttachmentsEnabled()) -
- + @if (!empty($attachments)) +
+ @foreach ($attachments as $index => $file) +
+ {{ $file->getClientOriginalName() }} + +
+ @endforeach
- @if (!empty($attachments)) -
- @foreach ($attachments as $index => $file) -
- {{ $file->getClientOriginalName() }} - -
- @endforeach -
- @endif - @error('attachments.*')

{{ $message }}

@enderror @endif -
+
+ @if (\Relaticle\Comments\CommentsConfig::areAttachmentsEnabled()) + + @else +
+ @endif +