Skip to content

fix(android): risolvi warning Play Store su edge-to-edge e orientamento#20

Merged
Gabry848 merged 1 commit intomasterfrom
fix/android-edge-to-edge-orientation
Mar 16, 2026
Merged

fix(android): risolvi warning Play Store su edge-to-edge e orientamento#20
Gabry848 merged 1 commit intomasterfrom
fix/android-edge-to-edge-orientation

Conversation

@Gabry848
Copy link
Copy Markdown
Collaborator

  • Rimuove android:screenOrientation="PORTRAIT" (cambia orientation da "portrait" a "default" in app.json) per supportare schermi grandi su Android 16+
  • Aggiorna react-native-edge-to-edge da 1.6.0 a 1.8.1 per ridurre le API deprecate della libreria
  • Sostituisce SafeAreaView da react-native con react-native-safe-area-context in tutti i file (32 file)
  • Sostituisce StatusBar da react-native con expo-status-bar in tutti i file, rimuovendo la prop backgroundColor che invocava la deprecated setStatusBarColor API
  • Rimuove StatusBar.currentHeight sostituendolo con useSafeAreaInsets in ChatHeader e VoiceChatModal

- Rimuove android:screenOrientation="PORTRAIT" (cambia orientation da "portrait" a "default" in app.json) per supportare schermi grandi su Android 16+
- Aggiorna react-native-edge-to-edge da 1.6.0 a 1.8.1 per ridurre le API deprecate della libreria
- Sostituisce SafeAreaView da react-native con react-native-safe-area-context in tutti i file (32 file)
- Sostituisce StatusBar da react-native con expo-status-bar in tutti i file, rimuovendo la prop backgroundColor che invocava la deprecated setStatusBarColor API
- Rimuove StatusBar.currentHeight sostituendolo con useSafeAreaInsets in ChatHeader e VoiceChatModal

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Gabry848 Gabry848 merged commit 516dba4 into master Mar 16, 2026
1 check passed
@claude
Copy link
Copy Markdown

claude bot commented Mar 16, 2026

Code Review: fix(android): risolvi warning Play Store su edge-to-edge e orientamento

Note: This PR is already merged. Review provided for informational purposes.

Summary

This PR addresses Google Play Store warnings on Android 16+ through three main changes:

  1. orientation changed from "portrait""default" in app.json
  2. react-native-edge-to-edge bumped 1.6.01.8.1
  3. All screens/components migrated SafeAreaView/StatusBar from react-nativereact-native-safe-area-context / expo-status-bar; StatusBar.currentHeight replaced with useSafeAreaInsets()

Positives

  • Migrating to react-native-safe-area-context and expo-status-bar is the correct and recommended approach for Expo-managed projects. The built-in SafeAreaView doesn't handle dynamic insets well on newer Android.
  • Replacing StatusBar.currentHeight with useSafeAreaInsets() is the right abstraction — currentHeight is Android-only, static, and doesn't update on inset changes (e.g., split-screen mode).
  • The migration is consistent across all 32 files, showing good attention to completeness.

Issues Found

Medium Priority

Orientation change introduces landscape layout risk

  • app.json: "orientation": "default" now allows rotation on tablets and foldables running Android 16+.
  • No landscape layout validation is visible across the 32 affected screens. Screens with fixed-height containers, absolute-positioned elements, or hardcoded dimensions may break visually in landscape.
  • Recommend a follow-up QA pass on physical Android 16+ devices, tablets, and foldables.

Low Priority

Dead paddingTop in ChatHeader.tsx

// StyleSheet still declares paddingTop: 15 at line ~61
// but the inline style { paddingTop: insets.top + 5 } always overrides it

The static paddingTop: 15 in the StyleSheet is now dead code. Also, callers passing a style prop could accidentally override the inset padding, which is fragile. Consider using StyleSheet.compose or merging styles explicitly.

Dead paddingTop in VoiceChatModal.tsx

// StyleSheet still has paddingTop: 52 (~line 151)
// but inline { paddingTop: insets.top + 16 } always wins

The static paddingTop: 52 is misleading dead code — safe to remove.

Notes.tsx missing StatusBar
Unlike all other screens in this PR, Notes.tsx does not add a <StatusBar> declaration. If this is intentional (the screen inherits from the navigator), that's fine — but worth verifying the status bar style is correct when navigating to this screen.

StatusBar inside Modal — validate Android behavior
Both VoiceChatModal.tsx and VoiceCalendarModal.tsx render <StatusBar style="dark" /> inside a Modal with statusBarTranslucent. Expo's StatusBar behavior inside a Modal can be platform-inconsistent on Android. Manual validation on Android is recommended.


Security

No security concerns — this PR touches no authentication, networking, permissions, or data handling.


Test Coverage

No tests were added or modified. Layout/inset changes are typically not unit-tested, but given the orientation change affects all screens, a manual QA checklist for landscape mode on Android would be valuable before the next release.


Issues by Severity

Severity Issue Location
Medium No landscape layout validation after orientation: "default" app.json + all 32 screens
Low Dead paddingTop: 15 in stylesheet src/components/BotChat/ChatHeader.tsx
Low Dead paddingTop: 52 in stylesheet src/components/BotChat/VoiceChatModal.tsx
Low Missing StatusBar — verify intentional src/navigation/screens/Notes.tsx
Low StatusBar inside Modal with statusBarTranslucent — validate on Android VoiceChatModal.tsx, VoiceCalendarModal.tsx
Info No tests added All files

Overall

The migration is technically correct and well-executed. The main open risk is the orientation: "default" change enabling landscape mode across the entire app without corresponding layout adaptations. Recommend a follow-up issue to audit landscape behavior on Android 16+ devices and clean up the dead stylesheet entries identified above.

🤖 Reviewed with Claude Code

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