feat(compose): paragraph alignment #76

Closed
opened 2026-07-01 21:22:48 +00:00 by JMR-dev · 0 comments
JMR-dev commented 2026-07-01 21:22:48 +00:00 (Migrated from github.com)

Part of the compose rich-formatting epic — stacked on the rich-text foundation ticket (branch feat-richtext-foundation), which provides the RichAlignment model, text-align serialization, and the ParagraphStyle mapping hook.

Scope

  • setAlignment(content, start, end, align) + alignmentAt(...) ops in richtext/RichTextEditing.kt with paragraph-range bookkeeping (pattern: toggleBlock); ranges must stay consistent under editing. This is the only wave-2 ticket touching RichTextEditing.kt.
  • 3-state toolbar control (start / center / end, text glyphs); editor renders alignment ranges via ParagraphStyle(textAlign).

Acceptance

  • Per-paragraph text-align round-trips; ops unit-tested (multi-paragraph selections, empty lines, typing across boundaries); androidTest. If in-field ParagraphStyle rendering misbehaves, keep the model/HTML correct and document the in-editor rendering gap in the PR.
Part of the compose rich-formatting epic — stacked on the rich-text foundation ticket (branch `feat-richtext-foundation`), which provides the `RichAlignment` model, `text-align` serialization, and the `ParagraphStyle` mapping hook. **Scope** - `setAlignment(content, start, end, align)` + `alignmentAt(...)` ops in `richtext/RichTextEditing.kt` with paragraph-range bookkeeping (pattern: `toggleBlock`); ranges must stay consistent under editing. This is the only wave-2 ticket touching `RichTextEditing.kt`. - 3-state toolbar control (start / center / end, text glyphs); editor renders alignment ranges via `ParagraphStyle(textAlign)`. **Acceptance** - Per-paragraph `text-align` round-trips; ops unit-tested (multi-paragraph selections, empty lines, typing across boundaries); androidTest. If in-field `ParagraphStyle` rendering misbehaves, keep the model/HTML correct and document the in-editor rendering gap in the PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: JMR-dev/LibreMail#76