Skip to content

Support chat: use a standard return key in the composer - #26451

Merged
adalpari merged 3 commits into
trunkfrom
cmm-2872-support-chat-the-keyboards-send-key-adds-a-new-line
Nov 25, 2026
Merged

adalpari merged 3 commits into
trunkfrom
cmm-2872-support-chat-the-keyboards-send-key-adds-a-new-line

Conversation

@adalpari

@adalpari adalpari commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

TL; DR

This PR changes the appearance of the "enter" key on the keyboard. Previously, the key looked like a "send" one but the action is "add a new line".

Screenshot 2026-11-24 at 09 27 25

Description

Fixes CMM-2872.

In the support chat the keyboard's return key was a blue up arrow, identical to the send button next to the text field. Tapping it added a new line instead of sending, so you had to find the separate send button.

The cause is that the composer's text field is laid out on the vertical axis. A vertical-axis TextField treats return as a new line and never fires onSubmit, so the existing .onSubmit(sendIfPossible) never ran — the .submitLabel(.send) was decoration over a key that could not send.

This takes the second option from the issue: keep return as a new line, and give it the standard return key so it no longer looks like send. Entering a new line with return is what most chat apps do, so the behaviour is unchanged and only the key's appearance is corrected. The dead onSubmit goes with it; the send button stays the only way to send.

What I ran

  • I built this change and ran the affected tests locally

xcodebuild -workspace WordPress.xcworkspace -scheme WordPress -destination 'platform=iOS Simulator,name=iPhone 18 Pro' build → ** BUILD SUCCEEDED **

No tests apply: the change is a keyboard-label modifier on a SwiftUI view with no logic, and UnifiedSupportComposer has no test coverage.

Testing instructions

  1. Open Me → Help & Support → Get help, then start a new chat.
  2. Tap the message field.
  3. The return key is now a standard ⏎, visually distinct from the blue up-arrow send button.
  4. Tap it — it still adds a new line and does not send.
  5. Type a message and tap the blue send button — it still sends and clears the field.

🤖 Generated with Claude Code

The composer's text field is laid out on the vertical axis, so the return
key inserts a new line and never fires `onSubmit`. Labelling it `.send`
drew a blue up arrow identical to the send button beside the field, so the
key promised a send it could not perform.

Use the standard return key instead, and drop the `onSubmit` handler that
a vertical field never calls. The send button remains the only way to send.
@dangermattic

dangermattic commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator
1 Warning
⚠️ PR is not assigned to a milestone.

Generated by 🚫 Danger

@adalpari
adalpari added this pull request to the merge queue Nov 25, 2026
Merged via the queue into trunk with commit a8eecf9 Nov 25, 2026
21 checks passed
@adalpari
adalpari deleted the cmm-2872-support-chat-the-keyboards-send-key-adds-a-new-line branch November 25, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants