feat(components): shared DescriptionList Twig component family#100
Merged
Conversation
Adds `templates/components/DescriptionList/List.html.twig` and `templates/components/DescriptionList/Item.html.twig` so label/value pairs share one home. Mirrors the existing CardRail / TagList / Stats family pattern (outer container + inner item). - `DescriptionList/List` wraps in `<dl class="grid gap-4 ...">` and takes a `class` slot so the caller picks the column layout (1-col on profile pages, 2-col on assistant detail). - `DescriptionList/Item` renders a `<div><dt><dd>` triplet with the standard typography (`text-xs uppercase` label, `text-lg font-semibold` value). `label` is a translation key; the value comes from the block. Refactors the one duplicated call site on develop: - templates/assistant/show.html.twig (runtime attribute grid) Leaves `Stats/List` + `Stats/Item` alone - they're a specialised hero-stats family with a much larger value treatment (`text-3xl`) and a fixed outer layout. Collapsing them into DescriptionList would require a `size` prop that bleeds two visual identities into one component. Refs #94. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yepzdk
previously approved these changes
Jun 22, 2026
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.
Links to issues
Closes #94.
Description
templates/assistant/show.html.twighand-rolls a<dl>with two<div><dt><dd>triplets to render the runtime attribute grid.Extract a shared
DescriptionListTwig component family so themarkup and typography stay consistent across the app.
templates/components/DescriptionList/List.html.twig—outer
<dl>with aclassslot for grid/column configuration.templates/components/DescriptionList/Item.html.twig—one label/value pair with the standard typography (
text-xs uppercaselabel,text-lg font-semiboldvalue).labelis atranslation key; the value comes from the block.
templates/assistant/show.html.twig(runtime attribute grid)Mirrors the project's existing family-with-inner-item pattern
(
CardRail/Container+CardRail/Card,TagList/List+TagList/Tag,Stats/List+Stats/Item).Stats/List+Stats/Itemare intentionally left alone — they'rea specialised hero-stats family with a much larger value treatment
(
text-3xl) and a fixed outer layout. Collapsing them intoDescriptionListwould require asizeprop that bleeds twovisual identities into one component.
Screenshot of the result
n/a — the refactored assistant detail page preserves the same
markup output (the component emits the same
<dl>/<div>/<dt>/<dd>chain with identical class strings). Visual outputis unchanged.
Checklist
Verified locally:
task coding-standards-twig-check— green.task test-coverage— 70 tests, 267 assertions, 100% coverage.Additional comments or questions
Twig Components invokes nested namespaces with a colon, so the call
sites read
<twig:DescriptionList:List>/<twig:DescriptionList:Item>. Matches how<twig:Form:Label>/<twig:Form:TextInput>already read.Details - AI specificities
templates/components/DescriptionList/andare invoked via
<twig:DescriptionList:List>/<twig:DescriptionList:Item>(Twig Components bundle).unmerged user-management PRs (feat(user): add name and status fields per ADR 006 (#45, #83) #86–feat(registration): anonymous self-signup with email-domain allow-list (#62) #90) introduce
profile/*templates whose
<dl>of name/email also duplicates thismarkup — those call sites can adopt the component once their
PRs rebase onto a develop that carries it.