Skip to content

feat: upgrade to lattice 0.34 - #5

Merged
bambamboole merged 8 commits into
mainfrom
feat/lattice-0.34
Aug 1, 2026
Merged

feat: upgrade to lattice 0.34#5
bambamboole merged 8 commits into
mainfrom
feat/lattice-0.34

Conversation

@bambamboole

Copy link
Copy Markdown
Contributor

Brings the kit from lattice 0.11 (what main actually has) to 0.34.0.

Note: PR #3 (the 0.19 migration) was merged into feat/i18n-translations after that branch had already landed on main, so its commits never reached main — this branch includes them.

0.34 migration

  • HttpMethod moved to Ui\Enums; Color enum replaced by ColorName; ButtonVariant split into Variant (danger/secondary) and Emphasis (ghost/link); toast() argument order; Stack::direction() takes StackDirection; typed Breadcrumb objects.
  • Frontend boots through createLatticeApp — the hand-rolled resolver/provider/i18n bootstrap and registry.ts are gone.

Cleanups the new version enables

  • ResolvesTeamFromContext now delegates to lattice's ResolvesContextModels (route-key model resolution); the hand-rolled callActionForged test helper is replaced by the shipped callDeniedAction.
  • Dropped the pre-0.26 shadcn token layer from app.css — the kit's own components already use lt-* tokens, and the stale palette was overriding lattice's default theme. tw-animate-css was unused and is removed.
  • config/lattice.php resynced to the 0.34 shape (locales customization kept).

Verified: PHPStan, Pint, 71/71 Pest tests, oxlint/oxfmt/tsc, vite build, plus a manual visual pass over login, dashboard, and team settings.

- UI enums move from Core\Enums to Ui\Enums (HttpMethod stays)
- when() is gone; conditional rendering uses visible()
- custom components extend Ui\Components\Component and declare their
  wire type via #[AsComponent] instead of a type() method
- config re-published from the 0.19 template (new discovery, frontend,
  and notifications blocks), keeping the en/de locale setup
- StackColumn composes data-bound Text lines via schema()/dataKey()
  instead of nested TextColumns
- effect discriminators are kebab-case on the wire (reload-component)
- authorize()-denial tests seal their ref directly: 0.19 refuses to
  serialize a denied action, so a legitimate render can never produce
  one — callActionForged() proves the endpoint rejects forged refs
- deep imports move to the deliberate entrypoints: ui components from
  @lattice-php/lattice/ui, RendererComponent and the ComponentProps
  augmentation from the package root
- the registry merges Composer-discovered plugins from
  virtual:lattice/plugins
- the reload-component event drops its ignored detail.type field
- the vendor @source scan goes away — the package stylesheet registers
  its own compiled output with Tailwind
@bambamboole
bambamboole merged commit 0ce2029 into main Aug 1, 2026
3 checks passed
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