Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(mobile): iOS composer sizes to its draft and can go full screen #14451

Closedvoltcrash(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/14451/headopened View on GitHub

Showing 7 changed files with 14 additions and 6 deletions (loading 6).

x
0 of 7 viewed, 7 left
14 additions and 6 deletionsapps/mobile/src/features/threads/NewTaskDraftScreen.tsxModified
View file
@@ -68,6 +68,7 @@
import { COMPOSER_LAYOUT_TRANSITION, ComposerSurface } from "./ThreadComposer";
import { ComposerCommandPopover } from "./ComposerCommandPopover";
import { useComposerCommandMenu } from "./use-composer-command-menu";
+import { useComposerEditorHeight } from "./useComposerEditorHeight";
import {
ComposerDictationCancelAction,
ComposerDictationPrimaryAction,
@@ -625,6 +626,7 @@
const foregroundColor = theme["--color-foreground"];
const regularFontFamily = useFontFamily("regular");
const bodyText = useScaledTextRole("body");
+ const editorHeight = useComposerEditorHeight(bodyText.lineHeight);
​
// A new navigation to this mounted screen delivers a fresh initialProjectRef
// reference — treat it as a new request and let it apply again.
@@ -1419,11 +1421,16 @@
placeholder="Ask anything…"
singleLineCentered={false}
contentInsetVertical={0}
- style={{
- minHeight: 72,
- maxHeight: 160,
- paddingVertical: 4,
- }}
+ onContentSizeChange={editorHeight.onContentSizeChange}
+ style={
+ Platform.OS === "ios"