- Issue created by @pdureau
- 🇫🇷France pdureau Paris
Related task, which will be done in the same issue: some test conditions are too specific in the templates.
For example, this may work weirdly if variant is undefined (or of another type) :
{% if variant != '' and variant|lower != 'default' %}
In Twig, empty test is the same as defined test except for numeric zero and string "0".
This is cleaner and safer:
{% if variant and variant|lower != 'default' %}
Same with the "is empty" tests:
{% if aria_label is not empty %}
can be replaced by{% if aria_label %}
- @pdureau opened merge request.
- Status changed to Needs review
over 1 year ago 7:05am 27 March 2023 - 🇫🇷France Grimreaper France 🇫🇷
Hi @pdureau,
Thanks for the MR.
Review done, only one comment.
- Status changed to Needs work
over 1 year ago 7:06am 27 March 2023 - Assigned to Grimreaper
- Status changed to Needs review
over 1 year ago 7:43am 27 March 2023 -
Grimreaper →
committed f5bf0938 on 5.0.x authored by
pdureau →
Issue #3347943 by pdureau, Grimreaper: Better variants to HTML class...
-
Grimreaper →
committed f5bf0938 on 5.0.x authored by
pdureau →
- Issue was unassigned.
- Status changed to Fixed
over 1 year ago 7:45am 27 March 2023 Automatically closed - issue fixed for 2 weeks with no activity.