Skip to content

v4 upgrade guide

tanthammar edited this page Sep 27, 2020 · 7 revisions

TALL-stack form generator v4 upgrade guide

A good place to getting an overview of new syntax is to check out the Example Form. It is using the same example as in v3.

New

  • The Form has title, head, before and after slots
  • All fields have before, after, above, below, label, afterLabel slots, and more
  • Trix, Search, Autocomplete, ImageCropper, DatePicker, and Multiselect fields are on their way
  • Structured code base makes it easy to create custom fields
  • You can dynamically set the $wire:model .lazy or .debounce attributes in the field declaration
  • You can define custom field attributes with an ->inputAttr([]) method
  • Requires Livewire v2 (Don't forget to read the Livewire upgrade guide)
  • and more ...

Structural changes

  • All fields extends the BaseField
  • A field is now a separate class.
  • Each field has its own extendable Blade component class
  • Custom styling is done via the config file or by extending the blade component classes.

Component changes

  • $spaMode is now $wrapWithView
  • $spaLayout is changed to $wrapViewPath
  • $action (create/update) is removed
  • ... and here is where I gave up trying to make a list of all changes.

It is impossible for me to make an upgrade guide that reflects all changes compared to v3. I decided to rewrite the package from the ground up to get a better and more structured code base, with the intention to make it easier for everyone who wishes to contribute and for me to develop new fields.

You will have to read the docs starting from Installation, and go through Component, Form and Field declarations all over again.

With that said I sincerely apologise to anyone who gets upset with this decision. I know the frustration felt, when an upgrade requires a lot of refactoring. If it is any consolation, I can tell you that I'll have to do the same job in my own projects.

Happy coding
//Tina (Stockholm, Sweden)

Clone this wiki locally