Render submitted form answers as a list (PMS-747) #504
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/PMS-747-form-answer-markdown"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
PMS-747 F6. Found while reproducing the reported approval confusion, not reported itself, and visible in that report's own screenshot: a ticket raised from a client's submission read "First name: David Last name: Randall Phone number: 9194047511" on a single line.
The answers were joined with plain newlines, but the SPA renders a ticket description as Markdown (
src/pages/tickets.rs, PMS-309), where a single newline is not a line break. So every answer collapsed into one paragraph, and the more the form asked for the worse the ticket read for whoever had to work it.They are now a Markdown list, one answer per line, label in bold. A textarea answer carries the client's own newlines; those become hard breaks with the continuation indented into the list item, so the client's paragraphing survives instead of collapsing the same way the answers did.
The rest of PMS-747 is SPA-side and goes out as mokosh-apps #498. This change is independent of it: the run-on description predates that PR and is fixed by this one alone.
Testing
cargo fmt --all --check,cargo clippy --all-targets,cargo test --lib(three new tests onrender_answers: one line per answer, hard breaks preserved inside a multi-line answer, unanswered fields dropped and order following the form). No migration and no API shape change.