Hi UX'ers!
This release is the first that declares Live Components as stable 🎆! This means that it is now protected by our backwards compatibility promise. However, there are some BC breaks in LiveComponents that will affect most projects. See https://github.com/symfony/ux/blob/2.x/src/LiveComponent/CHANGELOG.md#2160
In addition, this release has a number of fun features & fixes.
Live Components
-
LiveComponents is now stable and no longer experimental 🥳
-
[BC BREAK] The
data-action-name
attribute behavior was removed in favor of using Stimulus "action parameters" anddata-live-action-param
. This is a breaking change if you were using thedata-action-name
attribute directly in your templates. #1418To upgrade your application, follow these changes:
<button data-action="live#action" - data-action-name="debounce(300)|save" + data-live-action-param="debounce(300)|save" >Save</button>
To pass arguments to an action, also use the Stimulus "action parameters" syntax:
<button data-action="live#action" - data-action-name="addItem(id={{ item.id }}, itemName=CustomItem)" + data-live-action-param="addItem" + data-live-id-param="{{ item.id }}" + data-live-item-name-param="CustomItem" >Add Item</button>
Additionally, the
prevent
modifier (e.g.prevent|save
) was removed. Replace this with the standard Stimulus:prevent
action option:<button - data-action="live#action + data-action="live#action:prevent" - data-action-name="prevent|save" + data-live-action-param="save" >Save</button>
-
[BC BREAK] The
data-event
attribute was removed in favor of using Stimulus "action parameters": renamedata-event
todata-live-event-param
. Additionally, if you were passing arguments to the event name, use action parameter attributes for those as well - e.g.data-live-foo-param="bar"
. #1418 -
Reverted setting
ignoreActiveValue: true
in Idiomorph #1548 -
New placeholder macro to generate defer/lazy skeleton #1532
-
improve TestLiveComponent::actingAs() #1461
-
Drop Twig 2 support #1436
-
Add better error message when hydrating dates #1431
-
Store TemplateMap in build_dir #1525
Twig Component
- Introduce CVA to style TwigComponent #1416
- Drop Twig 2 support #1436
- Fix full context is stored in profiler #1552
Autocomplete
Translator
- Increase version range of
intl-messageformat
to^10.5.11
, in order to see a faster implementation of ICU messages parsing. #1443
New Contributors
- @itsdanielfelix made their first contribution in #1511
- @Fan2Shrek made their first contribution in #1545
- @xDeSwa made their first contribution in #1535
Full Changelog: v2.15.0...v2.16.0
Have fun!