-
-
Notifications
You must be signed in to change notification settings - Fork 38
Fix/filters layout support #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
No description provided.