Skip to content

feat: Component: InlineAlert - #235

Draft
tbielich with Copilot wants to merge 3 commits into
mainfrom
copilot/add-inline-alert-component
Draft

feat: Component: InlineAlert#235
tbielich with Copilot wants to merge 3 commits into
mainfrom
copilot/add-inline-alert-component

Conversation

Copilot AI commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Implements the InlineAlert component across all 10 integration surfaces. InlineAlert is an inline contextual message for informing users within content flow, with info/positive/negative/notice variants, optional dismiss, and icon + title + description anatomy.

Component tokens

Added InlineAlert entry to figma/exports/Patterns (UI).tokens.json with 20 tokens (per-variant container background, border color, text color; shared border size, radius, padding, gap) aliasing existing semantic tokens. Regenerated dist/tokens/css/patterns-ui.tokens.css.

CSS pattern — src/ui/patterns/inline-alert.css

  • Variants: default, info, positive, negative, notice
  • Parts: uif-inline-alert-icon, uif-inline-alert-content, uif-inline-alert-title, uif-inline-alert-description, uif-inline-alert-dismiss
  • Dismissible state: .is-hidden (toggled on dismiss)

Nunjucks macro — site/_includes/macros/ui.njk

{{ uif.inlineAlert(title="Success", description="Saved.", variant="positive") }}
{{ uif.inlineAlert(title="Error", variant="negative", dismissible=true) }}

Auto-selects a variant-appropriate icon; accepts caller() for optional action slot.

Web Component — src/elements/ui-inline-alert.js

<uif-inline-alert variant="negative" title="Error" dismissible></uif-inline-alert>

Icon attribute is validated against ^[a-z0-9]+(?:-[a-z0-9]+)*$ to prevent XSS. User-provided text is set via textContent rather than interpolated into innerHTML. Fires uif-dismiss on close.

Other surfaces

  • Docs page + playground: site/patterns/inline-alert.md, site/patterns/inline-alert-playground.md
  • Playground renderer: renderVanillaInlineAlert added to site/assets/playground/renderers.js
  • Code Connect: schemas/web-inline-alert.figma.ts + schemas/web-inline-alert.ts (optional props)
  • Migration guide: MIGRATION.md component-family map entry added
  • Naming contract: scripts/vault-naming-contract.generated.js regenerated to include inline-alert
  • Tests: tests/inline-alert-naming-migration.test.mjs (8 tests covering CSS, tokens, emitters, element export, migration entry, docs)

Review checklist

  • Terminology is consistent with docs/terminology.md.
  • docs/canonical-reference-matrix.md is updated when new terms, rules, or canonical sources are introduced.
  • @ui-foundations-maintainers has been notified for review.
  • Ownership remains team-based; no person-specific or parallel ownership rule is introduced.
  • Changes preserve the Runtime/Vault authority boundary.
  • Relevant documentation and CI checks pass.

Copilot AI linked an issue Jul 22, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add inline alert component for user notifications feat: Component: InlineAlert Jul 22, 2026
Copilot AI requested a review from tbielich July 22, 2026 13:00
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.

Component: InlineAlert

2 participants