Skip to content

Releases

v1.8.1

Choose a tag to compare

@github-actions github-actions released this 15 Nov 18:04

The package stays out of the relation managers and the lists that do not use it, and keeps the key of the last breadcrumb. The documentation site reads better on phones. No API changes.

Fixed

  • The "Open as page" action is added only to the relation managers that have a relation page, their own or their group's. Before, every relation manager of the app got it, hidden, first in the header of its table: a test or a piece of code that took the first header action found it instead of its own.
  • With record_navigation turned on in the config, only the lists of resources that can show previous and next remember their records. Before, the list pages of every resource of the app wrote them to the session, at every render, including resources that do not use the package.
  • withRelationNavigator() keeps the key of the last breadcrumb when it is text: [..., 0 => 'View'] no longer comes back as [..., 1 => ...]. A linked last breadcrumb still moves to a numeric key, so that the menu never ends up inside a link.

Documentation

  • The example of a page that builds its own breadcrumbs declares @return array<string | int, string | Htmlable>: the last breadcrumb becomes an Htmlable, and PHPStan (larastan) rejects Filament's array<string>.
  • The documentation site reads better on phones: the screenshot under the heading at full width, tables as one card per row, long inline code wrapping, and the Arabic pages no longer wider than the screen.

v1.8.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 22:32

25 more languages in the package, and the documentation in eight more. No API changes.

Added

  • Translations for Arabic, Bulgarian, Catalan, Chinese (simplified and traditional), Czech, Danish, Finnish, Greek, Hebrew, Hungarian, Indonesian, Japanese, Korean, Norwegian, Persian, Polish, Portuguese (Portugal), Romanian, Russian, Slovak, Swedish, Turkish, Ukrainian and Vietnamese: 32 languages, with Filament's codes.
  • In right to left languages the previous and next arrows turn around, as in Filament's pagination.

Documentation

  • The documentation and the README in Spanish, Portuguese, French, German, Chinese, Japanese, Russian and Arabic (right to left), besides English and Italian. English is the reference: every translated page says so and links to it.

v1.7.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 22:00

Previous and next record on nested resources. No API changes.

Added

  • Previous and next record on nested resources, within the same parent record: from one of a customer's orders to the next order of the same customer, on the view, edit and relation pages.
  • On a nested resource they follow the parent's relation manager table the user came from (sort, filters, search), when the nested resource is its related resource ($relatedResource). Not with the cookie session driver, which keeps the parent's list only.

v1.6.2

Choose a tag to compare

@github-actions github-actions released this 14 Nov 21:31

A keyboard fix in the menu, and documentation for every minor version. No API changes.

Fixed

  • Opening the menu with a click no longer takes the focus back to the search field when the arrow keys have already moved it to a page. Menu views you published keep the old behaviour until you publish them again.

Documentation

  • Documentation for every minor version, at /vX.Y/ and in the versions menu: from its own site where it had one (1.4 onwards), else its README and changelog.
  • Screenshots of global search links, "Open as page" and the relation page header, and a GIF of previous and next record, in the README and the docs.
  • A banner on documentation of versions with a published security advisory: fixed and not dismissible for critical and high, dismissible for medium and low. Older versions without advisories say that a newer one exists.

v1.6.1

Choose a tag to compare

@github-actions github-actions released this 14 Nov 20:56

Fixes from a review of the whole package, faster relation pages, and the documentation site. No API changes.

