Skip to content

[00549] Text widget: thread id prop through all non-heading variants#4626

Merged
dcrjodle merged 2 commits into
developmentfrom
tendril/00549-TextWidgetThreadIdPropThroughAllNonheadingVariants
Jun 22, 2026
Merged

[00549] Text widget: thread id prop through all non-heading variants#4626
dcrjodle merged 2 commits into
developmentfrom
tendril/00549-TextWidgetThreadIdPropThroughAllNonheadingVariants

Conversation

@dcrjodle

Copy link
Copy Markdown
Collaborator

Fixes #4623

Summary

Changes

Added the id prop to all 14 non-heading text widget variants (Literal, Block, P, Inline, Blockquote, Monospaced, Lead, Muted, Danger, Warning, Success, Label, Strong, Display) so that Text.Block("...").Anchor("foo") correctly renders the id attribute on the DOM element. Added comprehensive test coverage for id attribute rendering across all variants.

API Changes

All non-heading variant components now accept and render the id prop:

  • Literal, P, Inline, Blockquote, Monospaced, Lead, Muted, Danger, Warning, Success, Label, Strong, Display: Added id parameter to component signature and applied to rendered element
  • Block: Added id parameter and applied to outer <div> wrapper

Files Modified

  • src/frontend/src/widgets/primitives/TextBlockWidget.tsx — Added id prop to 14 variant component signatures and rendered elements
  • src/frontend/src/widgets/primitives/TextBlockWidget.test.tsx — New test file with comprehensive coverage for id attribute rendering

Commits

dcrjodle and others added 2 commits June 22, 2026 12:13
Add id prop to 14 non-heading variants (Literal, Block, P, Inline,
Blockquote, Monospaced, Lead, Muted, Danger, Warning, Success,
Label, Strong, Display) so Text.Block("...").Anchor("foo") renders
the id attribute correctly for #fragment scrolling.

Add comprehensive tests for id attribute rendering across all variants.

Refs: #4623

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace React Testing Library with vitest + renderToString pattern
that matches other tests in the codebase.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@dcrjodle dcrjodle merged commit 2fc48c5 into development Jun 22, 2026
8 of 10 checks passed
@dcrjodle dcrjodle deleted the tendril/00549-TextWidgetThreadIdPropThroughAllNonheadingVariants branch June 22, 2026 12:24
@artem-ivy-ai

Copy link
Copy Markdown
Collaborator

Staging removed

Staging environment has been deleted for this PR.

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.

Text widget: Anchor id is dropped by all non-heading variants (breaks #fragment scroll)

2 participants