[beta7] Misleading border prop in tile component

Created on 16 April 2024, 7 months ago
Updated 6 May 2024, 7 months ago

In pattern-tile.html.twig we have :

{% if border %}
{% set attributes = attributes.addClass('fr-tile--no-border') %}
{% endif %}

And in tile.ui_patterns.yml

border:
type: boolean
label: Display borders?
description: Add borders.
default_value: true

In the patterns settings form, we have a boolean option called "Add border ?" When selected, we get "no border" (see attached image) because the class "fr-tile--no-border" is added. I believe this is misleading.

To correct it, I propose two solutions:

Change
tile.ui_patterns.yml like this :
border:
type: boolean
label: Remove borders?
description: Remove borders.
default_value: false


OR change pattern-tile.html.twig

{% if border == 'false' %}
{% set attributes = attributes.addClass('fr-tile--no-border') %}
{% endif %}

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024