Skip to content

iOS: ~60pt dead gray band above the header when presented as a page sheet (double top inset) #42

Description

@mibrahimdev

Symptom

On iOS, presentSharingan() shows ~60pt of empty gray between the sheet's top edge and the Sharingan header row. Present in 0.1.0 and 0.1.1 (see sharingan-ios-consumer-test/accept-central/ screenshots for both).

Analysis so far

  • presentSharingan() presents SharinganViewController() with UIKit's default modal style → page sheet (SharinganViewController.kt:61).
  • The shared Scaffold applies contentWindowInsets = WindowInsets.safeDrawing (SharinganScreen.kt:150).
  • A page sheet already sits below the status bar (native sheet content is flush to its top), yet a full status-bar-sized top inset is still applied inside → the safe area is paid twice. The band is the Scaffold containerColor showing through the phantom innerPadding.
  • Android unaffected (SharinganActivity is full-screen; safeDrawing is correct there).

Constraint for any fix

Swipe-down on the sheet is currently the ONLY dismissal affordance (no close button in the header). Switching to full-screen presentation would trap users — the fix must stay on the insets side or add an explicit dismissal affordance.

Open questions

  • What does Compose Multiplatform actually report for safeDrawing inside a sheet-presented ComposeUIViewController — is this a known upstream bug?
  • How to keep correct insets for hosts that embed SharinganViewController() full-screen (push/embed) while removing the phantom inset in the sheet case?

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions