feat: action sheet bottom blank space#7390
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThree view components ( ChangesSafe-area inset bottom spacing cleanup and validation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~13 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Add a local "run & compare" command and a GitHub Actions flow for the
action-sheet visual regression, both sourcing baselines from the reference
repo (OtavioStasiak/Rocket.Chat.ReactNative.VisualRegressionTest).
- scripts/owl-compare.sh + pnpm owl:compare:{ios,android}: pull the prints
for the current OWL_VARIANT into .owl/baseline/<platform>/ (the only path
owl reads), run owl test, open the report.
- CI: orchestrator visual-regression.yml fans out build->run reusable
workflows over 4 legs (iPhone 16 Pro, iPhone SE 3rd gen, Android portrait,
Android landscape). Build once per platform, run downloads the app artifact
to the path owl installs from.
- owl.config.json: android packageName chat.rocket.android.
- .owl/.gitignore: baselines/reference are pulled, never committed here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mirror e2e's e2e-hold: a `hold` job on the protected `approve_e2e_testing` environment that build-ios and build-android depend on, so the macOS + emulator legs only run after a reviewer approves. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Android: build.gradle reads a BugsnagAPIKey gradle property into a manifest placeholder; provide a dummy value (Owl builds are throwaway, never uploaded) so config evaluation doesn't fail with "unknown property 'BugsnagAPIKey'". - iOS: the runner doesn't pre-create named simulators for the selected Xcode, so "iPhone 16 Pro"/"iPhone SE (3rd generation)" were Invalid device. Resolve by name and create on the latest available iOS runtime if missing, boot by UDID. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The reference-repo prints were captured locally and can never match a CI render (owl is pixel-exact; cross-machine font hinting, a 1px sheet offset and the status-bar clock format all differ). Goldens must be captured by CI. In update_baseline mode each run leg now uploads owl-baseline-<variant> with just the correctly-named PNGs, so seeding the reference repo is a drag-and-drop. Documented the CI-golden flow in tests/owl/README.md. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- iOS: pin the simulator runtime (OWL_IOS_RUNTIME); create the device on exactly that runtime and fail loudly if absent, so baselines can't silently drift on a runner image bump. Force 24-hour time so owl's "9:41" status-bar stamp renders identically regardless of region (09:41 vs 9:41 AM). - Android: owl doesn't manage the status bar, so enter SystemUI demo mode to freeze the clock/battery/network and set 24-hour time before running. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owl captures the full device screen and its matcher passes only at zero pixel diff, so the live status-bar clock/battery/signal made every baseline fail. Patch the matcher to zero the top OWL_MASK_TOP px of both images before pixelmatch (default 0 = no-op) and set a per-variant mask height from the owl test, so the top bar is excluded while the app below is still verified. Source-agnostic for future Maestro screenshots. Also drop default React imports in the owl host files to satisfy lint. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This view intentionally keeps the bottom safe-area inset as paddingBottom, so assert it equals the inset to pin the intended behaviour. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@app/views/UserNotificationPreferencesView/ListPicker.tsx`:
- Line 41: The View component with backgroundColor: colors.surfaceRoom is
missing the safe-area inset padding that was removed during refactoring. Add
paddingBottom: insets.bottom to the style object of this View to ensure content
properly reserves internal bottom space for the safe area, while keeping the
marginBottom removal intact.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6fff9caa-42c8-42b4-ad4f-a93be5cfccee
📒 Files selected for processing (1)
app/views/UserNotificationPreferencesView/ListPicker.tsx
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: ESLint and Test / run-eslint-and-test
🧰 Additional context used
📓 Path-based instructions (5)
**/*.{js,ts,jsx,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{js,ts,jsx,tsx}: Use descriptive names for functions, variables, and classes that clearly convey their purpose
Write comments that explain the 'why' behind code decisions, not the 'what'
Keep functions small and focused on a single responsibility
Use const by default, let when reassignment is needed, and avoid var
Prefer async/await over .then() chains for handling asynchronous operations
Use explicit error handling with try/catch blocks for async operations
Avoid deeply nested code; refactor complex logic into helper functions
Files:
app/views/UserNotificationPreferencesView/ListPicker.tsx
**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx}: Use TypeScript for type safety; add explicit type annotations to function parameters and return types
Prefer interfaces over type aliases for defining object shapes in TypeScript
Use enums for sets of related constants rather than magic strings or numbersUse TypeScript with strict mode enabled
Files:
app/views/UserNotificationPreferencesView/ListPicker.tsx
**/*.{js,jsx,ts,tsx,json}
📄 CodeRabbit inference engine (CLAUDE.md)
Use Prettier formatting with tabs, single quotes, 130 character line width, no trailing commas, and avoid arrow function parentheses
Files:
app/views/UserNotificationPreferencesView/ListPicker.tsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Enforce ESLint rules from
@rocket.chat/eslint-configwith React, React Native, TypeScript, and Jest plugins
Files:
app/views/UserNotificationPreferencesView/ListPicker.tsx
app/views/**/*.{ts,tsx}
📄 CodeRabbit inference engine (CLAUDE.md)
Place screen components in 'app/views/' directory
Files:
app/views/UserNotificationPreferencesView/ListPicker.tsx
🧠 Learnings (1)
📚 Learning: 2026-04-30T17:07:51.020Z
Learnt from: diegolmello
Repo: RocketChat/Rocket.Chat.ReactNative PR: 7274
File: app/lib/services/voip/MediaCallEvents.ts:0-0
Timestamp: 2026-04-30T17:07:51.020Z
Learning: In this Rocket.Chat React Native codebase, the ESLint rule `no-void: error` is enforced. When you see a promise returned from an async call that is not awaited (a “floating promise”), do not silence it with the `void somePromise()` pattern. Instead, handle the promise explicitly by attaching `.catch(...)` (or otherwise awaiting/handling the error) so unhandled-rejection risks are addressed in a way that satisfies the existing ESLint configuration.
Applied to files:
app/views/UserNotificationPreferencesView/ListPicker.tsx
|
Android Build Available Rocket.Chat 4.74.0.109149 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNQN9pZnMH-ZnEJQf2Qu56FsLiHw8Y2QNl22Od4Bm4zJP1ghV9oxMa5mR3y03k4RwwLLav9qUzuHnlLTBkif |
|
Android Build Available Rocket.Chat 4.74.0.109153 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNRBhc2Fy2rD7CK9A51YQrqGoyQqY59nXDem1UUobu1Bjz4LerRUkyDkePh_3imeDH-ATFfRDRpky03A3Z_z |
Proposed changes
Removes the extra blank space at the bottom of action-sheet content. These views
were adding marginBottom: insets.bottom on top of the safe-area inset the action
sheet already applies, producing a double gap:
— drop the redundant marginBottom (and the now-unused useSafeAreaInsets).
so the inset sits inside the content.
Issue(s)
https://rocketchat.atlassian.net/browse/NATIVE-1254
How to test or reproduce
the servers list sheet.
(e.g. Images) to open its picker sheet.
Alert) to open its picker sheet.
Screenshots
Types of changes
Checklist
Further comments
Summary by CodeRabbit
Refactor
marginBottomand adjusting how bottom spacing is applied for consistent layout).Tests