Fixed

  • "Open as page" links only to a relation page the user can open: the relation manager's canViewForRecord() and the resource's canAccessRelationPage() were not checked, so the link could end in a 403. It picks the best page the user can open.
  • Relation group badges: the color callback receives the badge, as in the tab, and a lazy group badge (deferBadge()) is lazy in the menu too.
  • Menu views that cannot load badges later (published before 1.3, presets of your own) get lazy tab badges with the page too: nothing disappears.
  • Shortcuts: the cmd alias works everywhere (tooltip, aria-keyshortcuts), a shortcut that cannot be matched is no longer advertised, and one returned by a page method is normalized and kept away from the global search like the config's.
  • configureRelationPageAction() also works as an instance method on a relation manager.
  • Previous and next: the remembered list is one compact string (about 170 numeric keys or 30 UUIDs per KB, so up to 100 records as documented), only one list is kept with the cookie session driver, records the user can edit but not view are offered, and neighbour queries skip the resource's eager loads.
  • The ?relation= redirect leaves a reload of the view page alone, so its tabs stay reachable.
  • Properties of configured relation managers that are models or objects are compared by value, so "Open as page" stays after a table interaction.
  • No global search links for nested resources (their URLs need each result's parent).
  • A relation group without a string key whose label has no slug (a non-Latin script) gets group-{key} instead of no page.
  • Resources registered only through a configuration get their Livewire components registered.
  • The "Open as page" icon is the same with or without a published config.

Changed

  • Relation pages work out their definitions, context page and class once per request: a relation page reads the resource's getRelations() 2 times instead of 66, a view page 3 instead of 19.
  • Filament 4.13 is now the lowest version allowed in composer.json, as tested since 1.2.1.
  • Package plumbing that was public or protected is marked @internal (RelationNavigator::optsIn(), registerRoutes(), supportsDeferredBadges(), the remembered-list methods and constants, most of GeneratedRelationPages, RelationPage's protected helpers): not covered by semantic versioning from now on. Everything documented in the API reference stays.
  • configureRelationPageActionUsing() callbacks live in the application container: one list per application.

Documentation

  • The site shows the latest release (home page, menu and footer, read from this changelog) and adds a configuration reference with defaults and levels, an API reference, recipes, troubleshooting, community links and a sitemap, in English and Italian.

v1.6.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 20:29

A security fix for relation pages of resources whose view page is not registered as view (or that have none), security hardening from an audit, badges loaded when the menu opens by default, and a customisable "Open as page" action.

Security

  • Relation pages applied the record's view policy only when the view page was registered under the key view (or the edit page under edit) (1.3.0 to 1.5.0, GHSA-mjj3-c8gm-4j73). With the view page under another key ('details' => ViewCustomer::route(...)), or with no view or edit page at all, relation pages checked only canAccess() and the relation manager's canViewForRecord(). The view page is now also found by its class, and without one the view policy applies.
  • A policy that denies "as not found" (Response::denyAsNotFound()) gives a 404 on relation pages too, as on the view page, instead of a 403 that told existing records apart.
  • Generated relation page classes: in the system temporary directory they go to a directory of this user only (0700, owner checked), and a file whose content is not the expected code is rewritten, never included.
  • Package methods that the browser does not need are #[Unexposed] (Filament 4.16 and later refuse browser calls to them); getRelationNavigatorBadges() stays callable and computes once per request.
  • make:filament-relation-navigator-preset accepts plain names and the package presets only.
  • "Open as page" and the tab redirect check the relation page's canAccess() before linking to it.

Changed

  • The list remembered for previous and next is one session entry with the five most recent lists, about 1 KB each at most, so cookie sessions keep fitting in 4 KB. A table with deferLoading() is never loaded for it.
  • menu.max_height must be a CSS length (24rem, 400px, 60vh...); anything else falls back to 24rem.
  • Menu badges are loaded when the menu opens by default (menu.badges = 'lazy'): the menu is closed until then, so pages render without the badge queries, also on every Livewire request that redraws the breadcrumbs. Apps that published the config keep what they set. Menu views that cannot load badges later (published before 1.3, or presets of your own) get them with the page, as before. For the old behaviour: 'badges' => true.

Added

  • canAccessRelationPage(Model $record, string $slug) on a resource vetoes a relation page for a record: relation pages, menu, global search and redirect. It is the place for checks a view page makes in its own authorizeAccess() or getRelationManagers(), which relation pages do not run.
  • A relation manager can leave its badge out of the menu, keeping it in its tab: hasRelationNavigatorBadge() or $hasRelationNavigatorBadge with InteractsWithRelationPage.
  • RelationNavigator::supportsDeferredBadges().
  • "Open as page" can be customised: config relation_manager_action (style: link, button or icon_button; label, icon, icon_position, color, size, new_tab), RelationNavigator::configureRelationPageActionUsing() for any change to the Filament action, and configureRelationPageAction() on a resource or a relation manager. RelationNavigator::makeRelationPageAction() builds it.

Internal

  • CI: checkouts without persisted credentials; the documentation deploys from main only.

v1.5.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 20:01

Six improvements: global search links, per-relation titles, "Open as page" on group pages, lazy tab badges in the menu, previous/next that follow the list, and the documentation in Italian. Two behaviour changes, both in "Changed".

Changed

  • Previous and next follow the list the user came from (config record_navigation_follows_list, default true; shouldRelationNavigatorRecordNavigationFollowList() on a page or resource): its sort, filters, search and tab, up to 100 records, instead of the key order. They stop at the ends of that list. Records not in the list, or with the option off, still walk by key. The list remembers its records in the session only when record navigation is on in the config or on the resource.
  • "Open as page" opens a relation manager's own page before the page of a relation group it also belongs to (it used to open whichever came first in getRelations()). A manager that exists only inside a group still opens the group's page.

Added

  • Documentation in Italian: wit3.github.io/filament-relation-navigator/it/, from README.it.md (same sections as the README, checked by a test).
  • Lazy tab badges stay lazy in the menu: a relation manager with $isBadgeLazyLoaded (or $isBadgeDeferred on Filament 4.13) gets its menu badge when the menu opens, the others still come with the page. Filament's default is not lazy, so nothing changes unless you set it. RelationNavigatorItem::$isBadgeDeferred, and RelationNavigator::getItems(..., resolveDeferredBadges: true) to get every badge now. Published menu/partials/list.blade.php views need updating for it.
  • Global search links to relation pages (config global_search_actions: false by default, true, or the most links per result; resource hasRelationPageGlobalSearchActions(); relation manager hasRelationPageGlobalSearchAction() or $hasRelationPageGlobalSearchAction). HasRelationPages adds them to getGlobalSearchResultActions(); RelationNavigator::getGlobalSearchResultActions() for resources that define it themselves.
  • "Open as page" on relation group pages: a relation manager shown on its group's page links to its own page when it has one.
  • Title, subheading and breadcrumb of one relation page from its relation manager, given the owner record: getRelationPageTitle(), getRelationPageSubheading(), getRelationPageBreadcrumb() (static, optional, null keeps the default). The menu keeps the tab title.

v1.4.1

Choose a tag to compare

@github-actions github-actions released this 14 Nov 19:37

No code changes: documentation, AI tooling and repository hygiene.

Added

  • Laravel Boost skill relation-navigator-development (resources/boost/skills/), next to the guidelines: workflows for relation pages, the menu, options, headers, presets and testing. The guidelines tell agents to use it.

Documentation

  • A documentation site with search: wit3.github.io/filament-relation-navigator. It is built from the README, the changelog and the config file, so it always matches them. composer.json points homepage and support.docs to it.
  • The documentation is published for AI agents too: llms.txt, llms-full.txt and a Markdown version of every page.

Internal

  • GitHub Actions pinned to commit SHAs; Dependabot with a 7-day cooldown, now also for the npm dependencies of the browser tests and of the documentation site.
  • AGENTS.md (and CLAUDE.md) for contributors working with AI agents.

v1.4.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 19:12

Every feature can now be turned on or off globally, per resource and per page or relation manager.

Added

  • Options per resource: every option of the menu is read from the page, then from a static method with the same name on the resource, then from the config. For example public static function hasRelationNavigatorRecordNavigation(): bool on a resource turns previous/next on for all its pages. Methods: getRelationNavigatorPreset(), isRelationNavigatorSearchable(), hasRelationNavigatorBadges(), hasDeferredRelationNavigatorBadges(), getRelationNavigatorShortcut(), hasRelationNavigatorMobileMenu(), hasRelationNavigatorRecordNavigation(), shouldRedirectRelationNavigatorTabs().
  • "Open as page" per resource and per relation manager: hasRelationPageLinks() on a resource, hasRelationPageLink() (or $hasRelationPageLink with InteractsWithRelationPage) on a relation manager, on top of the config relation_manager_link.
  • Laravel Boost guidelines (resources/boost/guidelines/core.blade.php): pick the package in boost:install and AI agents learn the traits and options.
  • RelationNavigator::addRelationPageAction(), hasRelationPageAction() and the RELATION_PAGE_ACTION constant.

Changed

  • "Open as page" is now an action in the header of the relation manager's table, next to its title and before its own actions, with an arrow icon. In 1.3.0 it was a link above the table, with an icon that looked like "full screen".

Deprecated

  • RelationNavigator::renderRelationManagerLink() and the relation-manager-link view: the package no longer uses them. They still render the 1.3.0 link, for a render hook of your own, and will be removed in 2.0.

v1.3.0

Choose a tag to compare

@github-actions github-actions released this 14 Nov 18:57

A security fix, new features behind config switches, and a new default look for the menu. Update now if you use policies on your records. No breaking changes: every new key has a default in the code, so a published config from 1.2 keeps working.

Security

  • Relation pages did not apply the record's view policy (1.0.0 to 1.2.1, GHSA-v3mh-w7qp-37gc). Filament checks it when the view page mounts, not in canAccess(), and relation pages only called canAccess(): a user denied view on a record, but allowed viewAny, could open its relation pages and see the related records and the header. Relation pages now run the same record check as the page they stand for (view for a view page, update for an edit page), also on every Livewire request.

Added

  • Links to relation manager tabs open the relation page (config redirect_relation_tabs, default false): /customers/1?relation=bills on the view or edit page redirects to /customers/1/bills, with wire:navigate in SPA mode. Tabs without a relation page, or that the record cannot see, stay where they are. Per page: shouldRedirectRelationNavigatorTabs() and getRelationNavigatorTabRedirectUrl().

  • Deferred badges: menu.badges also takes 'lazy'. The page then renders without the badge queries, and the menu loads the badges when it opens (one request, a spinner meanwhile). New page methods hasDeferredRelationNavigatorBadges() and getRelationNavigatorBadges(), and $hasDeferredBadges for preset views. If you published the package views, update menu/partials/list.blade.php before turning it on, or the menu shows no badges.

  • Previous and next record buttons before the header actions of the pages with the menu (config record_navigation, default false). They open the neighbour by key on the same page (view, edit, a relation page), or on its first page in the menu when it cannot open that one, and are disabled at the ends. They use the resource's own query, so tenancy and your scopes apply. Per page: hasRelationNavigatorRecordNavigation(), getRelationNavigatorRecordNavigationQuery(), getRelationNavigatorRecordNeighbours(). Nested resources are not supported yet: they show no buttons.

  • "Open as page" link above the table of every relation manager that has its own page, on the view and edit pages (config relation_manager_link, default true). It links to the relation group's page for a manager inside a group, and tells apart two entries of the same manager (PostsRelationManager::make([...])) by their properties. RelationNavigator::getRelationManagerPageUrl() returns the same URL for your own buttons.

  • RelationPage::canAccessRecord() and RelationNavigator::canAccessRecordPage(): the record check of the view and edit pages.

Fixed

  • The menu lists the view and edit pages only when the user can open them for the record (view and update policies): a user who cannot edit a record no longer sees an Edit item that ends in a 403.

Changed

  • The default menu is now the github preset with the search field (menu.preset = github, menu.searchable = true): it is the one with the most features. Apps that published the config keep what they set. To keep the menu of 1.2 and earlier, set 'preset' => 'simple' and 'searchable' => false in config/filament-relation-navigator.php, or override getRelationNavigatorPreset() and isRelationNavigatorSearchable() on the page.

Internal

  • Tests for each feature, tenancy, nested resources and record policies included, and a browser test for the deferred badges. README with a GIF and new screenshots.