feat(ui): render Markdown in ticket and project descriptions (PMS-309) #174

Merged
longjacksonle merged 1 commit from feat/PMS-309-render-markdown-descriptions into main 2026-06-16 01:01:45 +02:00

Implements PMS-309.

Problem

Detail-page "Description" displays rendered raw text, so Markdown an author wrote (headings, lists, bold, links) appeared literally - even though KB article bodies already render Markdown via the sanitized render_markdown pipeline.

Changes

  • New reusable Markdown component (src/components/markdown.rs): wraps crate::utils::markdown::render_markdown (ammonia-sanitized) + Tailwind prose styling, mirroring the KB article body.
  • Used it for the ticket "Description" card (tickets.rs) and the project "Overview" (projects.rs). Empty descriptions keep the existing placeholder.
  • Short single-line description fields in definition lists (e.g. rate-card Details) left as plain text.

Verification

just pre-commit (pinned rust 1.94 = CI) passes: fmt, clippy -D warnings, cargo check --target wasm32-unknown-unknown, all 91 lib tests.

Acceptance criteria

  • Ticket description written in Markdown renders as formatted HTML.
  • Project Overview renders Markdown the same way.
  • Output stays sanitized (reuses the ammonia-backed renderer).
  • Empty descriptions still show the "No description" placeholder.

🤖 Generated with Claude Code

Implements PMS-309. ## Problem Detail-page "Description" displays rendered raw text, so Markdown an author wrote (headings, lists, bold, links) appeared literally - even though KB article bodies already render Markdown via the sanitized `render_markdown` pipeline. ## Changes - New reusable `Markdown` component (`src/components/markdown.rs`): wraps `crate::utils::markdown::render_markdown` (ammonia-sanitized) + Tailwind `prose` styling, mirroring the KB article body. - Used it for the ticket "Description" card (`tickets.rs`) and the project "Overview" (`projects.rs`). Empty descriptions keep the existing placeholder. - Short single-line description fields in definition lists (e.g. rate-card Details) left as plain text. ## Verification `just pre-commit` (pinned rust 1.94 = CI) passes: fmt, clippy `-D warnings`, `cargo check --target wasm32-unknown-unknown`, all 91 lib tests. ## Acceptance criteria - [x] Ticket description written in Markdown renders as formatted HTML. - [x] Project Overview renders Markdown the same way. - [x] Output stays sanitized (reuses the ammonia-backed renderer). - [x] Empty descriptions still show the "No description" placeholder. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(ui): render Markdown in ticket and project descriptions (PMS-309)
All checks were successful
Create release / Create release from merged PR (pull_request) Has been skipped
Check / clippy + fmt + tests (pull_request) Successful in 1m42s
1a94c15e6f
The detail-page "Description" displays rendered raw text, so Markdown an author wrote (headings, lists, bold, links) showed up literally - even though KB article bodies already render Markdown via the sanitized render_markdown pipeline.

Add a small reusable Markdown component (wraps crate::utils::markdown::render_markdown, which sanitizes with ammonia, plus Tailwind `prose` styling, mirroring the KB body) and use it for the ticket "Description" card (tickets.rs) and the project "Overview" (projects.rs). Empty descriptions keep their existing placeholder. Short single-line description fields in definition lists (e.g. rate-card Details) are left as plain text.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/PMS-309-render-markdown-descriptions 2026-06-16 01:01:45 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!174
No description provided.