Skip to content

Commit 8e520d3

Browse files
committed
fix(mobile): keep Android markdown icons aligned with text
1 parent d29c56a commit 8e520d3

3 files changed

Lines changed: 11 additions & 2 deletions

File tree

‎apps/mobile/modules/t3-markdown-text/src/NativeMarkdownSelectableText.ios.tsx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ export function NativeMarkdownSelectableText(props: {
222222
}
223223
}
224224

225+
if (Platform.OS === "android" && (run.fileIcon || linkIcon)) {
226+
text = `\u00A0${text}`;
227+
}
228+
225229
return { key: `${signature}:${occurrence}`, run, text, linkIcon };
226230
});
227231
// T3MarkdownText only rebuilds its attributed string during native layout. A

‎apps/mobile/modules/t3-markdown-text/src/SelectableMarkdownText.ios.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { useMemo } from "react";
2-
import { View } from "react-native";
2+
import { Platform, View } from "react-native";
33
import { parseMarkdownWithOptions } from "react-native-nitro-markdown/headless";
44

55
import {
@@ -84,8 +84,10 @@ export function SelectableMarkdownText({
8484
the resulting single-line width instead of reflowing it. */}
8585
<View style={{ flexShrink: 1, minWidth: 0, marginTop, marginBottom }}>
8686
{chunks.map((chunk, index) => {
87+
// Android inline images drift when one Text mixes paragraph and list
88+
// spacer line heights. Keep those layouts in separate native blocks.
8789
const content =
88-
chunk.kind === "rich" ? (
90+
chunk.kind === "rich" || Platform.OS === "android" ? (
8991
<NativeMarkdownBlock
9092
node={chunk.node}
9193
skills={skills}

‎docs/user/composer.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ include a skill when the task needs more context.
66
Messages can contain up to 120,000 characters. Longer drafts stay in the composer
77
so you can shorten them or split them into several messages.
88

9+
On Android, long-press message text to select within a paragraph or list item.
10+
Use the message’s copy button to copy the whole message.
11+
912
## Attach files
1013

1114
Attach up to eight files per message. Images can be up to 10 MB; other files can

0 commit comments

Comments
 (0)