Skip to content

Keep existing table descriptions — render quick links via header render hook - #18

Merged
niladam merged 3 commits into
niladam:mainfrom
grafst:append-to-existing-descriptions
Aug 8, 2026
Merged

Keep existing table descriptions — render quick links via header render hook#18
niladam merged 3 commits into
niladam:mainfrom
grafst:append-to-existing-descriptions

Conversation

@grafst

@grafst grafst commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Tables that define their own ->description() currently lose the quick links entirely: the plugin sets the description in Table::configureUsing(), which runs before the resource's configuration chain, so a later ->description() call replaces it (the README documents this limitation).

This PR renders the links through the tables::header.after render hook instead. The links now appear below the header for every table — including tables that have their own description, which is kept untouched. Resolution of the table happens via Livewire::current(), so QuickLinks::build() keeps working unchanged, as do disabled, enabled, and all config options.

🤖 Generated with Claude Code

@grafst
grafst force-pushed the append-to-existing-descriptions branch from bb78ac0 to 5bf8b40 Compare August 8, 2026 11:19
@niladam
niladam force-pushed the append-to-existing-descriptions branch from c35091f to 91fabbe Compare August 8, 2026 13:17
grafst and others added 2 commits August 8, 2026 16:21
The render hook keeps a table's own description, which was the point of the
change, but it built its markup as an HTML string inside the service provider.
That markup now lives in a publishable Blade view, and the links reach it as
structured data rather than pre-rendered anchors.

Alongside that:

- Require filament/tables ^3.0|^4.0|^5.0. The package has always imported
  Filament\Tables but never declared the dependency. TablesRenderHook and
  registerRenderHook() are identical across all three majors, so one code path
  covers them.
- Raise the PHP floor to ^8.2, matching what Filament v4 and v5 require. 8.1
  went end of life in December 2025 and cannot be tested with a current Pest.
- Fix disableIf(). It stored the result of its closure instead of the closure,
  so it ran once while the provider booted - before auth() has a user to ask
  about - and the result was applied inverted, enabling where it should have
  disabled. It is now evaluated per render, which the render hook allows.
- Add a Pest suite and a CI matrix covering PHP 8.2, 8.3 and 8.4 against
  Filament v3, v4 and v5.
@niladam
niladam force-pushed the append-to-existing-descriptions branch from 91fabbe to 64ec247 Compare August 8, 2026 13:27
Adds UPGRADING.md covering the raised PHP floor, the new filament/tables
requirement, the disableIf() behaviour change and the changed return types,
and drops the leftover skeleton entry from the CHANGELOG.

The CHANGELOG itself is generated on release by update-changelog.yml from the
release body, so it is not edited by hand here.
@niladam
niladam merged commit 14c3182 into niladam:main Aug 8, 2026
10 checks passed
@niladam

niladam commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Thank you for this @grafst

I took the liberty to add some more improvements to this and and tagged a new release https://github.com/niladam/quick-links/releases/tag/v2.0.0

@niladam
niladam requested review from niladam and removed request for niladam August 8, 2026 13:56
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