Repository navigation
style: put each tag attribute on its own line in Citry UI quality scenarios and component templates - #350
Merged
Conversation
…narios and component templates Part of #141 (quality scenarios and component runtime templates). As in the snippet change (08a1f2a, #345), a template tag with more than two attributes now has one attribute per line when it sat on one line or had two attributes on one line, with the closing `>` or `/>` on its own line at the tag's indent. A script rewrote 268 tags (180 in quality scenarios, 88 in component runtime templates), changing only whitespace inside start tags; it also drops four `# ruff: noqa: E501` lines that are no longer needed. 52 tags keep their compact form: 37 start on a line after another tag and 2 after text, so the script cannot give them their own indent, and 13 sit in two templates built from adjacent string literals (ctransfer_list, cform_collection), which the script leaves alone and which should become single triple-quoted templates in a follow-up. Proof: every snippet and quality scenario (716 pages) was rendered on origin/main and on this commit, with scenarios loading the compiled Vue code for each component (its definition) by URL so the code can be compared. After replacing the per-render random ids, and the preload links and integrity digests that are hashes of each definition's content, the page markup is byte-identical on all 716 pages. The JSON each page embeds to describe its Vue components (the manifest) differs only in values Citry computes from a tag's position in the template source; with those replaced by placeholders, and lists compared without regard to order, the manifests are equal. The compiled Vue render code of all 631 pages that load definitions is equal with the same placeholders, and an independent one-to-one id check confirms both. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #141: quality scenarios and component runtime templates. This is the second of three PRs. #345 covers the snippets, and the
:on*handler PR follows once both are merged.What changes
The same script as #345 rewrote 268 tags: 180 in quality scenarios and 88 in component runtime templates, which ship in the citry-ui wheel. It changes only whitespace inside start tags. Four
# ruff: noqa: E501lines that are no longer needed are removed.Proof that rendering is unchanged
Every snippet and quality scenario (716 pages) was rendered on
origin/mainand on this branch. Scenarios load their compiled Vue definitions by URL, so the code can be compared.origin/main. Markup, manifests, and render code are all equal there too.Kept compact
37 tags start on a line after another tag, and 2 after text. The script cannot give these their own indent.
13 tags in two templates built from adjacent string literals (
ctransfer_list,cform_collection). The script leaves these alone. Those two templates should become single triple-quoted templates in a follow-up, as CLAUDE.md asks.template body has backslash escapes (left untouched) (2):
ctransfer_list/ctransfer_list.py,cform_collection/cform_collection.pyafter another tag on the same line (37):
ctree_grid/ctree_grid.py:483,ctree_grid/ctree_grid.py:483,ctree_grid/ctree_grid.py:485,ctree_grid/ctree_grid.py:486,ctree_grid/ctree_grid.py:506,ctree_grid/ctree_grid.py:508,ctree_grid/ctree_grid.py:514,ccascader/ccascader.py:517,ccascader/ccascader.py:519,ccascader/ccascader.py:527,ccascader/ccascader.py:608,ccascader/ccascader.py:651,ccolor_picker/ccolor_picker.py:284,ccolor_picker/ccolor_picker.py:305,ccolor_picker/ccolor_picker.py:306,ccolor_picker/ccolor_picker.py:307,csortable/csortable.py:502,cdate_picker/quality/scenario.py:20,cdate_picker/quality/scenario.py:62,ctree_grid/quality/scenario.py:41,cdate_input/quality/scenario.py:20,cdate_input/quality/scenario.py:60,ccolor_picker/quality/scenario.py:25,ccarousel/quality/scenario.py:17,cpin_input/quality/scenario.py:79,ccalendar/quality/scenario.py:20,ccalendar/quality/scenario.py:68,cdate_range/quality/scenario.py:35,cdate_range/quality/scenario.py:36,cdate_range/quality/scenario.py:37,cdate_range/quality/scenario.py:38,cdate_range/quality/scenario.py:39,cdate_range/quality/scenario.py:44,crating/quality/scenario.py:64,ctime_picker/quality/scenario.py:20,ctime_picker/quality/scenario.py:25,ctime_picker/quality/scenario.py:81follows text on the same line (2):
csplitbutton/quality/scenario.py:48,cform_collection/quality/scenario.py:22Evidence
packages/py/citry_uitests pass (3114 passed,not e2e), as do the 28 unit-test files of the changed runtime components, the real docs build guard suite,citry-ui:check-assets, ruff, ruff format, and the validators. The cargo phases are left to PR CI.🤖 Generated with Claude Code