Skip to content

Commit b157a43

Browse files
yewreekaclaude
andauthored
fix(onboarding): profile sheet header full-bleed under keyboard (#1162)
* fix(onboarding): profile sheet header stays full-bleed under keyboard Keyboard avoidance lays the sheet content out below the sheet's top edge, exposing the presentation background above the lava band as a light cap with square band corners. Bleed the band's own background layer upward past the content edge (single paint layer, clipped by the sheet shape) so any gap above the header reads as the band continuing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor(onboarding): name the header bleed constant Per review on #1162: replace the magic -400 with a documented headerBleedHeight constant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 47ddd6e commit b157a43

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

Convos/Profile/ProfileSetupSheet.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ struct ProfileSetupSheet: View {
6262
@State private var contentHeight: CGFloat
6363

6464
private static let privacyAndTermsURL: String = "https://hq.convos.org/privacy-and-terms"
65+
/// How far the header band's background bleeds above the content's top
66+
/// edge. Only the sheet-clipped gap left by keyboard avoidance is ever
67+
/// visible, so the value just needs to comfortably exceed the largest
68+
/// such gap on any device; the overdraw is otherwise clipped away.
69+
private static let headerBleedHeight: CGFloat = 400.0
6570

6671
init(mode: ProfileSetupSheetMode, onSaved: (() -> Void)? = nil) {
6772
self.mode = mode
@@ -174,7 +179,14 @@ struct ProfileSetupSheet: View {
174179
// 132pt band per design: 40 above the text block, 28 below.
175180
.padding(.top, DesignConstants.Spacing.step10x)
176181
.padding(.bottom, 28.0)
177-
.background(.colorLava)
182+
// The negative padding bleeds the band upward, past the content's
183+
// top edge; the sheet's shape clips it. Keyboard avoidance lays the
184+
// content out below the sheet's top edge, which otherwise exposes
185+
// the presentation background above the header. One paint layer, so
186+
// there is no seam at the band's own edge.
187+
.background {
188+
Color.colorLava.padding(.top, -Self.headerBleedHeight)
189+
}
178190
}
179191

180192
private var nameRow: some View {

0 commit comments

Comments
 (0)