feat(mobile): page comments on the native composer (suggestion for #7810)
A suggestion for #7810, as one commit on top of 3e576fff9f. @harshithmullapudi, please validate it on your side before merging it into your branch.
Review with screenshots: https://app.superset.sh/page/pr-7810-review-mobile-comment-bottom-sheet-6btmik
What
- Page comments use the native composer, the one Home and the workspace already use, instead of a
CommentComposerin aformSheet. With the keyboard up, the sheet ran behind the keyboard. react-native-screens has no keyboard handling, so iOS extended the sheet under it. The native composer tracks the keyboard itself. - The composer gains
controls: a caller's own buttons in the expanded control row beside+, drawn like the mic and send. A control with amenuopens a native menu, which covers the presets.disabledkeeps quick replies from posting over a typed draft, which was your rule. - Reply drafts are kept per thread in the all-comments sheet, so tapping Reply on another thread no longer throws away a half-written reply.
- Deleted, now without callers: the comment route,
CommentSheet,QuickReplies,@superset/symbol-button, and the pick fields of the page comment store. focus()waits one frame after mount, because the overlay attaches after the first commit.
Verified
On an iPhone 17 Pro Max simulator (iOS 26) against production, with a fresh native build:
- Opening the composer on a block works.
- The keyboard-up layout works.
- A typed post works.
- Thumbs-up and presets work.
- Quick replies stay disabled while a draft is typed.
- Tapping outside closes the composer.
- Reply drafts are kept per thread.
Typecheck, biome, check:i18n and the page tests are clean. The catalogs didn't change, because the quick-reply labels reuse your translated ids.
Not verified
- VoiceOver
- A physical device
- The preview-sheet presentation of the page
Needs a native rebuild (ios/ pods), since it adds a Swift file to the composer and removes a module.
Open design call
The composer dims the page while it's open, which hides the outlined block. backdrop="passthrough" would keep the block visible, but it lets taps reach the page while typing.
Summary by cubic
Replaces the page comment sheet with the native composer, so the keyboard no longer runs behind the form sheet. The old fitToContents sheet had no keyboard handling; the native composer tracks the keyboard itself.
The composer gains caller-defined controls in the expanded row beside +, which power the page's quick replies: delete, approve, and a native menu of presets. Controls stay disabled while a draft is typed, and reply drafts in the all-comments sheet are now kept per thread instead of being discarded when switching threads. The now-unused comment route, CommentSheet, QuickReplies, @superset/symbol-button, and the pick fields of the page comment store are removed.
Migration
- Requires a native rebuild (iOS pods): the composer adds a Swift file and removes a module.