Skip to content

Commit ab47386

Browse files
t3dotggclaude
andauthored
fix(mobile): full-screen HTML renders keep a side gutter (#15998)
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
1 parent b043ae7 commit ab47386

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎apps/mobile/src/features/threads/HtmlRenderWebView.tsx‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { useAssetUrlState, useRefreshAssetUrl } from "../../state/assets";
2020
import { useAppearancePreferences } from "../settings/appearance/AppearancePreferencesProvider";
2121

2222
const ROW_BOTTOM_MARGIN = 8;
23+
const FULL_SCREEN_GUTTER = 16;
2324

2425
/** A render row is its frame's height plus spacing; the page's content never sizes it. */
2526
export function htmlRenderRowHeight(frameHeight: number) {
@@ -114,8 +115,20 @@ export function HtmlRenderWebView(props: {
114115
setGeneration((value) => value + 1);
115116
};
116117
const scrollable = !props.nested || overflows;
118+
// Pages have no horizontal padding of their own, so full screen adds the
119+
// feed's gutter in the page's background color.
117120
return (
118-
<View style={{ flex: 1 }}>
121+
<View
122+
style={
123+
props.nested
124+
? { flex: 1 }
125+
: {
126+
flex: 1,
127+
paddingHorizontal: FULL_SCREEN_GUTTER,
128+
backgroundColor: theme.variables["--background"],
129+
}
130+
}
131+
>
119132
<WebView<object>
120133
key={generation}
121134
ref={webView}

0 commit comments

Comments
 (0)