feat: implement safe area insets for Android and add development tooling #182
Merged
jose
merged 7 commits from android-safe-area-insets into master 2 months ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'android-safe-area-insets'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Technical changes:
- Add @capacitor/status-bar dependency for safe area detection - Implement SafeAreaPlugin for Android with proper inset calculation - Create safeAreaInset.js utility for CSS custom property injection - Update Android manifest and build configuration for plugin - Integrate safe area handling across Vue components and views - Update iOS Podfile and Android gradle configurations - Add commitlint and husky for commit message validation Technical changes: - SafeAreaPlugin uses WindowInsets API for Android R+ devices - Fallback detection for navigation bar and gesture bar heights - CSS custom properties: --safe-area-inset-{top,bottom,left,right} - Platform-specific detection (Android WebView only) - StatusBar plugin integration for top inset calculation# Validate assets include safe area supportnpm run assets:validate:android```This commentary doesn't seem to belong with "build" instructions. Things like "build:android:dev" are already in the build instructions. The "assets:validate:android" is new, so that's worth listing with all the other build commands, but it doesn't seem useful to other people to list all the work that has gone into fixing this problem.
1. Replace `env(safe-area-inset-*)` with the max() pattern2. Test on all target platforms3. Verify safe area behavior is consistentThis commentary especially seems only useful for historical purposes... not for building, and not even to help other people in the future unless it's for your own reference. If you want to keep this historical change log, let's make a folder under "doc"... something like "history" or "changelog", something that separates it from the documentation that will help future developers who don't need to know the whole history.
@trentlarson you're right: those weren't supposed to be there. I removed the misplaced documentation from BUILDING.md. (
validate:androiddocumentation was already included in a previous commit onmaster.)"commitlint": {"extends": ["@commitlint/config-conventional"]The commitlint & husky pieces seem unrelated to this PR.
I reverted the changes to package.json; Cursor linted it and formatted + reordered some things around, but no actual changes were made to those packages. I made sure
capacitor-status-barwas retained.👍
3969167d92into master 2 months ago3969167d92.