Skip to content

v0.7.5

Choose a tag to compare

@jaspertey jaspertey released this 30 Oct 16:02
e4359b3

Upgrading

  • Run kit:update plan|apply for core (re-pinned sha256:9a290690…555b → sha256:bda1ecaa…c43e) and session-ui (sha256:c59375ef…dd74 → sha256:287b46fe…d2ed): Kit/Form/PasswordInput.vue follows its form's reset, and Auth/Login, Auth/ForgotPassword, Auth/ResetPassword, Auth/ConfirmPassword and Auth/VerifyEmail take the two fixes below.
  • tey/standards ^0.11.54 is required. Earlier releases reject the adoption inventory's new features.<id>.composer key (exit 2), so kit raises its floor with it.
  • Run kit:update plan|apply for core (re-pinned sha256:bda1ecaa…c43e → sha256:87f1548e…8cde): Kit/Form/submitForm.ts adds httpSubmit, and Kit/index.ts exports it. A handler that awaits Inertia's useHttp directly should move to httpSubmit (below).
  • Run kit:update plan|apply for core (re-pinned sha256:87f1548e…8cde → sha256:5b4af9a6…b7df): Kit/Form/Slider.vue is new, Kit/Form/RadioCardGroup.vue gains the option slot, image tiles and columns, and Kit/contract.ts and Kit/index.ts export them. RadioCardOption now needs a label or an image (with alt); an option with a label is unchanged.
  • Run kit:update plan|apply for session-ui (re-pinned sha256:287b46fe…d2ed → sha256:abbeb463…c64f): Auth/Login, Auth/ForgotPassword, Auth/ResetPassword, Auth/ConfirmPassword and Auth/VerifyEmail take the type fix below. No behaviour changes.

Fixed

  • A rate-limited auth submit no longer opens Inertia's error modal. The guest auth pages handed their 429 handler to <Form> as @http-exception, but <Form> before Inertia 3.8 has no onHttpException prop: the listener was never called, so Laravel's 429 page (from throttle:) still opened in Inertia's modal. The pages now pass it as the visit option (:options="{ onHttpException }"), which every Inertia 3 <Form> honours, and the in-card "Too many requests" alert shows. The browser checks now run these pages on the real @inertiajs/vue3 (3.7.1) and shadcn-vue Input, answering each submit with Laravel's 429 HTML or an Inertia response with errors.
  • A failed sign-in, reset or confirmation really clears the password. reset-on-error resets the input in the DOM only, and PasswordInput kept its own value, so the next re-render (showing the password, an error appearing) wrote the old password back. The pages now hold their password fields (v-model) and clear them on an error or a 429, and PasswordInput follows its form's reset event (a native reset, or Inertia's whole-form reset), so a host form's reset clears it too.
  • The adoption inventory lists each feature's composer dependencies. resources/adoption/surfaces.json features.<id>.composer now carries every feature's feature.json requires.packages keys (less php and laravel/framework), and the schema allows the key. tey/standards read spatie/laravel-multitenancy in an app's composer.json as a hand-rolled workspaces.tenancy signal, because kit carries it only in require-dev; tey/standards 0.11.54 exempts a package an installed feature declares here. The drift test rebuilds the list from the feature.json files.
  • A useSubmitForm handler over Inertia's useHttp no longer reads a 422 as a success. useHttp doesn't reject on a validation failure: it calls onError and resolves undefined, so a handler that awaited it returned normally and the form showed Saved for a refused save. The docs said a useHttp error is read from what it throws, which is only true of the other statuses; they now say to use httpSubmit (docs/submit-form.md › With Inertia's useHttp).
  • The guest auth pages type-check on every Inertia 3. They bound :options="{ onHttpException: tooMany }" inline, and <Form>'s options type (FormComponentOptions, a Pick of VisitOptions without onHttpException) failed vue-tsc's excess-property check (TS2353) in a host. Each page now types the handler as the visit's onHttpException and widens it to <Form>'s options type (:options="formOptions"), both read off @inertiajs/vue3's own Form and router.visit, so no stub imports @inertiajs/core; at runtime <Form> still spreads it into the visit. The components type-check (bin/typecheck-components.sh, CI's vue-tsc job) now covers these five pages and runs a second time against @inertiajs/vue3 3.7.1 (installed as @inertiajs/vue3-37, typecheck/tsconfig.inertia-3.7.json) as well as the pinned current version.

Added

  • httpSubmit((data, hooks) => request), a useSubmitForm handler over a useHttp request: pass it the hooks it gives you (http.post(url, hooks)). A 422 rejects with a SubmitError of the field errors; a 409 stale_write rejects as the conflict (form.conflict); any other status, a network failure, and a resolve of undefined with no onError reject with the generic message. Only a 2xx resolves, with the response data. Exported from the kit barrel. node --test tests/js/submit-form.test.mjs covers each outcome over a stand-in for useHttp 3.9.1, including a bare useHttp handler that reads a 422 as success.
  • <RadioCardGroup> tiles (docs/radio-card.md). The option slot ({ option, checked, disabled }) replaces a card's body while the native radio, its label and the focus ring stay the kit's. An option with image: { src, alt } is an image tile: a lazy, async image in a square object-cover box, so ~100 tiles load without layout shift, named by its label or its image's alt. A checked image or slot tile shows the primary ring and an aria-hidden check mark, so the state isn't colour alone. columns (2, 3, 4, 6 or auto, at least 7rem a tile) lays the cards in a grid. A disabled option stays a native disabled radio the arrow keys skip.
  • <Slider> (docs/slider.md), a native range input: v-model number, min, max, step, disabled, invalid, valueText for aria-valuetext, input emitted live and change on release, and show-value for a visible <output> linked by for. Caller attributes land on the input; in a Field it is described by the Field's description and error; in a locked LockedForm it is read-only.
  • The adoption inventory counts Slider under form.inputs, and a raw <input type="range"> in a Vue or Blade template as hand-rolled (it also marks the app has-forms).

What's Changed

  • Keep a 429 out of Inertia's modal and clear auth passwords for real by @jaspertey in #478
  • List each feature's composer dependencies in the adoption inventory by @jaspertey in #480
  • Fail useSubmitForm on a useHttp 422 with httpSubmit by @jaspertey in #483
  • Add RadioCardGroup option slot, image tiles and columns, and a Slider by @jaspertey in #439
  • Type the auth pages' onHttpException for every Inertia 3 by @jaspertey in #485
  • Release v0.7.5 by @jaspertey in #488

Full Changelog: v0.7.4...v0.7.5