Skip to content

fix: click outside close#47

Merged
Dhruwang merged 2 commits intomainfrom
fix/click-outside-close-rn
Feb 6, 2026
Merged

fix: click outside close#47
Dhruwang merged 2 commits intomainfrom
fix/click-outside-close-rn

Conversation

@pandeymangg
Copy link
Contributor

Fixes #16

@pandeymangg pandeymangg requested a review from Dhruwang February 6, 2026 10:47
@coderabbitai
Copy link

coderabbitai bot commented Feb 6, 2026

Walkthrough

This pull request refactors overlay theming functionality by replacing a boolean darkOverlay property with a new overlay property across type definitions and components. A new TOverlay type is introduced supporting three values: "none", "light", or "dark". The survey-web-view component is updated to compute modal background color based on the overlay setting. Type definitions in common.ts, config.ts, project.ts, and survey.ts are modified to use the new overlay property. Test data is updated to reflect the new property. The react-native-webview dependency is added to the playground package.

🚥 Pre-merge checks | ✅ 2 | ❌ 3
❌ Failed checks (3 warnings)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title 'fix: click outside close' is vague and does not clearly convey what the actual changes accomplish; the changeset shows overlay theming refactoring unrelated to click-outside behavior. The title does not match the code changes shown. Update to reflect that this PR refactors darkOverlay to overlay theming (e.g., 'refactor: replace darkOverlay boolean with overlay theming').
Linked Issues check ⚠️ Warning The code changes focus on overlay theming refactoring but do not implement the click-outside-close functionality required by issue #16. Implement the click-outside-close prop logic that checks survey settings to allow modal closure on outside clicks, or confirm whether this PR addresses different objectives than issue #16.
Out of Scope Changes check ⚠️ Warning The entire changeset appears out of scope: it refactors darkOverlay to overlay theming rather than implementing click-outside-close modal behavior as specified in issue #16. Review whether this PR should address click-outside-close logic as per issue #16, or clarify if the overlay theming refactor is a prerequisite task for a separate PR.
✅ Passed checks (2 passed)
Check name Status Explanation
Description check ✅ Passed The description 'Fixes #16' is related to the PR objectives but provides no detail about the actual code changes implemented.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@packages/react-native/src/components/survey-web-view.tsx`:
- Around line 16-25: The getOverlayBackgroundColor function maps the "none"
overlay to a visible semi-transparent black; change the mapping for case "none"
in getOverlayBackgroundColor to return a fully transparent color (e.g.,
"transparent" or "rgba(0,0,0,0)") instead of "rgba(0, 0, 0, 0.5)"; keep the
switch structure and return type string unchanged so callers of
getOverlayBackgroundColor still receive a string.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 6, 2026

@Dhruwang Dhruwang added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit 0b5ad56 Feb 6, 2026
9 checks passed
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.

2 participants