Wires the previously-unused ColorSwatchRow composable into the compose FormattingToolbar, adding the two color controls the rich-text engine already supported end-to-end (serialize/parse/render) but had no UI for.
Font color button (A) applies RichStyle.FontColor(argb) over the selection; its glyph tints to the selection's current color.
Highlight button (H) applies RichStyle.Highlight(argb) over the selection; its background previews the selection's current highlight.
Both open a shared ColorPickerDialog built on the existing ColorSwatchRow:
ColorSwatchRow's leading "no color" / "none" entry clears the style outright via a new clearStyle op (needed because toggleStyle only removes a value when the selection is already uniformly that exact value).
Colors are opaque ARGB Ints (matching RichStyle.FontColor(argb: Int) / RichStyle.Highlight(argb: Int)), so they round-trip through the existing color: / background-color: HTML serialization.
Accessibility
Each toolbar button keeps the existing onClickLabel pattern (format_color, format_highlight); individual swatches carry their own contentDescription from ColorSwatchRow.
New user-facing strings added to strings.xml (format_color, format_highlight, and swatch labels); reuses the pre-existing format_color_none.
Tests
Added JVM unit tests for clearStyle (removes a color span regardless of value, splits partial-overlap spans, leaves other style kinds intact, no-op on a collapsed selection).
Local gate green under JDK 21: :app:assembleDebug :app:testDebugUnitTest :app:lintDebug :app:ktlintCheck :app:detekt :app:compileDebugAndroidTestKotlin — BUILD SUCCESSFUL.
## Summary
Wires the previously-unused `ColorSwatchRow` composable into the compose `FormattingToolbar`, adding the two color controls the rich-text engine already supported end-to-end (serialize/parse/render) but had no UI for.
- **Font color** button (`A`) applies `RichStyle.FontColor(argb)` over the selection; its glyph tints to the selection's current color.
- **Highlight** button (`H`) applies `RichStyle.Highlight(argb)` over the selection; its background previews the selection's current highlight.
- Both open a shared `ColorPickerDialog` built on the existing `ColorSwatchRow`:
- Font color: ~8 fixed swatches (black, gray, red, orange, yellow, green, blue, purple).
- Highlight: typical marker colors (yellow / green / cyan / pink).
- `ColorSwatchRow`'s leading "no color" / "none" entry clears the style outright via a new `clearStyle` op (needed because `toggleStyle` only removes a value when the selection is already uniformly that exact value).
- Colors are opaque ARGB `Int`s (matching `RichStyle.FontColor(argb: Int)` / `RichStyle.Highlight(argb: Int)`), so they round-trip through the existing `color:` / `background-color:` HTML serialization.
## Accessibility
- Each toolbar button keeps the existing `onClickLabel` pattern (`format_color`, `format_highlight`); individual swatches carry their own `contentDescription` from `ColorSwatchRow`.
- New user-facing strings added to `strings.xml` (`format_color`, `format_highlight`, and swatch labels); reuses the pre-existing `format_color_none`.
## Tests
Added JVM unit tests for `clearStyle` (removes a color span regardless of value, splits partial-overlap spans, leaves other style kinds intact, no-op on a collapsed selection).
Local gate green under JDK 21: `:app:assembleDebug :app:testDebugUnitTest :app:lintDebug :app:ktlintCheck :app:detekt :app:compileDebugAndroidTestKotlin` — BUILD SUCCESSFUL.
Closes #74
Closes #75
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Wires the previously-unused
ColorSwatchRowcomposable into the composeFormattingToolbar, adding the two color controls the rich-text engine already supported end-to-end (serialize/parse/render) but had no UI for.A) appliesRichStyle.FontColor(argb)over the selection; its glyph tints to the selection's current color.H) appliesRichStyle.Highlight(argb)over the selection; its background previews the selection's current highlight.ColorPickerDialogbuilt on the existingColorSwatchRow:ColorSwatchRow's leading "no color" / "none" entry clears the style outright via a newclearStyleop (needed becausetoggleStyleonly removes a value when the selection is already uniformly that exact value).Ints (matchingRichStyle.FontColor(argb: Int)/RichStyle.Highlight(argb: Int)), so they round-trip through the existingcolor:/background-color:HTML serialization.Accessibility
onClickLabelpattern (format_color,format_highlight); individual swatches carry their owncontentDescriptionfromColorSwatchRow.strings.xml(format_color,format_highlight, and swatch labels); reuses the pre-existingformat_color_none.Tests
Added JVM unit tests for
clearStyle(removes a color span regardless of value, splits partial-overlap spans, leaves other style kinds intact, no-op on a collapsed selection).Local gate green under JDK 21:
:app:assembleDebug :app:testDebugUnitTest :app:lintDebug :app:ktlintCheck :app:detekt :app:compileDebugAndroidTestKotlin— BUILD SUCCESSFUL.Closes #74
Closes #75
🤖 Generated with Claude Code