Conversation
WalkthroughThe 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)
✅ Passed checks (2 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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
SurveyOverlayis incorrect—it's actively used in theSurveyandProjectdata models.More critically, the callers in
SurveyManager.swift(lines 124 and 195) are still passing theoverlayparameter topresent(), which no longer accepts it. This would cause a compilation error. Those calls need to be updated to remove theoverlay: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 fromPresentSurveyManager.swift.
|



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