Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3f01ea3
feat(columns): collapse chosen columns or every column
ManukMinasyan Nov 13, 2026
19f91bd
fix(columns): hide cards in a collapsed column and accept any id list
ManukMinasyan Nov 13, 2026
7ed0975
feat(columns): toggle collapse from the header and the rail
ManukMinasyan Nov 13, 2026
820399a
fix(columns): expand a rail on double click and rebuild after a toggle
ManukMinasyan Nov 13, 2026
1754210
feat(columns): open a host menu from the column header
ManukMinasyan Nov 13, 2026
201422f
fix(columns): open every column menu on click and keep it open across…
ManukMinasyan Nov 13, 2026
8ab0201
feat(lanes): size lanes per column so collapsed columns hold
ManukMinasyan Nov 13, 2026
c33a9d5
fix(lanes): keep a collapsed head at row height and match numeric ids
ManukMinasyan Nov 14, 2026
b2479b0
fix(lanes): keep a wide count inside a collapsed lane head
ManukMinasyan Nov 14, 2026
38cd95f
feat(columns): add a column from a tile after the last one
ManukMinasyan Nov 14, 2026
bbe426e
fix(columns): keep the add tile at head height and submit a name once
ManukMinasyan Nov 14, 2026
d466484
docs(columns): describe column controls in the skill and tile border
ManukMinasyan Nov 14, 2026
7af62c9
fix(columns): draw a collapsed column as one aligned rail without its…
ManukMinasyan Nov 14, 2026
5234d31
fix(columns): ignore a rail click that ended a drag
ManukMinasyan Nov 14, 2026
6749d40
fix(columns): draw the add tile as a header-level square
ManukMinasyan Nov 14, 2026
2c503a5
fix(columns): keep the add tile within the lane heads row and its tok…
ManukMinasyan Nov 14, 2026
08eef78
fix(columns): open a header menu over its column and leave double cli…
ManukMinasyan Nov 14, 2026
6e8c425
feat(columns): collapse from empty space, draw hex dots exactly, and …
ManukMinasyan Nov 14, 2026
c2a3369
feat(columns): let a collapse all rail expand through the host
ManukMinasyan Nov 14, 2026
dd52826
feat(columns): open a new column as a ghost column with its name form…
ManukMinasyan Nov 14, 2026
223121f
feat(columns): tell a click from a double-click on a collapse all rail
ManukMinasyan Nov 14, 2026
f81c092
fix(columns): focus the new column input a frame after it shows
ManukMinasyan Nov 14, 2026
bff1000
feat(columns): pick a color for a new column from the host palette
ManukMinasyan Nov 14, 2026
25ba304
fix(columns): scroll a new column into view and open its form on the …
ManukMinasyan Nov 14, 2026
18dbc19
fix(columns): scroll the board to its end when a new column opens
ManukMinasyan Nov 14, 2026
55d6ce4
feat(columns): resolve every board icon through a Filament icon alias
ManukMinasyan Nov 15, 2026
877fa91
fix(columns): name the header controls with a tooltip instead of a na…
ManukMinasyan Nov 15, 2026
dd1dda2
feat(columns): size the column dot and the add column dot from one token
ManukMinasyan Nov 15, 2026
a07b896
feat(columns): one color swatch grid with radio semantics and arrow k…
ManukMinasyan Nov 15, 2026
0789557
feat(columns): make a collapsed rail a keyboard operable button
ManukMinasyan Nov 15, 2026
b43c7b2
feat(columns): read the add form and swatch overlay radius and shadow…
ManukMinasyan Nov 15, 2026
357bfdd
fix(columns): cap the column menu to the room left in the window
ManukMinasyan Nov 15, 2026
7e8cb8a
fix(columns): focus the current swatch a frame after the grid shows s…
ManukMinasyan Nov 15, 2026
8d01130
fix(cards): wrap an unbreakable title inside its box
ManukMinasyan Nov 15, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions docs/content/2.essentials/2.customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,122 @@ Style the rail with the `.flowforge-column-collapsed` class.

On a Modern board the rail also keeps the header `+` from `createCardAction()`, shows no column summary and no add row, and carries `data-collapsed` on `.ff-column`. With a grouping active, every column keeps its width so every lane cell stays a drop target.

## Collapse Chosen Columns

Collapse columns by id, or all of them, when your app owns the state. Both options take a
value or a closure, so a host can read them from a user preference:

```php
public function board(Board $board): Board
{
return $board
->collapsedColumns(fn (): array => $this->collapsedStages)
->collapseAllColumns(fn (): bool => $this->collapseEverything);
}
```

Ids that match no column, or a hidden column, are ignored. A collapsed column renders the
same rail as an empty one and stays a full drop target. The empty-column rule from
`collapseEmptyColumns()` keeps working beside these options.

### Let users toggle columns

`collapsibleColumns()` turns on double-click in a column's empty space, flat or in a lane cell, and
a click on a collapsed rail. A double-click on a card, the add card row or a button does nothing. A
header without a `columnHeaderMenu()` collapses on double-click too. A header with one leaves its
clicks to the menu.
Flowforge keeps no state. It calls your closure with the column id and the new state, and you
store it where `collapsedColumns()` reads it:

```php
->collapsedColumns(fn (): array => $this->collapsedStages)
->collapsibleColumns(function (string $columnId, bool $collapsed): void {
$this->collapsedStages = $collapsed
? [...$this->collapsedStages, $columnId]
: array_values(array_diff($this->collapsedStages, [$columnId]));
})
```

The closure never runs for an unknown or hidden column id. A double-click on the header's action
buttons does not toggle the column.

A rail collapsed by `collapsedColumns()` or `collapseAllColumns()` expands on a click. Under
`collapseAllColumns()` a click waits 300ms for a second one. A single click calls your closure with
`$alone` false, so turn collapse all off. A double-click passes `$alone` true, so open that column
alone and list the others as collapsed. The closure may leave `$alone` out of its parameters. A column that `collapseEmptyColumns()` collapses has no click
binding, and a toggle for it never reaches your closure. Flowforge rebuilds the board after your closure runs. Still, pass
a value your page changes during a request as a closure, as above, so every read sees the new state.

### Open a menu from the column header

`columnHeaderMenu()` turns the column heading into a menu trigger. Your closure receives the column
as an array and returns the block the panel shows first. The panel then lists the column's visible
actions from `columnActions()`, so the separate actions button goes away. The add card button stays
in the header.

```php
use Illuminate\Support\HtmlString;

->columnHeaderMenu(fn (array $column): ?HtmlString => new HtmlString(
view('boards.stage-settings', ['stage' => $column['id']])->render(),
))
```

A click opens the menu at once, over the column at the column's width, so it covers the header it
came from. The second click of a double-click lands in the menu and leaves it open. A
press that moves more than 4px before release is a header drag, so it does not open the menu. Mark
a field in your block with `data-autofocus` and a mouse or trackpad click focuses it with the caret
at the end. A touch tap does not, so a phone keeps its keyboard down. Return `null` for no
block. A column with no block and no visible actions renders a plain header, and a collapsed
column has no menu.

The trigger is a `div` with `role="button"`, not a `button`, so a drag handle that filters out
buttons still grabs the header.

### Add a column from the board

`addColumnUsing()` adds a tile after the last column. A click on it opens a column-width ghost
column with a name form at its top, focused. Enter submits. Escape or a click outside the form
cancels. Flowforge keeps no columns. It passes the trimmed name to
your closure and rebuilds the board once the closure returns, so a `columns()` list that reads
your state shows the new column in the same response:

```php
use Illuminate\Validation\ValidationException;

->addColumnUsing(function (string $name): void {
throw_if(
$this->stages->contains($name),
ValidationException::withMessages(['name' => 'That stage already exists.']),
);

$this->stages->push($name);
})
->addColumnLabel('Add stage')
->addColumnPlaceholder('Stage name')
```

A blank name never reaches your closure. A `ValidationException` from the closure shows its first
message under the input. `addColumnLabel()` sets the tooltip and the input label, and defaults to
"Add column". `addColumnPlaceholder()` sets the input placeholder, and defaults to "Column name". The tile renders only while `addColumnUsing()` is set, so hide it for a user by not
setting it. With a grouping active, the tile is an extra track in the header row only, and every lane
cell keeps its column.

`addColumnColors()` turns the form's dot into a color picker. Pass the palette as color values
keyed to their labels. The picked color reaches your closure as `$color`, and a value outside the
palette or no pick arrives as `null`. `addColumnDefaultColor()` names the palette color the form
opens on, so the dot and the grid show it selected. Leaving it unpicked still sends `null`:

```php
->addColumnUsing(fn (string $name, ?string $color) => $this->addStage($name, $color ?? 'gray'))
->addColumnColors(['#ff5454' => 'Red', '#266df0' => 'Blue', '#a2a4a7' => 'Gray'])
->addColumnDefaultColor('#a2a4a7')
```

