Releases: symfony/ux
2.18.0 : Mostly Maintenance
Hey UX'ers!
This is mostly a maintenance release with a lot of small fixes and improvements across all components.
The most notable changes are the addition of Slovak translations for the Autocomplete component the
abstraction of image content fetching in the Lazy Image component.
Lazy Image
- Abstract image content fetching by @Kocal in #1781
- Re-add forgotten
twig.runtime
by @Kocal in #1771 - Fix code block rendering in docs by @mttsch in #1876
Autocomplete
- Ignore the
ExtraLazyChoiceLoader
if the parent$loader
isnull
by @vesselind in #1775 - Add Slovak translations by @fbuchlak in #1866
Turbo
- Document running tests locally by @kbond in #1778
- Fix
TurboExtension
for PhpStan by @smnandre in #1854 - Fix the example with Expression Language by @seb-jean in #1874
Live Components
- Add a note about
render:finished
event by @smnandre in #1779 - Fix namespaces on documentation by @mickaelblondeau in #1801
- Add signature overload for on and off methods of component by @YummYume in #1685
- Add support for testing file uploads in actions by @daFish in #1832
- Fix EscaperRuntime deprecation by @smnandre in #1855
- Add missing closing paranthesis by @richardhj in #1859
Twig Components
- Fix LiveComponent namespace mapping by @smnandre in #1772
- Misc fixes in Twig Component docs by @javiereguiluz in #1789
- Remove the
--dir
option indebug:twig-component
command by @javiereguiluz in #1790 - Fix aria attribute cannot be removed by @smnandre in #1805
- Throws if exposed public prop is uninitialized by @smnandre in #1780
- Fix silently failing tests by @adrienlucas in #1810
- Remove wrongly added configuration by @smnandre in #1823
- Allow input props to have the same name as context variables by @squrious in #1820
- Fix
EscaperExtension
deprecation by @smnandre in #1835 - Update DOC preMount validation data code by @cavasinf in #1845
- Disable profiler integration via configuration by @smnandre in #1877
- Restrict anonymous component lookup to Twig files in debug command by @squrious in #1882
Icons
- Fix warning when Iconset license URL is null by @smnandre in #1792
- Use lowercase
<twig:ux:icon />
in documentation by @smnandre in #1798 - Improve aria attributes rendering by @smnandre in #1797
- Document http-client requirement by @smnandre in #1885
Translator
- Create valid constant names for keys starting with numeric chars by @wolfgangweintritt in #1809
Stimulus
- Use Twig >3.9
EscaperRuntime
by @smnandre in #1824 - Use version instead of url in docs by @ruudk in #1865
Chart.js
- Replace
chart.js/auto
import withChart.register
calls by @smnandre in #1263 - Improve Y axis formatting example by @hellomedia in #1837
ux.symfony.com
- Fix UX Icons color by @smnandre in #1888
- Add Icons package data by @smnandre in #1864
- CodeBlock with gutter and line pre-slice by @smnandre in #1863
- Icons colors by @smnandre in #1831
- Some more cleaning by @smnandre in #1815
- Add
robots.txt
&sitemap.xml
by @smnandre in #1814 - Clean demos & packages pages by @smnandre in #1813
- Fix input range color by @smnandre in #1821
- Clean templates by @smnandre in #1827
- Adapt highlighted code blocks to tempest by @smnandre in #1811
- Various small fixes / improvements by @smnandre in #1804
- switch from
highlight.js
totempest/highlight
by @kbond in #1808 - Configure Twig-CS-Fixer by @smnandre in #1793
- adjust external link config by @kbond in #1794
- Refactor Translator page by @smnandre in #1783
- refactor commonmark config by @kbond in #1791
- Fix InvoiceCreator demo by @WebMamba in #1861
- Infinite Scroll 2/2 by @smnandre in #1887
New Contributors
- @vesselind made their first contribution in #1775
- @mickaelblondeau made their first contribution in #1801
- @YummYume made their first contribution in #1685
- @wolfgangweintritt made their first contribution in #1809
- @hellomedia made their first contribution in #1837
- @richardhj made their first contribution in #1859
- @fbuchlak made their first contribution in #1866
- @ruudk made their first contribution in #1865
Full Changelog: v2.17.0...v2.18.0
2.17.0 : New UX Icons Package
Hey UX-ers!
This is a big release - lots of new features to Twig/Live Components and the first release of UX Icons! With UX Icons, comes a beautiful icon search on ux.symfony.com!
Live Components
- Improve child render handling: avoid removing element from DOM when possible by @weaverryan in #1561
- Add modifier option to
LiveProp
by @squrious in #1507 - Fix collections hydration with serializer by @squrious in #1583
- Lazy load LiveComponent by @smnandre in #1515
- Throw exception for typed LiveProps as interfaces by @smnandre in #1593
- Alias URL bound props by @squrious in #1396
Twig Components
- CVA: Apply function accept null arguments by @WebMamba in #1575
- Add
attributes.has()
method by @barbieswimcrew in #1571 - CVA: Allow array for base, variants and compound by @WebMamba in #1600
- CVA: Allow compound variant value to be string by @kbond in #1610
- Allow stringable objects as attribute values by @kbond in #1609
- Nested attributes by @kbond in #1405
- Remove experimental tag to HTML syntax by @WebMamba in #1662
- CVA: Resolving boolean as variant keys by @smnandre in #1710
- Handle
aria-*
attribute boolean values by @smnandre in #1709 - Merge props from template with class props by @WebMamba in #1652
- Twig "use_yield" compatibility by @smnandre in #1487
Icons
Chart.js
- Add view-value-change event by @IndraGunawan in #1605
Autocomplete
- Command
make:autocomplete-field
output a doc compliant class by @lucbu in #1699 - Use
choice_value
in theWrappedEntityTypeAutocompleter
inEntityAutocompleteField
by @jakubtobiasz in #1723
Turbo
- Use blocks instead of partials to render turbo-streams by @nicolas-grekas in #1045
Lazy Image
New Contributors
- @o0morgan0o made their first contribution in #1580
- @barbieswimcrew made their first contribution in #1576
- @tomschwiha made their first contribution in #1621
- @IndraGunawan made their first contribution in #1605
- @JeanDavidDaviet made their first contribution in #1633
- @gremo made their first contribution in #1615
- @kachnitel made their first contribution in #1584
- @yoanbernabeu made their first contribution in #1654
- @LtMost made their first contribution in #1703
- @JorickPepin made their first contribution in #1692
- @kasperh90 made their first contribution in #1689
- @lucbu made their first contribution in #1699
- @cavasinf made their first contribution in #1705
- @raphael-geffroy made their first contribution in #1716
- @daifma made their first contribution in #1746
- @adrienlucas made their first contribution in #1745
Full Changelog: v2.16.0...v2.17.0
2.16.0 : Live Components is Stable 🥳
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!
v2.15.0 - LiveComponents & Autocomplete improvements & more
Hi UX'ers!
This release contains a mixture of new features and important bug fixes, especially LiveComponents & Autocomplete, which were discovered after the morphing library change in 2.14.0.
Autocomplete
Add doctrine/orm 3 support #1468
- Allow passing extra options to the autocomplete fields #1322
- Fix 2 bugs where TomSelect would reset when not necessary #1502
- Add one missing German translation #1521
Chartjs
- Remove restriction that prevented Chart.js 3.9 #1518
LiveComponent
- [BC BREAK] The
data-live-id
attribute was changed toid
#1484 - Fixed child handling bug during re-rendering introduced with the
new morphing library in 2.14.0 #1484 - Fix bug where the active input would maintain its value, but lose its cursor position #1501
- Restrict Twig 3.9 for now #1486
Turbo
TwigComponent
- Add the ability to render specific attributes from the
attributes
variable #1442 - Restrict Twig 3.9 for now #1486
- Build reproducible TemplateMap to fix possible post-deploy breakage #1497
New Contributors
- @jrushlow made their first contribution in #1475
- @partulaj made their first contribution in #1485
- @simonsolutions made their first contribution in #1521
Full Changelog: v2.14.2...v2.15.0
Have fun!
Fixing Turbo support for newer Doctrine
Hi UX'ers!
This release fixes a regression in the Live Component testing utilities.
Turbo
- [Turbo] Fixing support for not using old ClassUtils by @weaverryan in #1471
StimulusBundle
- [StimulusBundle] UxPackageReader class doesn't support projects with varied structures using Composer with custom directory structure by @yobrx in #1467
New Contributors
Full Changelog: v2.14.1...v2.14.2
Have fun!
Fix regression in Live Component testing tools
Hi UX'ers!
This release fixes a regression in the Live Component testing utilities.
Live Component
StimulusBundle
ux.symfony.com
New Contributors
Full Changelog: v2.14.0...v2.14.1
Have fun!
Features & Fixed for LiveComponent, TwigComponent & other packages
Hi UX'ers!
A beautiful release with a set of features across several packages. 100+ commits, from 19 contributors 🔥 .
TwigComponent
- Make
ComponentAttributes
traversable/countable - Fixed lexing some
{# twig comments #}
with HTML Twig syntax - Fix various usages of deprecated Twig code
LiveComponent
- Add support for URL binding in
LiveProp
- DOM morphing changed from
morphdom
toidiomorph
- Allow multiple
LiveListener
attributes on a single method - Requests to LiveComponent are sent as POST by default
- Add method prop to AsLiveComponent to still allow GET requests, usage:
#[AsLiveComponent(method: 'get')]
- Add a new
urlReferenceType
parameter toAsLiveComponent
, which allows to
generate different type URL (e.g. absolute) for the component Ajax calls - The
symfony/serializer
dependency is now optional - Added a
data-skip-morph
attribute to allow skipping morphing of an element
(the element's attributes will be morphed, but its inner HTML will be overwritten
instead of morphed) - Added an entry to the packages'
package.json
file so that@symfony/ux-live-component
will appear in the user'simportmap.php
file if using AssetMapper. This
will allow using the JavaScript from the package without extra setup. - Fixed edge-case rendering bug where a 2nd Ajax request might start before
the 1st finished processing - Fix usage of
{% embed %}
with{% block %}
in<twig:>
components - Fixed
data-loading
not working when on root element of a component - Fixed error when
class
attributes contained a space at start or end - Fixed loading directives being matched in a child component
Autocomplete
- Fixed behavior of Autocomplete when the underlying
select
oroption
elements were modified to hopefully, more reliably, reset the autocomplete
instance. This is particularly important with LiveComponents. - Add support for the
render.loading_more
Tom Select Virtual Scroll option (loading_more_text
) - Avoid losing the selected options when the Stimulus component is disconnected
and reconnected to the DOM. - Added
tom-select/dist/css/tom-select.bootstrap4.css
toautoimport
- this
will cause this to appear in yourcontrollers.json
file by default, but disabled
see.
StimulusBundle
- Added Typescript controllers support
ChartJs
- Add support for Chart.js version 4
Full Changelog: v2.13.3...v2.14.0
New Contributors
- @nayodahl made their first contribution in #1316
- @squrious made their first contribution in #1230
- @srich387 made their first contribution in #1367
- @vgaret made their first contribution in #1338
- @hepisec made their first contribution in #1218
- @althaus made their first contribution in #1425
Have fun!
Various minor bug fixes
Hi UX'ers!
A bug fix release. Nice!
TwigComponent
LiveComponent
- Fix date object hydration for custom format #1295
- Allow trailing coma in "props" tags #1298
- Fix
BatchActionController
redirection #1301
StimulusBundle
- Remove
stimulus.asset_mapper.loader_javascript_compiler
when no asset-mapper
Full Changelog: v2.13.2...v2.13.3
New Contributors
- @nieck made their first contribution in #1272
- @maxrem made their first contribution in #1269
- @boedah made their first contribution in #1280
- @TBoileau made their first contribution in #1275
- @JeroenMoonen made their first contribution in #1302
- @mariusadam made their first contribution in #1294
- @6insanes made their first contribution in #1301
- @stloyd made their first contribution in #1311
Have fun!
v2.13.2 Revert change to type: module
Hi UX'ers!
In 2.13.0, all UX JavaScript packages changed to type: module
. This had unintended side effects in certain environments / setups. This release reverts that change. See #1268.
Full Changelog: v2.13.1...v2.13.2
Have fun!
v2.13.1: Fix chart.js but with type: module
Hi UX'ers!
This release fixes a but in ux-chart.js. We changed the package to type: 'module'
, but due to some inconsistencies with the chart.js
library, that can't be done quite yet. We've reverted for now.
What's Changed
- [Chart.js] Reverting chart.js type: module by @weaverryan in #1264
Full Changelog: v2.13.0...v2.13.1
Have fun!