Skip to content

Commit 67ee4a9

Browse files
committed
Final tweaks
1 parent 4655e85 commit 67ee4a9

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Commentions is a drop-in package for Filament that allows you to add comments to your resources. You can configure it so your users are mentionable in the comments, and it dispatches events so you can handle mentions in your own application however you like.
1010

11-
![](screenshots/comments.png)
11+
![](screenshots/comments-demo.png)
1212

1313
## Installation
1414

resources/dist/commentions.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

resources/views/reactions.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
x-cloak
77
wire:click="handleReactionToggle('{{ $reactionData['reaction'] }}')"
88
type="button"
9-
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:border comm:px-2 comm:h-8 comm:text-sm comm:font-medium comm:transition comm:focus:outline-none comm:focus:ring-2 comm:focus:ring-offset-2 comm:disabled:opacity-50 comm:disabled:cursor-not-allowed
9+
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:border comm:px-2 comm:h-8 comm:text-xs comm:font-medium comm:transition comm:focus:outline-none comm:focus:ring-2 comm:focus:ring-offset-2 comm:disabled:opacity-50 comm:disabled:cursor-not-allowed
1010
{{ $reactionData['reacted_by_current_user']
1111
? 'comm:bg-gray-50 comm:dark:bg-gray-800 comm:border-gray-300 comm:dark:border-gray-600 comm:text-gray-700 comm:dark:text-gray-200 comm:hover:bg-gray-200 comm:dark:hover:bg-gray-600'
1212
: 'comm:bg-white comm:dark:bg-gray-900 comm:border-gray-300 comm:dark:border-gray-600 comm:text-gray-700 comm:dark:text-gray-200 comm:hover:bg-gray-100 comm:dark:hover:bg-gray-600' }}"
@@ -25,7 +25,7 @@ class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:ro
2525
x-on:click="open = !open"
2626
type="button"
2727
@disabled(! auth()->check())
28-
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:border comm:border-gray-300 comm:dark:border-gray-600 comm:bg-white comm:dark:bg-gray-900 comm:w-8 comm:h-8 comm:text-sm comm:font-medium comm:text-gray-700 comm:dark:text-gray-200 comm:transition comm:hover:bg-gray-100 comm:dark:hover:bg-gray-700 comm:focus:outline-none comm:focus:ring-2 comm:focus:ring-offset-2 comm:disabled:opacity-50 comm:disabled:cursor-not-allowed"
28+
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:border comm:border-gray-300 comm:dark:border-gray-600 comm:bg-white comm:dark:bg-gray-900 comm:w-8 comm:h-8 comm:text-xs comm:font-medium comm:text-gray-700 comm:dark:text-gray-200 comm:transition comm:hover:bg-gray-100 comm:dark:hover:bg-gray-700 comm:focus:outline-none comm:focus:ring-2 comm:focus:ring-offset-2 comm:disabled:opacity-50 comm:disabled:cursor-not-allowed"
2929
title="Add Reaction"
3030
wire:key="add-reaction-button-{{ $comment->getId() }}"
3131
>
@@ -52,7 +52,7 @@ class="comm:absolute comm:bottom-full comm:mb-2 comm:z-10 comm:bg-white comm:dar
5252
x-on:click="open = false"
5353
type="button"
5454
@disabled(! auth()->check())
55-
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:w-8 comm:h-8 comm:text-sm comm:font-medium comm:transition comm:focus:outline-none comm:focus:ring-2 comm:focus:ring-offset-2 comm:disabled:opacity-50 comm:disabled:cursor-not-allowed
55+
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:w-8 comm:h-8 comm:text-xs comm:font-medium comm:transition comm:focus:outline-none comm:focus:ring-2 comm:focus:ring-offset-2 comm:disabled:opacity-50 comm:disabled:cursor-not-allowed
5656
{{ $reactionData['reacted_by_current_user']
5757
? 'comm:text-gray-700 comm:dark:text-gray-200 comm:hover:bg-gray-200 comm:dark:hover:bg-gray-600'
5858
: 'comm:text-gray-700 comm:dark:text-gray-200 comm:hover:bg-gray-100 comm:dark:hover:bg-gray-600' }}"
@@ -70,7 +70,7 @@ class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:ro
7070
@if (! in_array($reactionEmoji, $allowedReactions) && $data['count'] > 0)
7171
<span
7272
wire:key="reaction-extra-{{ $reactionEmoji }}-{{ $comment->getId() }}"
73-
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:border comm:border-gray-300 comm:dark:border-gray-600 comm:bg-gray-100 comm:dark:bg-gray-800 comm:px-2 comm:h-8 comm:text-sm comm:font-medium comm:text-gray-600 comm:dark:text-gray-300"
73+
class="comm:inline-flex comm:items-center comm:justify-center comm:gap-1 comm:rounded-full comm:border comm:border-gray-300 comm:dark:border-gray-600 comm:bg-gray-100 comm:dark:bg-gray-800 comm:px-2 comm:h-8 comm:text-xs comm:font-medium comm:text-gray-600 comm:dark:text-gray-300"
7474
title="{{ $reactionEmoji }}"
7575
>
7676
<span>{{ $reactionEmoji }}</span>

screenshots/comments-demo.png

48.2 KB
Loading

screenshots/comments.png

-151 KB
Binary file not shown.

src/Actions/ParseComment.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function ($match) {
2525
// if "text-xs" is not already present.
2626
$updatedTag = preg_replace_callback(
2727
'/class="([^"]*)"/i',
28-
fn () => 'class="p-1 bg-blue-100 text-gray-600 rounded-lg text-xs"',
28+
fn () => 'class="comm:p-1 comm:bg-blue-100 comm:text-gray-600 comm:rounded-lg comm:text-xs"',
2929
$originalTag,
3030
1,
3131
);

0 commit comments

Comments
 (0)