Skip to content

fix(ExampleApp): respect safe areas on HomeScreen and present image picker as a page sheet#263

Merged
trevor-coleman merged 9 commits into
mainfrom
claude/happy-goodall-Y7Zpz
Jun 4, 2026
Merged

fix(ExampleApp): respect safe areas on HomeScreen and present image picker as a page sheet#263
trevor-coleman merged 9 commits into
mainfrom
claude/happy-goodall-Y7Zpz

Conversation

@trevor-coleman

Copy link
Copy Markdown
Collaborator

Summary

Fixes safe-area issues in the example app reported from device screenshots.

1. HomeScreen safe areas

The navigator runs with headerShown: false, and HomeScreen rendered a bare FlatList instead of using the shared Screen component that every other screen uses. As a result the "Infinite Red AI" title slid under the status bar / notch.

HomeScreen now uses the Screen component with safeAreaEdges={["top", "bottom"]}, matching the rest of the app. It uses the "fixed" preset (not "scroll") so the FlatList keeps its own virtualized scrolling — a VirtualizedList must not be nested inside the ScrollView that the "scroll" preset provides — with the inner container flexed so the list fills the safe area.

2. Image picker presentation

Selecting a photo opened the native iOS picker with its default full-screen presentation, whose nav bar renders under the status bar / Dynamic Island. The shared picker options (useExampleImage.ts) now set presentationStyle: UIImagePickerPresentationStyle.PAGE_SHEET, so the picker presents as a card sheet that sits below the safe area. This covers both the library (selectPhoto) and camera (takePhoto) flows, which share these options.

Notes

  • The PAGE_SHEET style also applies to the camera flow since both share one options object. Happy to split them if a full-screen camera is preferred.
  • No changeset added — changes are confined to the (private) example app.

Test plan

  • Open the app → Home title is clear of the status bar / notch
  • Tap a demo → "Select Photo" → picker presents as a card sheet below the status bar
  • Tap "Take Photo" → camera presents and captures as expected

https://claude.ai/code/session_017scjHRZz4xAYpGpqRTyNV8


Generated by Claude Code

claude added 4 commits June 4, 2026 16:53
The HomeScreen rendered a bare FlatList instead of using the Screen
component, and the navigator hides the native header, so the title and
list content slid under the status bar/notch. Apply top/left/right safe
area insets to the list so content stays clear of the safe areas.
Replace the manual safe-area inset hack with the shared Screen component
used by every other screen. Uses the "fixed" preset so the FlatList keeps
its own scrolling (a VirtualizedList must not be nested in a ScrollView),
with the inner container flexed so the list fills the safe area.
The picker defaulted to the system's full-screen presentation, whose nav
bar renders under the status bar / Dynamic Island. Set presentationStyle
to PAGE_SHEET on the shared picker options so it presents as a card sheet
that sits below the safe area. Applies to both the library and camera
flows, which share these options.
@changeset-bot

changeset-bot Bot commented Jun 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: bb02352

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

claude added 5 commits June 4, 2026 17:55
… picker

Split the shared picker options so launchImageLibraryAsync uses a page
sheet (avoiding the full-screen nav bar under the status bar) while
launchCameraAsync keeps the conventional full-screen camera.
Changes are confined to the private example-app workspace, so no package
version bump is needed. The empty changeset satisfies the changeset check.
Document that PRs touching only non-published workspaces (e.g. example-app)
should add an empty changeset (npx changeset --empty) to satisfy the
changeset check without bumping any package version.
@trevor-coleman trevor-coleman merged commit ec9426c into main Jun 4, 2026
7 checks passed
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.

2 participants