feat(composer): list, quote, and strikethrough toolbar buttons (LC-300) #328

Merged
longjacksonle merged 1 commit from feat/lc-300-composer-toolbar-blocks into main 2026-06-15 01:25:53 +02:00

Summary

Adds List, Quote, and Strikethrough buttons to the composer's Markdown formatting toolbar (LC-254), alongside the existing Bold / Italic / Code / Link.

Changes

  • server/templates/room/composer.html: three new [data-lc-fmt] buttons (text "S" line-through for strike; inline SVGs for list and quote), placed after Link and before the Preview toggle. The LC-254 IIFE gains a linePrefix(prefix, placeholder) helper (expands selection to whole lines, prefixes each; prefixes the current line or inserts a placeholder when there is no selection) and three apply() cases: strike (reuses inline wrap('~~','~~')), ul (- ), quote (> ). All dispatch the synthetic input that drives auto-resize / draft-save / send-enable.
  • server/locales/{en,es}/room.ftl: label + placeholder keys for the three.
  • server/src/views/markdown.rs: unit tests pinning ~~x~~ -> <del> and > q -> <blockquote> (<ul> already covered), so the toolbar output's render contract is guarded.

No keyboard shortcuts for the three (the Ctrl+B/I surface is unchanged); no server route/DB change (the renderer already supports all three).

Testing

  • just check, just fmt, just test, just test-saas all pass.

Not operator-visible (no env/config/contract change).

## Summary Adds List, Quote, and Strikethrough buttons to the composer's Markdown formatting toolbar (LC-254), alongside the existing Bold / Italic / Code / Link. ## Changes - `server/templates/room/composer.html`: three new `[data-lc-fmt]` buttons (text "S" line-through for strike; inline SVGs for list and quote), placed after Link and before the Preview toggle. The LC-254 IIFE gains a `linePrefix(prefix, placeholder)` helper (expands selection to whole lines, prefixes each; prefixes the current line or inserts a placeholder when there is no selection) and three `apply()` cases: `strike` (reuses inline `wrap('~~','~~')`), `ul` (`- `), `quote` (`> `). All dispatch the synthetic input that drives auto-resize / draft-save / send-enable. - `server/locales/{en,es}/room.ftl`: label + placeholder keys for the three. - `server/src/views/markdown.rs`: unit tests pinning `~~x~~` -> `<del>` and `> q` -> `<blockquote>` (`<ul>` already covered), so the toolbar output's render contract is guarded. No keyboard shortcuts for the three (the Ctrl+B/I surface is unchanged); no server route/DB change (the renderer already supports all three). ## Testing - `just check`, `just fmt`, `just test`, `just test-saas` all pass. Not operator-visible (no env/config/contract change).
feat(composer): list, quote, and strikethrough toolbar buttons (LC-300)
All checks were successful
check-secrets / Nosey parker (push) Successful in 4s
check-secrets / Kingfisher (push) Successful in 4s
check-secrets / TruffleHog (push) Successful in 5s
check-secrets / Nosey parker (pull_request) Successful in 4s
check-secrets / Kingfisher (pull_request) Successful in 4s
check-secrets / TruffleHog (pull_request) Successful in 5s
Check / clippy + fmt + tests (pull_request) Successful in 2m31s
Create release / Create release from merged PR (pull_request) Has been skipped
3b2f5ce48f
Add List, Quote, and Strikethrough buttons to the Markdown formatting toolbar (LC-254), filling out the inline + block formatting the renderer already supports.

Strikethrough reuses the existing inline wrap helper (`~~...~~`, GFM already enabled). List and Quote are line-oriented: a new `linePrefix(prefix, placeholder)` helper expands the selection to whole lines and prefixes each (`- ` / `> `), or prefixes the current line / inserts a placeholder when there is no selection. All three re-select the inserted text and dispatch the synthetic input that drives auto-resize, draft-save, and send-enable, identical to the existing buttons. No new keyboard shortcuts.

A markdown unit test pins that the produced syntax renders as `<del>` / `<blockquote>` (`<ul>` was already covered). en/es parity for the new label/placeholder keys.

#LC-300
#LC-301

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
longjacksonle deleted branch feat/lc-300-composer-toolbar-blocks 2026-06-15 01:25:53 +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/lets-chat!328
No description provided.