-
-
Notifications
You must be signed in to change notification settings - Fork 37
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
base: 3.x
Are you sure you want to change the base?
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.
| state, | ||
| isLoading: {}, | ||
| fullyLoaded: {}, | ||
| areFiltersOpen: false, |
Copilot
AI
Jan 14, 2026
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.
The areFiltersOpen property appears unused since the filters component creates its own scoped x-data="{ areFiltersOpen: ... }" context at line 58 of filters.blade.php. This global state property will not be accessible to the filters component due to Alpine.js scoping. Consider removing this unused property or clarifying the intended usage pattern.
| areFiltersOpen: false, |
| */ | ||
| public function getFiltersTriggerActionModifier(): ?Closure | ||
| { | ||
| return $this->modifyFiltersTriggerActionUsing; |
Copilot
AI
Jan 14, 2026
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.
The properties $this->modifyFiltersTriggerActionUsing and $this->modifyFiltersApplyActionUsing (line 80) are being accessed but are not defined in this trait. These properties should exist in the parent HasFilters trait from Filament. If they don't exist in the Filament version being used, these methods will cause undefined property errors. Verify that these properties are available in the Filament HasFilters trait, or add null-coalescing operators for safety (e.g., return $this->modifyFiltersTriggerActionUsing ?? null;).
| :max-height="$filtersFormMaxHeight" | ||
| placement="bottom-start" | ||
| shift | ||
| :flip="false" |
Copilot
AI
Jan 14, 2026
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.
The :flip="false" attribute explicitly disables dropdown flipping behavior. This differs from the previous implementation where this attribute was not set (allowing default flipping). Ensure this intentional change aligns with the desired UX, as it may cause dropdowns to overflow viewport bounds in constrained spaces rather than automatically flipping to stay visible.
| :flip="false" |
No description provided.