The picker is a radio group. Arrow keys move between swatches, Enter or Space picks one, and Escape closes the grid and returns focus to the dot. `addColumnColorLabel()` sets each swatch's accessible name, with `:color` standing for the palette label, and defaults to "Set color to :color".

Opening the form scrolls the board to its end, so the new column and the tile both show.

## Search and Filtering

Enable powerful search and filtering capabilities:
Expand Down
16 changes: 16 additions & 0 deletions docs/content/2.essentials/4.api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ navigation:
| `filtersLayout(FiltersLayout)` | Filter display layout (Dropdown, AboveContent, etc.) | |
| `headerToolbar(bool)` | Render filters/search inline with page title | |
| `collapseEmptyColumns(bool)` | Collapse columns holding no cards into a rail | |
| `collapsedColumns(array\|Closure)` | Collapse the listed column ids into a rail. Unknown and hidden ids are ignored | |
| `collapseAllColumns(bool\|Closure)` | Collapse every visible column into a rail | |
| `collapsibleColumns(?Closure)` | Let users toggle a column by double-clicking its empty space or its header (one without a `columnHeaderMenu()`), or clicking its rail. Columns from `collapsedColumns()` or `collapseAllColumns()` expand from the rail. The closure receives `string $columnId` and `bool $collapsed` (the new state) | |
| `columnHeaderMenu(?Closure)` | Turn the column heading into a menu trigger. The closure receives `array $column` and returns an `Htmlable` block, or `null` for none. The panel holds the block, then the column actions as list items | |
| `addColumnUsing(?Closure)` | Show an add column tile after the last column. The closure receives `string $name`, the trimmed name the user typed. Throw a `ValidationException` to show its first message under the input. Leave it unset to hide the tile | |
| `addColumnLabel(string\|Closure\|null)` | The tile's tooltip and input label. Defaults to "Add column" | |
| `addColumnPlaceholder(string\|Closure\|null)` | The input's placeholder. Defaults to "Column name" | |
| `addColumnColorLabel(string\|Closure\|null)` | The accessible name of each swatch in the color picker. `:color` stands for the palette label. Defaults to "Set color to :color" | |

## Board Methods

Expand Down Expand Up @@ -138,6 +146,14 @@ use Filament\Support\Enums\Width;
->filtersFormColumns(3) // Columns in filter form
->headerToolbar() // Inline filters/search in page header
->collapseEmptyColumns() // Collapse columns holding no cards
->collapsedColumns(['won', 'lost']) // Collapse the listed columns
->collapseAllColumns() // Collapse every column
->collapsibleColumns(fn (string $columnId, bool $collapsed) => ...) // Toggle from the header and the rail
->columnHeaderMenu(fn (array $column) => new HtmlString('...')) // Open a host block and the column actions from the heading
->addColumnUsing(fn (string $name) => ...) // Add a column from a tile after the last one
->addColumnLabel('Add stage') // Tooltip for the tile
->addColumnPlaceholder('Stage name') // Placeholder for the name input
->addColumnColorLabel('Pick :color') // Accessible name of a color swatch
```

### Modern board additions
Expand Down
6 changes: 5 additions & 1 deletion docs/content/2.essentials/6.swimlanes.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,8 @@ While the board query carries an order, a card dragged within a cell is written
## Limits and collapsed columns

- A column limit counts the whole column across every lane, and the header is shared.
- `collapseEmptyColumns()` applies to the plain board only. In lanes every column keeps its width, so every cell stays a drop target.
- `collapsedColumns()` and `collapseAllColumns()` apply in lanes. A collapsed column takes one narrow track in every lane. Its head shows a color dot and the count at the normal head height, with the name as a tooltip, and each cell under it shows its card count and no cards. Each cell under a collapsed column loads one record for its count and shows no cards.
- With `addColumnUsing()` set, the add column tile is one extra track at the end of the header row, at head height. The lane headers and cells do not get that track, so every cell keeps its column.
- While a card is dragged, every collapsed track opens to full width, so each cell under it is a drop target. The tracks close again after the drop.
- With `collapsibleColumns()`, double-click an empty lane cell, or a column head without a header menu, to collapse its column and click its rail to open it again, as on the plain board.
- `collapseEmptyColumns()` applies to the plain board only. In lanes an empty column keeps its width, so every cell stays a drop target.
5 changes: 4 additions & 1 deletion docs/content/2.essentials/7.design-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ The dark column shows where the default changes under Filament's `.dark` class.
| `--ff-ease` | semantic | `cubic-bezier(0.16, 1, 0.3, 1)` | 4.2.0 | Easing of tray and cell fills, add row color, card shadow and card action fades. |
| `--ff-duration` | semantic | `200ms` | 4.2.0 | Duration of the same transitions. |
| `--ff-column-width` | component | `300px` | 4.2.0 | Width of a column, and of each column in the lane grid. |
| `--ff-dot-size` | component | `0.5rem` | 4.4.0 | Diameter of the color dot in a column header and in the add column field. |
| `--ff-overlay-radius` | component | `0.75rem` | 4.4.0 | Corner radius of the add column form, its name field and the color swatch grid. |
| `--ff-overlay-shadow` | component | `0 0 0 1px color-mix(in oklab, var(--gray-950) 5%, transparent), 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)` / the same with a `#fff` 10% ring and a 0.3 shadow | 4.4.0 | Ring and shadow list of the add column form and the color swatch grid. |
| `--ff-tray-bg` | component | `var(--ff-surface-sunken)` | 4.2.0 | Background of a column tray and of a lane cell. |
| `--ff-tray-radius` | component | `calc(var(--ff-radius) + 0.25rem)` | 4.2.0 | Corner radius of a tray and of a lane cell. |
| `--ff-card-bg` | component | `var(--ff-surface-raised)` | 4.2.0 | Card background. |
Expand Down Expand Up @@ -110,7 +113,7 @@ Flowforge reports state through data attributes. SortableJS toggles classes only
| `data-placeholder` | The drop gap | Where the card will land |
| `data-drop="active"` or `data-drop="blocked"` | A column, or a lane cell | The hovered target accepts or refuses the card |
| `data-full` | A column | The column is at its limit |
| `data-collapsed` | A column, or a lane header | The column shows as a collapsed rail, or the lane's cells are hidden |
| `data-collapsed` | A column, a lane header, or a lane cell | The column shows as a collapsed rail, the lane's cells are hidden, or the cell sits under a collapsed column and shows its count only |
| `data-pending` | A card | Its move is saving |

