Skip to content

Releases: inertiajs/inertia-phoenix

Version 1.0.0-beta.1

15 Oct 13:55
Compare
Choose a tag to compare
Version 1.0.0-beta.1 Pre-release
Pre-release

Breaking Changes

The errors serializer (for Ecto.Changeset structs) has been adjusted to better align with the behavior in the Laravel adapter in cases when there are multiple validation errors for a single field.

Old Behavior

Previously, the serializer would include each error under a separate key, with a [0] index suffix, like this:

{
  "name[0]": "is too long",
  "name[1]": "is not real"
}

While this retains maximal information about all the errors for a field, in practice it's difficult to target the right error records for display in the UI.

New Behavior

Now, the serializer simply takes the first error message and returns it under the field name, without any added suffix:

{
  "name": "is too long"
}

Bug Fixes

  • Allow for external redirects from PUT / PATCH / DELETE requests (#22)

Features

Support new Inertia v2 mechanics 🎉. There are no breaking changes required to support v2, only new features:

  • Add encrypt_history function to instruct the client-side to encrypt the history entry.
  • Add clear_history function to instruct the client-side to clear history.
  • Add inertia_optional function, to replace the now-deprecated inertia_lazy function.
  • Add inertia_merge function to instruct the client-side to merge the prop value with existing data.
  • Add inertia_defer function to instruct the client-side to fetch the prop value immediately after initial page load.

This version also includes some new features:

  • Helpers for testing Inertia-based controller responses via the Inertia.Testing module.
  • Added a camelize_props global config option and a camelize_props function (to use on a per-request basis) to automatically convert prop keys from snake case to camel case.

Deprecations

  • The inertia_lazy/1 function has been deprecated in favor of inertia_optional/1

Version 0.10.0

27 Jul 16:42
Compare
Choose a tag to compare

Bug Fixes

Version 0.9.0

23 Jul 19:07
Compare
Choose a tag to compare

Bug Fixes

  • Fix improper elimination of nested props when using only partials

Version 0.8.0

11 Jul 17:47
Compare
Choose a tag to compare

Features

  • Support unicode props (by using the binary flag on Node function calls)

Version 0.7.0

15 Jun 02:13
Compare
Choose a tag to compare

Bug Fixes

  • Fix exception when assigning structs as prop values (like DateTime)

Version 0.6.0

14 Jun 19:24
Compare
Choose a tag to compare

Bug Fixes

  • Prevent overly greedy empty object elimination (#14)

Version 0.5.0

12 Jun 21:21
Compare
Choose a tag to compare
  • Assign errors via an assign_errors helper (#10)
  • Preserve assigned errors across redirects (#10)
  • Set up external redirects properly for Inertia requests (#11)
  • Pass CSRF tokens via cookies (#12)
  • Forward flash contents across forced refreshes (#13)
  • Automatically pass Phoenix flash data via the flash prop

Version 0.4.0

09 Jun 15:02
Compare
Choose a tag to compare
  • Support for partial reloads (#6)
  • Support lazy data evaluation (#7)

Version 0.3.0

03 Jun 04:44
Compare
Choose a tag to compare
  • Add raise_on_ssr_failure configuration

Version 0.2.0

29 May 15:32
Compare
Choose a tag to compare
  • Add SSR support
  • Add <.inertia_head> component for rendering head elements provided by SSR