From da9de3eb44de4621ead154390767150cca7c4b72 Mon Sep 17 00:00:00 2001 From: Abdelrhman Said Date: Sat, 5 Sep 2026 19:41:35 +0300 Subject: [PATCH 1/2] refactor: use Tabler 1.5 class names (tag-list) Tabler 1.5 renamed .tags-list to .tag-list (the old name is only kept as a deprecated alias). TagsColumn now emits the new class so the datatable markup does not rely on a deprecated selector, and a test pins the container class. The shipped datatables.js needs no change: it only listens for the native show.bs.dropdown event, which Bootstrap 5 still dispatches without the removed jQuery plugin bridge. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_0161d1SpsU8QKLFatykz8Z82 --- src/Datatables/src/Columns/TagsColumn.php | 2 +- tests/Unit/Packages/Datatables/ColumnTest.php | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Datatables/src/Columns/TagsColumn.php b/src/Datatables/src/Columns/TagsColumn.php index 0c27291..58eb8ef 100644 --- a/src/Datatables/src/Columns/TagsColumn.php +++ b/src/Datatables/src/Columns/TagsColumn.php @@ -54,6 +54,6 @@ protected function defaultGetter(mixed $value, Model $row): mixed $tags = $value->take($this->limit)->when($value->count() > $this->limit, fn ($collection) => $collection->push($this->ellipsis)); $tags = $tags->map(fn ($tag) => sprintf('%s', e($tag)))->join(''); - return sprintf('
%s
', $tags); + return sprintf('
%s
', $tags); } } diff --git a/tests/Unit/Packages/Datatables/ColumnTest.php b/tests/Unit/Packages/Datatables/ColumnTest.php index c226602..eeb9920 100644 --- a/tests/Unit/Packages/Datatables/ColumnTest.php +++ b/tests/Unit/Packages/Datatables/ColumnTest.php @@ -194,6 +194,15 @@ ->and($value)->toContain('safe'); }); +it('renders tags inside a tabler tag-list container', function () { + $row = new EmptyModel(['tags' => ['php', 'laravel']]); + + $value = TagsColumn::make('tags')->get($row); + + expect($value)->toStartWith('
') + ->and($value)->not->toContain('tags-list'); +}); + it('uses the custom searcher instead of the default like constraint', function () { $query = EmptyModel::query(); From 1a9447473697bd934f8cea8a29feff68c1d6ebb0 Mon Sep 17 00:00:00 2001 From: Abdelrhman Said <70618755+AbdelrhmanSaid@users.noreply.github.com> Date: Sat, 5 Sep 2026 21:03:34 +0300 Subject: [PATCH 2/2] Remove test for tags rendering in ColumnTest Removed test for rendering tags inside a tabler tag-list container. --- tests/Unit/Packages/Datatables/ColumnTest.php | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/Unit/Packages/Datatables/ColumnTest.php b/tests/Unit/Packages/Datatables/ColumnTest.php index eeb9920..c226602 100644 --- a/tests/Unit/Packages/Datatables/ColumnTest.php +++ b/tests/Unit/Packages/Datatables/ColumnTest.php @@ -194,15 +194,6 @@ ->and($value)->toContain('safe'); }); -it('renders tags inside a tabler tag-list container', function () { - $row = new EmptyModel(['tags' => ['php', 'laravel']]); - - $value = TagsColumn::make('tags')->get($row); - - expect($value)->toStartWith('
') - ->and($value)->not->toContain('tags-list'); -}); - it('uses the custom searcher instead of the default like constraint', function () { $query = EmptyModel::query();