[00549] Text widget: thread id prop through all non-heading variants#4626
Merged
dcrjodle merged 2 commits intoJun 22, 2026
Merged
Conversation
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>
Collaborator
Staging removedStaging environment has been deleted for this PR. |
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.
Fixes #4623
Summary
Changes
Added the
idprop to all 14 non-heading text widget variants (Literal, Block, P, Inline, Blockquote, Monospaced, Lead, Muted, Danger, Warning, Success, Label, Strong, Display) so thatText.Block("...").Anchor("foo")correctly renders theidattribute 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
idprop:Literal,P,Inline,Blockquote,Monospaced,Lead,Muted,Danger,Warning,Success,Label,Strong,Display: Addedidparameter to component signature and applied to rendered elementBlock: Addedidparameter and applied to outer<div>wrapperFiles Modified
src/frontend/src/widgets/primitives/TextBlockWidget.tsx— Addedidprop to 14 variant component signatures and rendered elementssrc/frontend/src/widgets/primitives/TextBlockWidget.test.tsx— New test file with comprehensive coverage for id attribute renderingCommits