Skip to content

Commit de4d29f

Browse files
committed
minor #1560 [Site] Upgrade 2.16 (weaverryan)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- [Site] Upgrade 2.16 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Issues | None | License | MIT Commits ------- 0f32198 [Site] Upgrade 2.16
2 parents a4db9bb + 0f32198 commit de4d29f

13 files changed

+300
-279
lines changed

ux.symfony.com/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"league/commonmark": "^2.4",
1818
"pagerfanta/twig": "^3.8",
1919
"symfony/asset": "6.4.*",
20-
"symfony/asset-mapper": "6.4.*",
20+
"symfony/asset-mapper": "6.4.3",
2121
"symfony/console": "6.4.*",
2222
"symfony/dotenv": "6.4.*",
2323
"symfony/expression-language": "6.4.*",

ux.symfony.com/composer.lock

Lines changed: 255 additions & 255 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ux.symfony.com/templates/components/FoodVote.html.twig

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@
1313
type="button"
1414
class="btn btn-secondary"
1515
data-action="live#action"
16-
data-action-name="vote(direction=up)"
16+
data-live-action-param="vote"
17+
data-live-direction-param="up"
1718
>
1819
<twig:Icon name="arrow-up" />
1920
</button>
2021
<button
2122
type="button"
2223
class="btn btn-secondary"
2324
data-action="live#action"
24-
data-action-name="vote(direction=down)"
25+
data-live-action-param="vote"
26+
data-live-direction-param="down"
2527
>
2628
<twig:Icon name="arrow-down" />
2729
</button>

ux.symfony.com/templates/components/InlineEditFood.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
</div>
2323

2424
<button
25-
data-action="live#action"
26-
data-action-name="prevent|save"
25+
data-action="live#action:prevent"
26+
data-live-action-param="save"
2727
class="btn btn-outline btn-outline-{{ error ? 'danger' : 'secondary' }}"
2828
>Save</button>
2929

@@ -37,7 +37,7 @@
3737
<h2>{{ food.name }}</h2>
3838
<button
3939
data-action="live#action"
40-
data-action-name="activateEditing"
40+
data-live-action-param="activateEditing"
4141
class="btn btn-link"
4242
title="Click to edit!"
4343
>

ux.symfony.com/templates/components/InvoiceCreator.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div {{ attributes }}>
2-
<form data-action="live#action" data-action-name="prevent|saveInvoice">
2+
<form data-action="live#action:prevent" data-live-action-param="saveInvoice">
33
<div class="mb-3">
44
<label for="customer-name">Customer name:</label>
55
<input
@@ -56,7 +56,7 @@
5656

5757
<button
5858
data-action="live#action"
59-
data-action-name="addLineItem"
59+
data-live-action-param="addLineItem"
6060
class="btn btn-sm btn-secondary"
6161
type="button"
6262
><twig:Icon name="plus" /> Add Item</button>

ux.symfony.com/templates/components/InvoiceCreatorLineItem.html.twig

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,26 +50,27 @@
5050
{{ quantity }}
5151
{% endif %}
5252
</td>
53-
<td class="text-end">
53+
<td class="text-end text-nowrap">
5454
{% if isEditing %}
5555
<button
5656
data-action="live#action"
57-
data-action-name="save"
57+
data-live-action-param="save"
5858
class="btn btn-success btn-sm"
5959
type="button"
6060
>Save</button>
6161
{% else %}
6262
<button
6363
data-action="live#action"
64-
data-action-name="edit"
64+
data-live-action-param="edit"
6565
class="btn btn-primary btn-sm"
6666
type="button"
6767
>Edit</button>
6868
{% endif %}
6969

7070
<button
7171
data-action="live#emitUp"
72-
data-event="removeLineItem(key={{ key }})"
72+
data-live-event-param="removeLineItem"
73+
data-live-key-param="{{ key }}"
7374
class="btn btn-link text-danger btn-sm ml-2"
7475
type="button"
7576
><twig:Icon name="cross" /></button>

ux.symfony.com/templates/components/LiveMemory/Board.html.twig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@
4040
{% if app.debug %}
4141
<div class="LiveMemory-Debug">
4242
{% for i in 1..4 %}
43-
<button type="button" data-action="live#action" data-action-name="play(level={{ i }})">
43+
<button
44+
type="button"
45+
data-action="live#action"
46+
data-live-action-param="play"
47+
data-live-level-param="{{ i }}"
48+
>
4449
{{ max(i+2, 4) }}x{{ min(i+2, 4) }}
4550
</button>
4651
{% endfor %}

ux.symfony.com/templates/components/LiveMemory/Card.html.twig

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111

1212
{# We keep the back / button to flip until the card is matched #}
1313
{% if not matched|default %}
14-
<button class="LiveMemory-Card__back" data-action="live#action" data-action-name="flip(key={{ key }})">
14+
<button
15+
class="LiveMemory-Card__back"
16+
data-action="live#action"
17+
data-live-action-param="flip"
18+
data-live-key-param="{{ key }}"
19+
>
1520
<img class="LiveMemory-Card__back_img LiveMemory-Card__img"
1621
alt="LiveMemory Card Back - {{ back|upper }}"
1722
src="{{ asset('images/demos/live-memory/back/%s.webp'|format(back)) }}"

ux.symfony.com/templates/components/LiveMemory/Score.html.twig

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313

1414
<div class="title">GAME OVER!</div>
1515
<div class="text">TIME ELAPSED</div>
16-
<button data-action="live#action" data-action-name="play(level={{ game.level }})">INSERT COIN</button>
16+
<button
17+
data-action="live#action"
18+
data-live-action-param="play"
19+
data-live-level-param="{{ game.level }}"
20+
>INSERT COIN</button>
1721

1822
{% else %}
1923

@@ -25,9 +29,13 @@
2529
<twig:LiveMemory:ScoreRow wait="6" label="TOTAL" value="{{ game.totalScore }}" class="total"/>
2630
</div>
2731
{% if game.level != 4 %}
28-
<button data-action="live#action" data-action-name="play(level={{ game.level + 1 }})">NEXT LEVEL</button>
32+
<button
33+
data-action="live#action"
34+
data-live-action-param="play"
35+
data-live-level-param="{{ game.level + 1 }}"
36+
>NEXT LEVEL</button>
2937
{% else %}
30-
<button data-action="live#action" data-action-name="play">NEW GAME</button>
38+
<button data-action="live#action" data-live-action-param="play">NEW GAME</button>
3139
{% endif %}
3240

3341
{% endif %}

ux.symfony.com/templates/components/NewCategoryForm.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div {{ attributes }}>
22
<form
3-
data-action="live#action"
4-
data-action-name="prevent|saveCategory"
3+
data-action="live#action:prevent"
4+
data-live-action-param="saveCategory"
55
>
66

77
<div class="mb-3">

ux.symfony.com/templates/components/NewProductForm.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div {{ attributes }}>
22
<form
3-
data-action="live#action"
4-
data-action-name="prevent|saveProduct"
3+
data-action="live#action:prevent"
4+
data-live-action-param="saveProduct"
55
>
66
<div class="row align-items-center">
77
<div class="col-2">

ux.symfony.com/templates/components/RegistrationForm.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
{{ form_start(form, {
88
attr: {
99
'novalidate': true,
10-
'data-action': 'live#action',
11-
'data-action-name': 'prevent|saveRegistration',
10+
'data-action': 'live#action:prevent',
11+
'data-live-action-param': 'saveRegistration',
1212
}
1313
}) }}
1414
{{ form_row(form.email) }}

ux.symfony.com/templates/components/UploadFiles.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
</div>
3838
<button
3939
data-action="live#action"
40-
data-action-name="files|uploadFiles"
40+
data-live-action-param="files|uploadFiles"
4141
class="btn btn-primary"
4242
>Upload files!</button>
4343
</div>

0 commit comments

Comments
 (0)