You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several templates (templates/security/login.html.twig, templates/profile/show.html.twig, templates/profile/edit.html.twig, templates/components/Hero.html.twig, templates/assistant/show.html.twig)
all hand-roll the same <h1> markup with font-display text-[clamp(...)] font-medium leading-tight tracking-tight text-ink
classes. Extract a shared Heading Twig component that picks the
right HTML tag (h1–h6) from a prop and centralises the design
tokens.
Tasks
Add templates/components/Heading.html.twig accepting a level prop (1–6) and rendering the corresponding tag.
Support size/variant props if call-sites need more than one
visual treatment (e.g. hero vs. section heading).
Refactor existing call-sites to use the component.
Resume
Description
Several templates (
templates/security/login.html.twig,templates/profile/show.html.twig,templates/profile/edit.html.twig,templates/components/Hero.html.twig,templates/assistant/show.html.twig)all hand-roll the same
<h1>markup withfont-display text-[clamp(...)] font-medium leading-tight tracking-tight text-inkclasses. Extract a shared
HeadingTwig component that picks theright HTML tag (
h1–h6) from a prop and centralises the designtokens.
Tasks
templates/components/Heading.html.twigaccepting alevelprop (1–6) and rendering the corresponding tag.visual treatment (e.g. hero vs. section heading).
Details - AI specificities
tokens have a single source of truth.
templates/components/and are invoked via<twig:Name ...>(Twig Components bundle).