Skip to content

Conversation

@bjdodson-openai
Copy link

@bjdodson-openai bjdodson-openai commented Jan 21, 2026

Summary

Adds first-class link decoration support to compose-richtext so consumers can render dotted/dashed underlines that respect line wrapping, and wires the API through Markdown rendering.
Updates the demo to showcase the new styles and line wrapping.

Changes

  • New API: RichTextDecorations, LinkDecoration, and UnderlineStyle to customize link underline styles.
  • Link rendering now suppresses default underline when a custom underline is applied.
  • Underline rendering uses TextLayoutResult to draw line-aware dotted/dashed underlines.
  • Markdown entrypoints and renderers pass richTextDecorations through.
  • Demo updated with dotted/dashed link examples and a long, wrapping dotted link.
  • AstBlockNodeComposer.Compose signature updated to include richTextDecorations.

Behavior

  • Links matched by LinkDecoration.matcher can render dotted/dashed underlines while preserving default behavior for other links.
  • Underlines follow line wraps and align visually with text layout.

Testing

Screenshot_20260120_222718 image

Notes / Compatibility

  • Any custom AstBlockNodeComposer implementations must add the new richTextDecorations parameter.

Follow-ups

  • Add inline image override API to compose-richtext for parity with app-side reflection logic.
  • Consider consolidating underline styles into a CustomDash if we want a single style type.

Codex

Prompt/context: “Add reusable dotted/dashed underline support for links in compose-richtext; draw underlines using TextLayoutResult so they respect wrapping. Wire through Markdown and update the demo to show long wrapped dotted underline examples.”

@bjdodson-openai bjdodson-openai marked this pull request as draft January 21, 2026 06:20
@bjdodson-openai bjdodson-openai marked this pull request as ready for review January 21, 2026 06:34
@bjdodson-openai bjdodson-openai merged commit 1048d0d into main Jan 21, 2026
1 of 2 checks passed
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.

3 participants