Skip to content

fix: draw no-overlay surveys above elevated host views on Android [ENG-3971] - #85

Merged
Dhruwang merged 2 commits into
mainfrom
dhruwang/eng-3971-fix-react-native-sdk-on-android-draws-app-views-over-a-no
Oct 15, 2026
Merged

Dhruwang merged 2 commits into
mainfrom
dhruwang/eng-3971-fix-react-native-sdk-on-android-draws-app-views-over-a-no

Conversation

@Dhruwang

Copy link
Copy Markdown
Member

Fixes ENG-3971

What & why

Was: on Android, a survey with no overlay was drawn under any app view with elevation (RN Button, cards, tab bars). Those views covered the card's heading, options or Next button, while taps on them still went to the survey. Regression from #81; 3.2.0 is not affected.

Now: the card is drawn above the app again, as it is with overlay placements. Touches outside the card still reach the app.

Android sorts siblings by elevation before tree order, and #81 moved no-overlay surveys from a <Modal> into the host's view tree. The <Formbricks /> wrapper now carries zIndex and elevation. It is transparent, so the elevation casts no shadow.

Where to look

  • packages/react-native/src/components/formbricks.tsx: the layer style on the wrapper.

Coverage

Behaviour Level Outcome
No-overlay card drawn above elevated app buttons (Android) manual: Android 16 emulator, Expo Go 55, local web App button no longer covers the card; pair below
Tap outside the card still reaches the app manual: same run Logout button fired with the survey open
Existing touch-region, keyboard and action tests unit (guard): pnpm test (225 passed) Pass
Screenshots (Android, bottom-right placement, no overlay)
Before After
The playground's "Set language (DE)" button drawn over the top of the survey card The survey card drawn over the button, which is now hidden behind the card

Open gaps

  • Not checked with a react-navigation bottom tab bar, or on iOS (no elevation there; zIndex only).
  • The playground on main does not bundle in Expo Go as-is (RN 0.84 vs Expo Go's 0.83, plus the SDK's ESM build inlining react/jsx-runtime). I aligned versions locally for the run; nothing of that is in this diff.

Ran locally: pnpm lint, pnpm check-types, pnpm test.

…G-3971]

A no-overlay survey renders in the host's view tree since ENG-3156, and
Android draws elevated siblings (Buttons, cards, tab bars) above views
without elevation. Give the survey layer zIndex and elevation so the card
stays on top.
@Dhruwang Dhruwang added bug Something isn't working release/6.1 labels Oct 15, 2026
@coderabbitai

coderabbitai Bot commented Oct 15, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: e150dff3-3d52-4786-87a8-fb31c114f71e
📥 Commits

Reviewing files that changed from the base of the PR and between a53c8d6 and c1893f6.

📒 Files selected for processing: 1
  • packages/react-native/src/components/formbricks.tsx

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The survey wrapper now uses a named style instead of the inline absolute-fill style. The named style retains absolute fill and adds z-index and elevation values.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to c1893

No newly introduced merge-blocking risk was established. The change improves survey layering for host views in the same Android ordering context.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: fixing the rendering order of no-overlay surveys above elevated Android host views.
Description check Passed The description directly explains the Android rendering issue, the zIndex and elevation fix, validation results, and remaining coverage gaps.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Dhruwang
Dhruwang requested a review from pandeymangg October 15, 2026 13:02
@sonarqubecloud

Copy link
Copy Markdown

@Dhruwang
Dhruwang added this pull request to the merge queue Oct 15, 2026
Merged via the queue into main with commit 676fed3 Oct 15, 2026
9 checks passed
@Dhruwang
Dhruwang deleted the dhruwang/eng-3971-fix-react-native-sdk-on-android-draws-app-views-over-a-no branch October 15, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working release/6.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants