From f9ee7aefd6d5dacbed119e404778553c67af3d2c Mon Sep 17 00:00:00 2001 From: Theofanis <6011795+theofanisv@users.noreply.github.com> Date: Tue, 3 Feb 2026 20:53:26 +0000 Subject: [PATCH 1/2] config to hide sidebar --- config/commentions.php | 1 + src/Livewire/Concerns/HasSidebar.php | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config/commentions.php b/config/commentions.php index 5d4449b..a865f16 100644 --- a/config/commentions.php +++ b/config/commentions.php @@ -52,6 +52,7 @@ 'dispatch_as_mention' => env('COMMENTIONS_SUBSCRIPTIONS_DISPATCH_AS_MENTION', false), // Controls whether the subscribers list is shown in the sidebar UI 'show_subscribers' => env('COMMENTIONS_SUBSCRIPTIONS_SHOW_SUBSCRIBERS', true), + 'show_sidebar' => env('COMMENTIONS_SUBSCRIPTIONS_SHOW_SIDEBAR'), // Automatically subscribe the author when they add a comment 'auto_subscribe_on_comment' => env('COMMENTIONS_SUBSCRIPTIONS_AUTO_SUBSCRIBE_ON_COMMENT', true), // Automatically subscribe a user when they are mentioned in a comment diff --git a/src/Livewire/Concerns/HasSidebar.php b/src/Livewire/Concerns/HasSidebar.php index e374ab5..25a5684 100644 --- a/src/Livewire/Concerns/HasSidebar.php +++ b/src/Livewire/Concerns/HasSidebar.php @@ -17,9 +17,7 @@ trait HasSidebar public function mountHasSidebar(?bool $enableSidebar = null, ?bool $showSubscribers = null): void { - if ($enableSidebar !== null) { - $this->sidebarEnabled = $enableSidebar; - } + $this->sidebarEnabled = $enableSidebar ?? config('commentions.subscriptions.show_sidebar'); $this->showSubscribers = $showSubscribers ?? (bool) config('commentions.subscriptions.show_subscribers', true); } From faba793630fd729fa897ef6e61cecb0a710996bd Mon Sep 17 00:00:00 2001 From: Theofanis <6011795+theofanisv@users.noreply.github.com> Date: Fri, 6 Feb 2026 21:11:39 +0200 Subject: [PATCH 2/2] Set default value for show_sidebar to true --- config/commentions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/commentions.php b/config/commentions.php index a865f16..361654a 100644 --- a/config/commentions.php +++ b/config/commentions.php @@ -52,7 +52,7 @@ 'dispatch_as_mention' => env('COMMENTIONS_SUBSCRIPTIONS_DISPATCH_AS_MENTION', false), // Controls whether the subscribers list is shown in the sidebar UI 'show_subscribers' => env('COMMENTIONS_SUBSCRIPTIONS_SHOW_SUBSCRIBERS', true), - 'show_sidebar' => env('COMMENTIONS_SUBSCRIPTIONS_SHOW_SIDEBAR'), + 'show_sidebar' => env('COMMENTIONS_SUBSCRIPTIONS_SHOW_SIDEBAR', true), // Automatically subscribe the author when they add a comment 'auto_subscribe_on_comment' => env('COMMENTIONS_SUBSCRIPTIONS_AUTO_SUBSCRIBE_ON_COMMENT', true), // Automatically subscribe a user when they are mentioned in a comment