feat: implement safe area insets for Android and add development tooling #182

Merged
jose merged 7 commits from android-safe-area-insets into master 2025-08-26 07:29:50 +00:00
Owner
  • 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
- 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
jose added 2 commits 2025-08-22 13:10:26 +00:00
- 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
trentlarson reviewed 2025-08-22 13:38:03 +00:00
BUILDING.md Outdated
@@ -1187,0 +1323,4 @@
# Validate assets include safe area support
npm run assets:validate:android
```
Owner

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.

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.
trentlarson reviewed 2025-08-22 13:41:25 +00:00
BUILDING.md Outdated
@@ -1696,0 +2065,4 @@
1. Replace `env(safe-area-inset-*)` with the max() pattern
2. Test on all target platforms
3. Verify safe area behavior is consistent
Owner

This 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.

This 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.
jose added 1 commit 2025-08-22 14:07:32 +00:00
Author
Owner

@trentlarson you're right: those weren't supposed to be there. I removed the misplaced documentation from BUILDING.md. (validate:android documentation was already included in a previous commit on master.)

@trentlarson you're right: those weren't supposed to be there. I removed the misplaced documentation from BUILDING.md. (`validate:android` documentation was already included in a previous commit on `master`.)
trentlarson reviewed 2025-08-23 00:40:48 +00:00
package.json Outdated
@@ -140,0 +138,4 @@
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
Owner

The commitlint & husky pieces seem unrelated to this PR.

The commitlint & husky pieces seem unrelated to this PR.
Author
Owner

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-bar was retained.

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-bar` was retained.
jose added 1 commit 2025-08-25 07:10:30 +00:00
Owner

👍

👍
jose added 1 commit 2025-08-26 07:19:17 +00:00
jose added 1 commit 2025-08-26 07:25:38 +00:00
jose added 1 commit 2025-08-26 07:29:33 +00:00
jose merged commit 3969167d92 into master 2025-08-26 07:29:50 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: trent_larson/crowd-funder-for-time-pwa#182