The dragged clone sits on `body`, outside `.ff-board`. A rule that must reach it starts at `.ff-card[data-dragging]`, and the visible card is its `.ff-card-body` child.
Expand Down
6 changes: 5 additions & 1 deletion resources/boost/skills/flowforge-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,11 @@ The closure gets the column's query with the active filters and search applied.
])
```

A "Group by" select appears and the choice lives in `?groupBy=`. `lanes()` returns `Lane::make($name)->label()->query(fn (Builder $query) => ...)` objects. Give every custom grouping an `emptyLane()`, because the header `+` creates a card without knowing the lane. Without `moveUsing()` the lanes are read-only. Throw `CardMoveRejectedException::because('...')` in `moveUsing()` to refuse a move and roll back both writes. `collapseEmptyColumns()` applies to the plain board only.
A "Group by" select appears and the choice lives in `?groupBy=`. `lanes()` returns `Lane::make($name)->label()->query(fn (Builder $query) => ...)` objects. Give every custom grouping an `emptyLane()`, because the header `+` creates a card without knowing the lane. Without `moveUsing()` the lanes are read-only. Throw `CardMoveRejectedException::because('...')` in `moveUsing()` to refuse a move and roll back both writes. `collapseEmptyColumns()` applies to the plain board only. Columns collapsed with `collapsedColumns()` or `collapseAllColumns()` hold in lanes too: each takes a narrow track, its cells show their count, and the track opens while a card is dragged.

### Column controls

The host owns the state and Flowforge renders it. `collapsedColumns(fn () => [...])` and `collapseAllColumns(fn () => ...)` collapse columns. `collapsibleColumns(fn (string $columnId, bool $collapsed) => ...)` lets a double-click in a column's empty space, or on a header without a menu, collapse it and a click on its rail expand it. Columns from `collapsedColumns()` or `collapseAllColumns()` expand by click. Under collapse all the closure also gets `bool $alone`: false for a click, true for a double-click. `columnHeaderMenu(fn (array $column): ?Htmlable => ...)` turns the header into a menu holding the host block above the column actions. It opens over its column, takes the header's clicks, and focuses a `data-autofocus` field on a mouse click. `addColumnUsing(fn (string $name, ?string $color) => ...)` with `addColumnLabel()`, `addColumnPlaceholder()` and an optional `addColumnColors([value => label])` palette adds a tile after the last column; throw a `ValidationException` to show a message under its input. Pass any value the page changes during a request as a closure, because the board is built before the action runs.

### Styling a Modern Board

Expand Down
Loading
Loading