Repository navigation
v0.4.0
Fixes and 1.0-readiness work. Upgrade notes: requires Filament 5.10 or newer; run php artisan filament:assets (or filament:upgrade) so the new stylesheet is published.
Added
NavItem::activeWhen(fn () => …): marks an item current by any condition (route name, query string, React route), for pages the URL cannot place.- Collapsed sidebar fallback: a top-level item without an icon shows its initial instead of nothing.
- CI job on the lowest supported versions (
--prefer-lowest): package and demo. - Own header for a level:
NavItem::recordHeader(fn ($record) => view(...))for a record's menu and->header(...)for any item that opens a level replace the default Back link and title (a view renders as HTML, a string as text; the header gets the focus the title would). Demo: one task's menu. - Extra active URLs:
NavItem::activeOn([...])keeps an item current on pages under other URLs (matched like its own: by prefix, exact only for the panel root and ancestor URLs), e.g. a list at/agents/5/sourceswhose records open at/agents/5/knowledge/{id}.
Changed
- Filament's navigation stays intact outside the sidebar. The plugin used to empty the panel's navigation, which also emptied
->topNavigation()menus, breadcrumbs built from navigation, and anything else callingFilament::getNavigation(). Now only the sidebar's own list is hidden, via the plugin's sidebar componentDrilldownSidebar(or theHidesNativeNavigationtrait on your own). - Stylesheet is a Filament asset (
php artisan filament:assets) instead of an inline<style>block andstyle=""attributes: works with a strict Content-Security-Policy and can be overridden by a theme. - Requires Filament 5.10+ (was
^5.0): 5.9 and older fail the demo tests; 5.10 is the oldest version tested in CI. - Recent and pinned pages are stored per tenant too, and only entries under the current panel/tenant URL are shown (stored entries are also checked to be same-site paths).
->recent()and->pinnable()are marked experimental indocs/api-stability.md.