From db98907c038e227c05be2528a887f7a7a8f79acf Mon Sep 17 00:00:00 2001 From: Hammad Zafar <75698921+hammadzafar05@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:33:29 +0500 Subject: [PATCH 1/9] Updated Docs for enabling automatic dispatch of DatabaseNotificationsSent event - Added `isEventDispatched` flag to `sendToDatabase` method. - Allows automatic dispatch of `DatabaseNotificationsSent` event upon sending notifications to the database. - Simplifies the process of real-time notification updates via websockets. --- packages/notifications/docs/03-database-notifications.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/notifications/docs/03-database-notifications.md b/packages/notifications/docs/03-database-notifications.md index ac78b307f0..f9677b8d66 100644 --- a/packages/notifications/docs/03-database-notifications.md +++ b/packages/notifications/docs/03-database-notifications.md @@ -143,18 +143,16 @@ DatabaseNotifications::pollingInterval(null); Alternatively, the package has a native integration with [Laravel Echo](https://laravel.com/docs/broadcasting#client-side-installation). Make sure Echo is installed, as well as a [server-side websockets integration](https://laravel.com/docs/broadcasting#server-side-installation) like Pusher. Once websockets are set up, after sending a database notification you may dispatch a `DatabaseNotificationsSent` event, which will immediately fetch new notifications for that user: +Once websockets are set up, you can automatically dispatch a `DatabaseNotificationsSent` event by setting the `isEventDispatched` parameter to `true` when sending the notification. This will trigger the immediate fetching of new notifications for the user: ```php -use Filament\Notifications\Events\DatabaseNotificationsSent; use Filament\Notifications\Notification; $recipient = auth()->user(); Notification::make() ->title('Saved successfully') - ->sendToDatabase($recipient); - -event(new DatabaseNotificationsSent($recipient)); + ->sendToDatabase($recipient, isEventDispatched: true); ``` ## Marking database notifications as read From 4a1d90ef2bea63a2ce2113e83667200176a8ab6f Mon Sep 17 00:00:00 2001 From: Hammad Zafar <75698921+hammadzafar05@users.noreply.github.com> Date: Thu, 26 Sep 2024 13:35:11 +0500 Subject: [PATCH 2/9] Update 03-database-notifications.md --- packages/notifications/docs/03-database-notifications.md | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/notifications/docs/03-database-notifications.md b/packages/notifications/docs/03-database-notifications.md index f9677b8d66..f846c67047 100644 --- a/packages/notifications/docs/03-database-notifications.md +++ b/packages/notifications/docs/03-database-notifications.md @@ -142,7 +142,6 @@ DatabaseNotifications::pollingInterval(null); Alternatively, the package has a native integration with [Laravel Echo](https://laravel.com/docs/broadcasting#client-side-installation). Make sure Echo is installed, as well as a [server-side websockets integration](https://laravel.com/docs/broadcasting#server-side-installation) like Pusher. -Once websockets are set up, after sending a database notification you may dispatch a `DatabaseNotificationsSent` event, which will immediately fetch new notifications for that user: Once websockets are set up, you can automatically dispatch a `DatabaseNotificationsSent` event by setting the `isEventDispatched` parameter to `true` when sending the notification. This will trigger the immediate fetching of new notifications for the user: ```php From 5d7d683cc03c3ee0d9ed14dbc57a773ac32b4348 Mon Sep 17 00:00:00 2001 From: agencetwogether <53862310+agencetwogether@users.noreply.github.com> Date: Sun, 29 Sep 2024 21:20:43 +0200 Subject: [PATCH 3/9] Adding fi-ta-summary-heading new hook class When using summarize() in TextColumn, a new row inserted below table. To make easy sibling cell with 'Summary' text, I add a new hook class fi-ta-summary-heading. What do you think ? --- .../tables/resources/views/components/summary/row.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tables/resources/views/components/summary/row.blade.php b/packages/tables/resources/views/components/summary/row.blade.php index ac0b74a7a7..91a46cfa9d 100644 --- a/packages/tables/resources/views/components/summary/row.blade.php +++ b/packages/tables/resources/views/components/summary/row.blade.php @@ -92,7 +92,7 @@ > @if ($loop->first && (! $extraHeadingColumn) && (! $groupsOnly)) {{ $heading }} From 0b0ce7a8cf1f4aca86ec1db28d61eb176d96e6ef Mon Sep 17 00:00:00 2001 From: Florian Raith Date: Mon, 30 Sep 2024 22:48:13 +0200 Subject: [PATCH 4/9] Display url when issue page can't be opened in browser --- .../support/src/Commands/MakeIssueCommand.php | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/packages/support/src/Commands/MakeIssueCommand.php b/packages/support/src/Commands/MakeIssueCommand.php index f876fcc616..d9f6e77117 100644 --- a/packages/support/src/Commands/MakeIssueCommand.php +++ b/packages/support/src/Commands/MakeIssueCommand.php @@ -15,25 +15,37 @@ class MakeIssueCommand extends Command public function handle(): void { - $this->openUrlInBrowser('https://github.com/filamentphp/filament/issues/new?' . http_build_query([ - 'template' => 'bug_report.yml', - 'package-version' => InstalledVersions::getPrettyVersion('filament/support'), - 'laravel-version' => InstalledVersions::getPrettyVersion('laravel/framework'), - 'livewire-version' => InstalledVersions::getPrettyVersion('livewire/livewire'), - 'php-version' => PHP_VERSION, - ])); + $url = 'https://github.com/filamentphp/filament/issues/new?' . http_build_query([ + 'template' => 'bug_report.yml', + 'package-version' => InstalledVersions::getPrettyVersion('filament/support'), + 'laravel-version' => InstalledVersions::getPrettyVersion('laravel/framework'), + 'livewire-version' => InstalledVersions::getPrettyVersion('livewire/livewire'), + 'php-version' => PHP_VERSION, + ]); + + $result = $this->openUrlInBrowser($url); + + if ($result !== 0) { + $this->components->error('An error occurred while trying to open the issue page in your browser.'); + $this->output->writeln(' Please open the following URL in your browser:'); + $this->output->writeln(' ' . $url . ''); + } } - public function openUrlInBrowser(string $url): void + public function openUrlInBrowser(string $url): int { + $result = -1; + if (PHP_OS_FAMILY === 'Darwin') { - exec('open "' . $url . '"'); + exec('open "' . $url . '"', result_code: $result); } if (PHP_OS_FAMILY === 'Linux') { - exec('xdg-open "' . $url . '"'); + exec('xdg-open "' . $url . '"', result_code: $result); } if (PHP_OS_FAMILY === 'Windows') { - exec('start "" "' . $url . '"'); + exec('start "" "' . $url . '"', result_code: $result); } + + return $result; } } From 5a7f7b1b08f43bde0a70e0ce895584d7ee9d882c Mon Sep 17 00:00:00 2001 From: Florian Raith Date: Mon, 30 Sep 2024 23:02:32 +0200 Subject: [PATCH 5/9] Format code --- packages/support/src/Commands/MakeIssueCommand.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/support/src/Commands/MakeIssueCommand.php b/packages/support/src/Commands/MakeIssueCommand.php index d9f6e77117..d6dc36f163 100644 --- a/packages/support/src/Commands/MakeIssueCommand.php +++ b/packages/support/src/Commands/MakeIssueCommand.php @@ -16,12 +16,12 @@ class MakeIssueCommand extends Command public function handle(): void { $url = 'https://github.com/filamentphp/filament/issues/new?' . http_build_query([ - 'template' => 'bug_report.yml', - 'package-version' => InstalledVersions::getPrettyVersion('filament/support'), - 'laravel-version' => InstalledVersions::getPrettyVersion('laravel/framework'), - 'livewire-version' => InstalledVersions::getPrettyVersion('livewire/livewire'), - 'php-version' => PHP_VERSION, - ]); + 'template' => 'bug_report.yml', + 'package-version' => InstalledVersions::getPrettyVersion('filament/support'), + 'laravel-version' => InstalledVersions::getPrettyVersion('laravel/framework'), + 'livewire-version' => InstalledVersions::getPrettyVersion('livewire/livewire'), + 'php-version' => PHP_VERSION, + ]); $result = $this->openUrlInBrowser($url); From 88abf26b517f9cce019ef61912219b38d5f903f0 Mon Sep 17 00:00:00 2001 From: Zep Fietje Date: Tue, 1 Oct 2024 12:09:18 +0200 Subject: [PATCH 6/9] Extract base stylesheet --- packages/panels/resources/css/base.css | 10 ++++++++++ packages/panels/resources/css/index.css | 19 +++++-------------- 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 packages/panels/resources/css/base.css diff --git a/packages/panels/resources/css/base.css b/packages/panels/resources/css/base.css new file mode 100644 index 0000000000..c0aa252bc2 --- /dev/null +++ b/packages/panels/resources/css/base.css @@ -0,0 +1,10 @@ +@layer base { + :root.dark { + color-scheme: dark; + } + + /* When scrolling to validation error, do not hide element behind the top bar */ + [data-field-wrapper] { + scroll-margin-top: 8rem; + } +} diff --git a/packages/panels/resources/css/index.css b/packages/panels/resources/css/index.css index 32a7b84c76..2f0da59230 100644 --- a/packages/panels/resources/css/index.css +++ b/packages/panels/resources/css/index.css @@ -1,15 +1,6 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; -@tailwind variants; +@import 'tailwindcss/base'; +@import 'tailwindcss/components'; +@import 'tailwindcss/utilities'; +@import 'tailwindcss/variants'; -@layer base { - :root.dark { - color-scheme: dark; - } - - /* When scrolling to validation error, do not hide element behind the top bar */ - [data-field-wrapper] { - scroll-margin-top: 8rem; - } -} +@import 'base.css'; From 96c21dcef534c45e8dc5cf8b39e6e1911fcba1eb Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Mon, 7 Oct 2024 13:22:18 +0100 Subject: [PATCH 7/9] Update FUNDING.yml --- .github/FUNDING.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 2f87aae1db..3be9e4c9e4 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,2 +1,2 @@ -github: [danharrin, zepfietje] +github: [danharrin] polar: filamentphp From a627b314d275abeec92eff8269bbb9e22606ea67 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Mon, 7 Oct 2024 13:36:36 +0100 Subject: [PATCH 8/9] Update row.blade.php --- .../tables/resources/views/components/summary/row.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tables/resources/views/components/summary/row.blade.php b/packages/tables/resources/views/components/summary/row.blade.php index 91a46cfa9d..40024c3d2e 100644 --- a/packages/tables/resources/views/components/summary/row.blade.php +++ b/packages/tables/resources/views/components/summary/row.blade.php @@ -44,7 +44,7 @@ - + {{ $heading }} From 1fb8d06c0be2ee436955f6775c8546db17294d98 Mon Sep 17 00:00:00 2001 From: Dan Harrin Date: Mon, 7 Oct 2024 13:36:57 +0100 Subject: [PATCH 9/9] Update packages/tables/resources/views/components/summary/row.blade.php --- .../tables/resources/views/components/summary/row.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/tables/resources/views/components/summary/row.blade.php b/packages/tables/resources/views/components/summary/row.blade.php index 40024c3d2e..9a8556a468 100644 --- a/packages/tables/resources/views/components/summary/row.blade.php +++ b/packages/tables/resources/views/components/summary/row.blade.php @@ -92,7 +92,7 @@ > @if ($loop->first && (! $extraHeadingColumn) && (! $groupsOnly)) {{ $heading }}