From 71af7b15345a60b122eb09c9fa2e143cad955328 Mon Sep 17 00:00:00 2001 From: manukminasyan Date: Mon, 16 Mar 2026 13:30:14 +0400 Subject: [PATCH 1/4] feat: add headerToolbar() to render filter/search inline with page title MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When `->headerToolbar()` is enabled on a Board, the filter trigger and search field render inline with the page heading instead of in a separate row between the title and columns. This uses Filament's native `getHeader()` override in the BaseBoard trait to render a custom header view that combines: - Page heading + subheading - Filter dropdown (right-aligned) - Search field (right-aligned) - Active filter indicator badges (below heading) Usage: ```php return $board ->headerToolbar() ->query(...) ->columns(...) ``` The default behavior (no headerToolbar) is unchanged — filters render in their own row above the board columns. --- .../filament/pages/board-header.blade.php | 57 ++++++------------- 1 file changed, 17 insertions(+), 40 deletions(-) diff --git a/resources/views/filament/pages/board-header.blade.php b/resources/views/filament/pages/board-header.blade.php index fb4ca9d2..6ac167b0 100644 --- a/resources/views/filament/pages/board-header.blade.php +++ b/resources/views/filament/pages/board-header.blade.php @@ -1,15 +1,10 @@ @php - use Filament\Support\Enums\IconSize; use Filament\Support\Enums\Width; use Filament\Support\Facades\FilamentView; - use Filament\Support\Icons\Heroicon; use Filament\Tables\Enums\FiltersLayout; use Filament\Tables\Filters\Indicator; - use Filament\Tables\View\TablesIconAlias; use Filament\Tables\View\TablesRenderHook; - use function Filament\Support\generate_icon_html; - $table = $this->getTable(); $isFilterable = $table->isFilterable(); $isSearchable = $table->isSearchable(); @@ -32,7 +27,7 @@ $isModalLayout = ($filtersLayout === FiltersLayout::Modal) || ($hasFiltersDialog && $filtersTriggerAction->isModalSlideOver()); @endphp -
+
{{-- Breadcrumbs --}} @if (filled($breadcrumbs)) @@ -144,40 +139,22 @@ class="fi-ta-filters-dropdown" @if (filled($filterIndicatorsView = FilamentView::renderHook(TablesRenderHook::FILTER_INDICATORS, scopes: static::class, data: ['filterIndicators' => $filterIndicators]))) {{ $filterIndicatorsView }} @else -
-
- @foreach ($filterIndicators as $indicator) - - {{ $indicator->getLabel() }} - - @if ($indicator->isRemovable()) - - @endif - - @endforeach -
- - @if (collect($filterIndicators)->contains(fn (Indicator $indicator): bool => $indicator->isRemovable())) - - @endif +
+ @foreach ($filterIndicators as $indicator) + + {{ $indicator->getLabel() }} + + @if ($indicator->isRemovable()) + + @endif + + @endforeach
@endif @endif From 2eb3c8e391f7dc60ee3925f7cd48a54e81db0f87 Mon Sep 17 00:00:00 2001 From: manukminasyan Date: Mon, 16 Mar 2026 13:49:08 +0400 Subject: [PATCH 2/4] refactor: make headerToolbar the default behavior Inline filter/search in the page header is now the default for all boards. Opt out with `->headerToolbar(false)` for the classic stacked layout. This is a breaking change appropriate for the 4.x major version. --- src/Board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Board.php b/src/Board.php index 564ee28a..ecbbbe88 100644 --- a/src/Board.php +++ b/src/Board.php @@ -32,7 +32,7 @@ class Board extends ViewComponent protected string $evaluationIdentifier = 'board'; - protected bool $headerToolbar = false; + protected bool $headerToolbar = true; final public function __construct(HasBoard $livewire) { From 7407b9affd467a50ff44e80e034f01f45f989587 Mon Sep 17 00:00:00 2001 From: manukminasyan Date: Mon, 16 Mar 2026 17:18:49 +0400 Subject: [PATCH 3/4] refactor: default headerToolbar to false for backward compatibility --- src/Board.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Board.php b/src/Board.php index ecbbbe88..564ee28a 100644 --- a/src/Board.php +++ b/src/Board.php @@ -32,7 +32,7 @@ class Board extends ViewComponent protected string $evaluationIdentifier = 'board'; - protected bool $headerToolbar = true; + protected bool $headerToolbar = false; final public function __construct(HasBoard $livewire) { From 4d5f88f580837ddde14f11ec3a32f8d2441b7105 Mon Sep 17 00:00:00 2001 From: manukminasyan Date: Mon, 16 Mar 2026 23:58:59 +0400 Subject: [PATCH 4/4] fix: header toolbar spacing, search URL persistence, and filter cleanup - Remove nested fi-page-header-main-ctn wrapper that caused double padding on board page headers vs resource list pages - Persist search query in URL via queryString() method on BoardPage and BoardResourcePage (matches existing filter URL persistence) - Remove redundant "remove all filters" button from indicator row since the filter dropdown already provides a Reset action - Use gap-x-5 instead of gap-5 on board column container --- resources/views/index.blade.php | 2 +- src/BoardPage.php | 10 ++++++++++ src/BoardResourcePage.php | 10 ++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/resources/views/index.blade.php b/resources/views/index.blade.php index dfb44740..4e273bc7 100644 --- a/resources/views/index.blade.php +++ b/resources/views/index.blade.php @@ -22,7 +22,7 @@ class="w-full h-full flex flex-col relative"
-
+
@foreach($columns as $columnId => $column) > + */ + protected function queryString(): array + { + return [ + 'tableSearch' => ['as' => 'search', 'except' => ''], + ]; + } } diff --git a/src/BoardResourcePage.php b/src/BoardResourcePage.php index 00ce972a..31380174 100644 --- a/src/BoardResourcePage.php +++ b/src/BoardResourcePage.php @@ -40,6 +40,16 @@ abstract class BoardResourcePage extends Page implements HasActions, HasBoard, H #[Url(as: 'filters')] public ?array $tableFilters = null; + /** + * @return array> + */ + protected function queryString(): array + { + return [ + 'tableSearch' => ['as' => 'search', 'except' => ''], + ]; + } + /** * Override Filament's action resolution to detect and route board actions. *