⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@ManukMinasyan
Copy link
Contributor

No description provided.

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
Copilot AI review requested due to automatic review settings January 14, 2026 21:46
Copy link

Copilot AI left a 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 HasBoardFilters trait to properly leverage Filament's HasFilters trait and expose filter action modifiers
  • Updated InteractsWithBoardTable to 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 areFiltersOpen state 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,
Copy link

Copilot AI Jan 14, 2026

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.

Suggested change
areFiltersOpen: false,

Copilot uses AI. Check for mistakes.
*/
public function getFiltersTriggerActionModifier(): ?Closure
{
return $this->modifyFiltersTriggerActionUsing;
Copy link

Copilot AI Jan 14, 2026

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;).

Copilot uses AI. Check for mistakes.
:max-height="$filtersFormMaxHeight"
placement="bottom-start"
shift
:flip="false"
Copy link

Copilot AI Jan 14, 2026

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.

Suggested change
:flip="false"

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants