fix(ui): parse markdown changelog properly in update settings and dialogs - #364
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughMarkdown input is normalized before parsing. Release notes are rendered as structured descriptions, titled sections, and bullet items, with a raw-text fallback. ChangesRelease Notes Flow
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Sequence Diagram(s)sequenceDiagram
participant UpdateSettings
participant MarkdownParser
participant ReleaseNotesUI
UpdateSettings->>MarkdownParser: parse release-note text
MarkdownParser-->>UpdateSettings: return description and sections
UpdateSettings->>ReleaseNotesUI: render styled descriptions and bullet items
UpdateSettings->>ReleaseNotesUI: render raw notes when parsing returns no content
Merge Risk: ⚪ Minimal · up to The reviewed Markdown rendering changes have no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of Changes
Recently, a "What's New" section was added to Update Settings to display the latest release notes. However, the raw release body was passed directly to a single
Textcomposable, causing Markdown headings (###), bullet points (-), and contributor links to render as unformatted text. Additionally, GitHub's auto-generated contributor release notes use nested markdown links ([[user](url)](url)), which caused raw URLs and brackets to be displayed instead of clean clickable usernames across all changelogs.This PR addresses both issues:
parseMarkdownToSections()inUpdateSettings.ktto convert release notes into structured sections with bold primary headers (titleSmall) and hanging-indent bullet rows (•), matchingUpdateAvailableDialog.MarkdownParser.ktandUpdaterComponents.ktto unpack GitHub's nested[[username](url)](url)into[username](url), rendering clean, clickable contributor profile links without raw URL syntax.Type of Change
Screenshots
1. Update Settings ("What's New" Section)
2. Update Available Dialog (Contributors Links)
How Has This Been Tested?
Checklist
Summary by CodeRabbit