Skip to content

feat(chat): formatting tools in the chat composer - #1750

Open
bmc08gt wants to merge 2 commits into
feat/chat-text-format-renderfrom
feat/chat-text-format-composer
Open

bmc08gt wants to merge 2 commits into
feat/chat-text-format-renderfrom
feat/chat-text-format-composer

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Adds the composer's formatting tools, behind a new ChatFormattingComposer feature flag (off by default, visible in the staff menu). Rendering stays unflagged.

Stacked on #1748: the dimmed markers and the link sheet's validation call parseChatText, which that PR adds. Retarget to code/cash once it merges.

  • Single line: B, I, S, </> and Link lead the system text toolbar as short text labels, through a TextContextMenuProvider over a floating ActionMode (Figma node 11278:806). Items are disabled when the parser would not take the markers (a selection that starts mid-word).
  • Two or more lines: an Aa button joins the + in the controls row and hides when the field is one row again. It opens a strip docked under the composer with B, I, S, code, link, bulleted, numbered, quote and code block (node 11272:844). SelectableIconButton and ComposerFormatStrip are new ui/components pieces.
  • Wrapping and toggling live in :libs:text-format (toggleInline, toggleLine, insertLink, consumedRanges), pure and unit-tested. Whitespace at the selection's ends stays outside the markers, a second tap removes them, no selection inserts the pair with the cursor between (which arms the style), and line buttons add or remove a prefix on every touched line.
  • Link opens a small sheet and accepts only exactly one detected link that the parser would also mask (maskableUrlOrNull).
  • Markers stay visible in the field, dimmed, through an OutputTransformation on ChatInput.

Tests: ComposerFormattingTest (18 cases, JVM and iOS-simulator targets) and ComposerLinkTest in :apps:flipcash:shared:chat-ui.

@bmc08gt bmc08gt self-assigned this Oct 9, 2026
@github-actions github-actions Bot added type: feature New functionality area: ui Compose UI, theme, components, resources and removed type: feature New functionality labels Oct 9, 2026
@bmc08gt
bmc08gt force-pushed the feat/chat-text-format-render branch from e115d7c to 303e8f6 Compare October 13, 2026 12:02
@bmc08gt
bmc08gt force-pushed the feat/chat-text-format-composer branch from 1800bdb to b32c8e5 Compare October 13, 2026 12:02
@github-actions github-actions Bot added the type: feature New functionality label Oct 13, 2026
Lint's LocalContextGetResourceValueCall failed lintDebug on #1750:
labels read through LocalContext.current don't follow a configuration
change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Compose UI, theme, components, resources type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant