[2.0.0-beta1] Component validator: Add blocks and attributes to variables checks

Created on 30 July 2024, about 2 months ago
Updated 12 August 2024, about 1 month ago

Problem/Motivation

A last minute addition to beta1, but I think it is important to drive SDC theme maintainer to UI Patterns Devel as soon as beta1 release.

With this component:

name: Card Grid
slots:
  cards:
    title: Cards

And this template:

<div class="card-grid">
  <div class="my-8 grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 xl:grid-cols-4 gap-4">
    {% block cards %}
      <!-- You should add the cards here. -->
    {% endblock %}
  </div>
</div>

I have this error: Unused variables: cards

Instead of this error: Unused variables: attributes

Proposed resolution

  • Add attributes to expected variables list.
  • Add blocks to used variables list
🐛 Bug report
Status

Fixed

Version

2.0

Component

UI Patterns Devel [2.x only]

Created by

🇫🇷France pdureau Paris

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