Conversation
Add support for different filter layout options following Filament v4's exact pattern. Now supports: - FiltersLayout::Dropdown (default) - filters in dropdown button - FiltersLayout::Modal - filters in modal dialog - FiltersLayout::AboveContent - inline filters above board - FiltersLayout::AboveContentCollapsible - collapsible filters above board - FiltersLayout::Hidden - hide filters completely This fixes the issue where filtersLayout() was documented but not working because the view always rendered filters as a dropdown. Fixes: #72
- extend HasFilters trait instead of duplicating methods - override only filters() to skip table binding (board isn't a table) - pass all filter config to table: columns, maxHeight, resetPosition, deferFilters, persistInSession, deselectWhenFiltered - support action modifiers for trigger and apply buttons - add all 9 FiltersLayout variants to view: before/after content sidebars
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive support for various Filament filter layouts to the Flowforge board component. Previously, the board only supported a basic dropdown filter layout; now it fully supports all of Filament's filter layouts including modal, sidebar (before/after content), above/below content, and collapsible variants.
Changes:
- Extended
HasBoardFilterstrait to properly leverage Filament'sHasFilterstrait and expose filter action modifiers - Updated
InteractsWithBoardTableto pass all filter configuration options from the board to the table - Completely rewrote the filters Blade template to support all Filament v4 filter layouts (dropdown, modal, sidebars, above/below content, collapsible variants)
- Added
areFiltersOpenstate to the Alpine.js component (though this appears unused due to scoped x-data in the Blade template)
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Concerns/HasBoardFilters.php | Extends Filament's HasFilters trait properly by overriding the filters() method to avoid table binding, and adds getters for filter action modifiers |
| src/Concerns/InteractsWithBoardTable.php | Passes comprehensive filter configuration from board to table including layout, form options, trigger/apply actions, and behavior flags |
| resources/views/components/filters.blade.php | Complete rewrite to support all Filament v4 filter layouts with proper structure, styling, and Alpine.js interactivity matching Filament's patterns |
| resources/js/flowforge.js | Adds areFiltersOpen property to Alpine component state (appears unused) |
| resources/dist/flowforge.js | Compiled/minified version of the JS changes |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
enable shareable filter state via Livewire #[Url] attribute
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.