Skip to content

test(examples): guard the sidebar CV samples against a wrapped contact row - #615

Merged
DemchaAV merged 1 commit into
feature/template-promotionfrom
test/sidebar-contact-fit-guard
Aug 30, 2026
Merged

DemchaAV merged 1 commit into
feature/template-promotionfrom
test/sidebar-contact-fit-guard

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The two sidebar CV promotions each shipped with a wrapped contact row in the example preview: the email was wider than the sidebar's text column, so the row broke and left the envelope alone on the first line. Both promotions were green — 0-pixel parity against the published template, node-identical layout snapshots, both gates committed.

That is not a hole in the parity method; it is the edge of what it measures. The gates compare the port against the published template's own fixture, whose addresses fit by construction. The example sample data is written for the repository, is not part of any parity comparison, and can outgrow the column with every test still passing. It was spotted in a rendered preview, which is the one place it shows.

What changed

  • SidebarContactRowsFitTest — renders both CV samples and asserts every Contact_* row is a single line.
  • It measures the shape of the row, not the length of the string: a channel is one paragraph, so a single-line row is as tall as its mark (8.8–11pt across the two designs) and a wrapped one is close to twice that. The bound sits between, which means the guard keeps working when a design changes its type size or its mark.
  • The failure message says what to do — shorten the value, not widen the column — because the column is the design.

Verification

Examples suite 77/77 → BUILD SUCCESS.

Fails closed, checked by restoring the address that caused it: Contact_email (21.6pt) against the 14pt bound, naming the preset and the row. The addresses themselves were shortened in #614.

Notes

  • The guard lives in the examples module because that is where the sample data is; qa cannot see it.
  • It covers the two presets that draw contact channels this way. A third would need a row in it — cheap, and the empty-list assertion says so if the node names ever stop matching.

Lane: test (examples) — no production code.

@DemchaAV
DemchaAV merged commit 0f9ce2d into feature/template-promotion Aug 30, 2026
10 checks passed
@DemchaAV
DemchaAV deleted the test/sidebar-contact-fit-guard branch August 30, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant