Skip to content

refactor: delegate device state to capacitor-foldable - #230

Merged
rdlabo merged 13 commits into
mainfrom
refactor/foldable-device-state
Sep 28, 2026
Merged

rdlabo merged 13 commits into
mainfrom
refactor/foldable-device-state

Conversation

@rdlabo

@rdlabo rdlabo commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Move device-state ownership to the application using @erkamyaman/capacitor-foldable. Remove the bundled device-layout APIs and native observers, migrate the demo, and document installation and listener lifecycle. Keep WebView corner-radius metrics in the rendering plugin.

Applications pass their chosen edge and Foldable’s reported nativeEdge to the theme. When the edges differ, controls use the Web rail and return to native rendering when they match. The theme does not read UIKit bar-placement traits. The demo shares the same placement module between startup and its mode toggle.

Breaking change: DeviceLayout, HingeStatus, getDeviceLayout, startDeviceLayoutMonitoring, stopDeviceLayoutMonitoring, and deviceLayoutChange are removed. Consumers must migrate to the documented Foldable APIs.

Validation

  • Theme build and formatting checks passed.
  • Demo production build passed (existing Angular/Browserslist and bundle-budget warnings).
  • 58 unit tests passed.
  • 97 Native UI Shell E2E tests passed, including edge mismatch, RTL, and native recovery.
  • Existing demo rail-toggle E2E passed after the final import change; screenshot comparison was disabled for this behavioral check.
  • iOS Simulator build passed with code signing disabled; no physical-device validation.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 3 potential issues.

Devin Review

Comment thread ios/Sources/IonicNativeUIShellPlugin/IonicNativeUIShellPlugin.swift Outdated
Comment thread demo/src/app/tabs/tabs.page.ts Outdated
Comment thread demo/src/app/tabs/tabs.page.ts Outdated
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Playwright test results

passed  368 passed

Details

stats  368 tests across 20 suites
duration  4 minutes, 47 seconds
commit  9e95ce9
info  This detailed result covers Ionic 9 only. Ionic 8 runs against the same screenshots in a separate matrix job; check the workflow run for both results. To update the screenshots, comment with /update-screenshots.

github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
@github-actions

github-actions Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

📊 Ionic 9 Playwright Test Report

View the detailed Ionic 9 report: https://rdlabo-dev.github.io/ionic-theme-ios27/pr-230/

Ionic 8 runs against the same screenshots in a separate matrix job. View both results in the workflow run.

github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
github-actions Bot added a commit that referenced this pull request Sep 27, 2026
@rdlabo
rdlabo force-pushed the refactor/foldable-device-state branch from 03d687d to 0b4c27f Compare September 28, 2026 00:39
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
@rdlabo
rdlabo merged commit c8f41fd into main Sep 28, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

npm beta published

CI passed for the merge commit c8f41fd85378. Install the immutable version with:

npm install @rdlabo/ionic-theme-ios27@1.2.0-beta.pr230.shac8f41fd85378

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant