Skip to content

Put each attribute on its own line in the CTransferList and CFormCollection templates #606

Open

Description

@JuroOravec

The CTransferList and CFormCollection templates are single triple-quoted strings (#457), but 13 of their tags have more than two attributes and do not put each on its own line. The house rule in CLAUDE.md and the component authoring guide asks for one attribute per line on a tag with more than two attributes, with the closing > on its own line at the tag's indent. That keeps every Citry UI template in one layout, so a change to one attribute shows as one line in a diff. #345 and #350 did the same cleanup for the Citry UI snippets and quality scenarios, and left these 13 tags because the templates were not yet single literals.

The tags, in the 0.7.0 source:

  • ctransfer_list.py: 10 tags in the CInternalTransferList template (8 buttons, a p whose first attribute sits on the tag line, and a div);
  • cform_collection.py: 3 tags in the CInternalFormCollection template (the fieldset, a p, and the c-CInternalFormCollectionItem tag, which has nine attributes spread over three lines).

The count comes from a scan of the 0.7.0 source for start tags with more than two attributes that do not each start a line.

What to do

Put each attribute of those tags on its own line, keeping every attribute and its order. If citry format learns the house rule first (#492), run it on both files instead of editing by hand. Two <c-for> lines in ctransfer_list.py (lines 711 and 760, 137 and 140 characters) are long too; split them as the guide's rule for a long attribute asks. Both templates end with # noqa: E501; check whether it can go in each file afterwards.

How to check it

The rendered output must not change. Render every Citry UI snippet (a short example on a component's docs page) and quality scenario (a test page that exercises a component) that uses either component, before and after, as in #345 and #350, and check:

  • the page markup is byte-identical once the per-render ids are made the same;
  • the data blocks Citry writes for Vue, and the compiled render code, are equal once the values computed from tag positions are replaced with a fixed value.

Moving attributes onto their own lines shifts source positions, and some computed values come from those positions, so replace them before comparing.

Related

#141 lists the same cleanup for snippets, quality scenarios and runtime files. These two templates are not in its inventory.

Done when

  • Every tag with more than two attributes in either template has each attribute on its own line.
  • Every Citry UI snippet and quality scenario that uses either component renders the same page markup, manifests and compiled code as before.

Activity

  1. JuroOravec commented on Nov 22, 2026

    @JuroOravec
    MemberAuthor

    (Opus 5.5)

    A good first issue: a formatting-only change that teaches how Citry UI templates are laid out.

    Where to start:

    Comment here if you'd like to take it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions