Skip to content

Tiered list: Extract tiered list item blocks #5530

@jmuzina

Description

@jmuzina

This is a minor code quality update proposal for the tiered list pattern.

This block is duplicated (appears twice) in the macro:

<div class="row">
  <div class="col-9 col-start-large-4">
    {%- if number == 1 %}
      {# Skip the first HR #}
    {%- else %}
      <hr class="is-muted">
    {%- endif %}
  </div>
</div>

This should be extracted into an "inner" (private) macro, to avoid duplication. See this example of how we declare inner macros for this kind of use case.

This block is also mostly duplicated by this block - the only difference is column classes. This is another good candidate for an inner macro.

First noticed here

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions