Skip to content

feat(modal): support opt-in inset iOS sheet presentations - #31607

Closed
rdlabo wants to merge 1 commit into
ionic-team:mainfrom
rdlabo:fix/ios-sheet-insets
Closed

rdlabo wants to merge 1 commit into
ionic-team:mainfrom
rdlabo:fix/ios-sheet-insets

Conversation

@rdlabo

@rdlabo rdlabo commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Related: rdlabo-dev/ionic-theme-ios27#269

What is the current behavior?

iOS sheet modals meet the side and bottom edges of the viewport at partial breakpoints. CSS alone cannot keep an inset sheet's visible bounds and rounded lower corners synchronized with interactive dragging and breakpoint transitions.

Independent iOS 27.0 simulator measurements show that native iPhone sheets have side and bottom gaps at partial detents and return to full width at the large detent. iPad uses a different presentation policy.

What is the new behavior?

  • Add opt-in --sheet-inset for iOS sheet modals. Partial detents scale and clip the sheet with side/bottom gaps and rounded lower corners; breakpoint 1 returns to full width. The default is zero and MD is unchanged.
  • Use shared keyframes for enter, leave, interactive dragging, snapping and programmatic breakpoint changes. The last configured partial breakpoint determines where the inset begins transitioning to full width.
  • Keep footers in the scaled page, refresh geometry on resize, and clear owned clipping when responsive CSS disables the inset.
ion-modal.ios.phone-sheet {
  --sheet-inset: 8px;
  --border-radius: 32px;
}

Applications choose when to enable this property. It does not automatically identify devices or claim exact native spring or detent-height parity; existing Ionic breakpoint height semantics are retained.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Validation:

  • Core production/development builds, ESLint, Stylelint and formatting passed.
  • New geometry/lifecycle E2E coverage: 12 passed across Chromium, WebKit and Firefox, including dragging, resize, responsive opt-out, footer placement, dismissal prevention and unchanged defaults/MD behavior.
  • Existing sheet backdrop/breakpoint/scrolling regression tests: 13 passed.
  • Existing modal unit tests: 25 passed.
  • Theme CSS preview inspected at partial and full detents; screenshot baselines were not regenerated locally.

@rdlabo
rdlabo requested a review from a team as a code owner October 20, 2026 07:02
@rdlabo
rdlabo requested a review from brandyscarney October 20, 2026 07:02
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

@rdlabo is attempting to deploy a commit to the Ionic Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the package: core @ionic/core package label Oct 20, 2026
@rdlabo

rdlabo commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Sorry for opening this PR before narrowing the scope sufficiently. The change reaches into modal animations and gestures, which is too broad for the original visual issue. I am closing it to reconsider a smaller approach. Apologies for the unnecessary review overhead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant