Fix markdown list text wrapping on Android

- Add custom list rendering rules in message.tsx for proper flex layout
- Remove flexWrap from list content styles (causes Android clipping)
- Use flex: 1 and flexShrink: 1 for natural text wrapping
- Add minWidth: 0 to content containers for proper shrinking

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mohamed Boudra
2025-12-24 04:41:37 +00:00
co-authored by Claude Opus 4.5
parent 09f130408b
commit 37da13a38b
4 changed files with 240 additions and 45 deletions
+5 -8
View File
@@ -215,13 +215,13 @@ export function createMarkdownStyles(theme: Theme) {
bullet_list: {
marginVertical: theme.spacing[2],
paddingLeft: theme.spacing[1],
paddingLeft: 0,
width: "100%" as const,
},
ordered_list: {
marginVertical: theme.spacing[2],
paddingLeft: theme.spacing[1],
paddingLeft: 0,
width: "100%" as const,
},
@@ -229,36 +229,33 @@ export function createMarkdownStyles(theme: Theme) {
marginBottom: theme.spacing[1],
flexDirection: "row" as const,
alignItems: "flex-start" as const,
width: "100%" as const,
flexShrink: 1,
},
bullet_list_content: {
flex: 1,
flexShrink: 1,
flexWrap: "wrap" as const,
},
ordered_list_content: {
flex: 1,
flexShrink: 1,
flexWrap: "wrap" as const,
},
bullet_list_icon: {
color: theme.colors.mutedForeground,
marginRight: theme.spacing[2],
marginRight: 4,
fontSize: theme.fontSize.base,
lineHeight: 22,
},
ordered_list_icon: {
color: theme.colors.mutedForeground,
marginRight: theme.spacing[2],
marginRight: 4,
fontSize: theme.fontSize.base,
fontWeight: theme.fontWeight.semibold,
lineHeight: 22,
minWidth: 20,
minWidth: 12,
},
// =========================================================================