Skip to content

Add status tabs and a column manager to the admin Plugins list - #485

Merged
simonhamp merged 2 commits into
mainfrom
plugin-status-tabs
Aug 25, 2026
Merged

Add status tabs and a column manager to the admin Plugins list#485
simonhamp merged 2 commits into
mainfrom
plugin-status-tabs

Conversation

@simonhamp

@simonhamp simonhamp commented Aug 25, 2026

Copy link
Copy Markdown
Member

What

Brings the admin Plugins list in line with Support Tickets by adding status tabs, makes the table's columns customisable, and replaces the now-redundant status filter with a single "Show drafts" checkbox.

Tabs

Tab Scope
Pending (default) status = pending
Approved status = approved, sorted by approval date, newest first
Rejected status = rejected
All unscoped

Same getTabs() shape as ListSupportTickets.

The Approved tab's ordering is applied as a tab-aware defaultSort() on the resource table rather than an orderBy() inside the tab's query scope. Tab scopes are applied before sorting, so ordering there would have made approved_at the primary sort and silently broken column-header sorting on that tab. As a default sort it stays overridable — there's a test covering that.

Column manager

Every column is now toggleable(), plus reorderableColumns() so columns can be dragged into the order you want. Default visibility is unchanged (Mobile SDK stays hidden by default).

Persistence comes free: Filament keys the saved column state on the Livewire component class, and all four tabs are the same component — so hiding or reordering on Pending carries straight over to Approved, Rejected and All, and survives a reload. The column manager's Reset restores defaults.

"Show drafts" replaces the status filter

With the tabs covering pending/approved/rejected, the status select filter was redundant — and picking a status that contradicted the active tab just produced an empty table. The only thing it still did was gate access to drafts, so it's now a single "Show drafts" checkbox. Default behaviour is unchanged: drafts are hidden until you tick the box.

Implementation note: the checkbox is passed to the filter as a schema() rather than using Filament's built-in isActive checkbox. A plain Filter only applies its query() when checked, but we need the opposite — drafts are excluded unless the box is ticked. With a schema there's no isActive key, so the query callback always runs and reads the checkbox state itself.

Notes

  • The logo column needed a real label (Logo) because reorderableColumns() rejects blank labels, so that header is now visible where it was previously empty.
  • You can no longer isolate drafts on their own — ticking "Show drafts" mixes them into the All tab alongside everything else. The status column is sortable if you want them grouped. Happy to make it a Drafts tab instead if isolating them turns out to matter.

Tests

New tests/Feature/Filament/PluginListTabsTest.php (12 tests): tab order, default tab, per-tab scoping, both sort orders, admin sort still winning on the Approved tab, column state carrying across tabs, surviving a revisit, and resetting. One test does a real HTTP GET of the list page and asserts a 200 with the four tabs rendering in order.

PluginListDraftFilterTest reworked for the checkbox (5 tests): the checkbox renders and the status filter is gone, drafts hidden by default, shown when ticked, hidden again when unticked, and not leaking into the status tabs.

Three other existing tests assumed the list page opened unfiltered, so they now set activeTab explicitly. 131 Filament tests pass; 456 plugin-related tests pass.

🤖 Generated with Claude Code

simonhamp and others added 2 commits August 25, 2026 10:36
Adds Pending / Approved / Rejected / All tabs to the admin Plugins list,
matching the pattern already used for Support Tickets. Pending is the
default tab, and the Approved tab sorts by approval date, newest first.

The Approved tab's ordering is applied as a tab-aware defaultSort() on
the resource table rather than an orderBy() inside the tab's query
scope: tab scopes run before sorting, so ordering there would make
approved_at the primary sort and silently break column-header sorting.

Every column is now toggleable and columns are reorderable, so admins
can tailor the table. Filament keys the saved column state on the
Livewire component class, and all four tabs share one component, so
customisations carry across every tab and survive a reload.

The logo column needed a real label because reorderableColumns()
rejects blank labels.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The status tabs now cover pending, approved and rejected, so the status
select filter was redundant — and picking a status that contradicted the
active tab produced an empty table. All it still did was gate access to
drafts, so it becomes a single "Show drafts" checkbox.

The checkbox is given to the filter as a schema rather than using
Filament's built-in isActive checkbox. A plain Filter only applies its
query() when checked, but we need the opposite: drafts are excluded
unless the box is ticked. With a schema there is no isActive key, so the
query callback always runs and reads the checkbox state itself.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@simonhamp
simonhamp marked this pull request as ready for review August 25, 2026 10:06
@simonhamp
simonhamp merged commit 3135fe7 into main Aug 25, 2026
3 checks passed
@simonhamp
simonhamp deleted the plugin-status-tabs branch August 25, 2026 12:15
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.

1 participant