Skip to content

fix: removes native overlay#39

Merged
pandeymangg merged 6 commits intomainfrom
fix/remove-native-overlay
Feb 11, 2026
Merged

fix: removes native overlay#39
pandeymangg merged 6 commits intomainfrom
fix/remove-native-overlay

Conversation

@pandeymangg
Copy link
Contributor

removes native overlay so the entire overlay dependency is on formbricks webview

@pandeymangg pandeymangg requested a review from Dhruwang February 11, 2026 12:08
@coderabbitai
Copy link

coderabbitai bot commented Feb 11, 2026

Walkthrough

The PR removes the overlay parameter from PresentSurveyManager's present method and simplifies background color handling. The view background is now always set to clear instead of being determined by overlay type. Documentation updates indicate that overlay rendering is handled by the JavaScript library inside the WebView. Associated test cases that validated overlay-specific behavior, including background color tests and overlay resolution logic, have been removed and replaced with a simplified test for headless environment presentation.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing native overlay functionality from the codebase, which aligns with the file modifications and PR objectives.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of removing native overlay to consolidate overlay management into the Formbricks webview.

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

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Sources/FormbricksSDK/Manager/PresentSurveyManager.swift (1)

39-49: ⚠️ Potential issue | 🔴 Critical

backgroundColor(for:) is dead code, but the refactoring is incomplete.

The method is never called and should be removed. However, the suggestion to remove SurveyOverlay is incorrect—it's actively used in the Survey and Project data models.

More critically, the callers in SurveyManager.swift (lines 124 and 195) are still passing the overlay parameter to present(), which no longer accepts it. This would cause a compilation error. Those calls need to be updated to remove the overlay: argument:

Required fixes
- self.presentSurveyManager.present(environmentResponse: environmentResponse, id: survey.id, overlay: overlay) { success in
+ self.presentSurveyManager.present(environmentResponse: environmentResponse, id: survey.id) { success in
- presentSurveyManager.present(environmentResponse: environmentResponse, id: id, overlay: overlay)
+ presentSurveyManager.present(environmentResponse: environmentResponse, id: id)

And remove the dead backgroundColor(for:) method from PresentSurveyManager.swift.

@sonarqubecloud
Copy link

@pandeymangg pandeymangg added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit dc1c417 Feb 11, 2026
4 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