-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Overview
The Windows Community Toolkit 7.x MarkdownTextBlock
had a richer feature set than the current 8.x implementation. This issue tracks completion of feature parity by restoring missing properties and functionality.
7.x had 61 properties, 8.x baseline had 43 properties (18 properties missing). With PR #729 and existing capabilities, we've restored most of the gap.
Completed
8.x Baseline (Pre-PR #729)
The 8.x implementation launched with 32 properties:
- Headers (18): Individual font sizes (H1-H6), font weights (H1-H6), margins (H1-H6)
- Inline code (7): Background, border (brush/thickness), font family, foreground, margin, padding
- New in 8.x (6): Config (MarkdownConfig), BaseUrl, ImageProvider/SVGRenderer, Padding, InternalMargin, CornerRadius
- Functionality (1): IsTextSelectionEnabled (already implemented, verified in
MarkdownTextBlock.Properties.cs
lines 114-127, 224-228)
PR #729 Restorations
PR #729 achieved comprehensive styling parity, restoring 33 properties across all major markdown elements:
- Code blocks (7): Background, border, font, foreground, margin, padding
- Quotes (6): Background, border, foreground, margin, padding
- Tables (4): Border, cell padding, margin
- Lists (3): Bullet spacing, gutter width, margin
- Paragraphs (2): Margin, line height
- Horizontal rules (3): Brush, margin, thickness
- Images (3): Max height/width, stretch mode
- Links (1): Foreground color
- Header colors (6): Individual foreground for H1-H6
- YAML (2): Border brush, thickness
Missing Features
The following 5 properties from 7.x remain to be ported:
Syntax Highlighting
- UseSyntaxHighlighting + CodeStyling (HIGH complexity)
- Enable/disable syntax highlighting with custom style configuration. Requires syntax highlighting engine integration.
- 7.x Reference:
MarkdownTextBlock.Properties.cs
lines 30-48, 361-378
Text Wrapping
- TextWrapping (LOW complexity)
- Control text wrap behavior in rendered markdown
- 7.x Reference:
MarkdownTextBlock.Dimensions.cs
lines 315-323, 658-662 |MarkdownTextBlock.Methods.cs
line 149
URI Customization
- UriPrefix + SchemeList (MEDIUM complexity)
- Custom URI prefix for relative links and allowed URI schemes for validation
- 7.x Reference:
MarkdownTextBlock.Properties.cs
lines 659-672 |MarkdownTextBlock.Methods.cs
lines 58-65
Emoji Font
- EmojiFontFamily (LOW complexity)
- Custom font family for emoji rendering
- 7.x Reference:
MarkdownTextBlock.Properties.cs
lines 475-479 |MarkdownTextBlock.Methods.cs
line 112
Code Block Wrapping
- WrapCodeBlock (LOW complexity)
- Enable/disable text wrapping in code blocks
- 7.x Reference:
MarkdownTextBlock.Properties.cs
lines 369-373 |MarkdownTextBlock.Methods.cs
line 154
Implementation Notes
Progress:
- 7.x baseline: 61 properties
- 8.x baseline: 43 properties (18 missing)
- After PR [MarkdownTextBlock] Add a lot more styling properties #729 + IsTextSelectionEnabled: ~57 properties restored
- Remaining: 5 properties for complete parity
Complexity: Only 1 HIGH complexity feature (syntax highlighting), 4 are straightforward property ports with LOW-MEDIUM complexity.
7.x Source: All references point to WindowsCommunityToolkit rel/7.1.2 for implementation guidance.