Repository navigation
Conversation
…urvey renderer [ENG-3644]
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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 |
#61 moved it to v8.2.2, which verifies the scanner's GPG signature against keyservers this macOS runner cannot reach, so the SonarCloud step fails on every run. Restores the pin the comment above it describes.
itsjavi
reviewed
Oct 8, 2026
itsjavi
reviewed
Oct 8, 2026
A setAppearance call made before surveys.umd.cjs finished loading hit no renderer, yet was recorded as applied, so the survey stayed light and repeat calls were deduped away. The page now reports onSurveyRendered and the coordinator holds changes until then, sending the latest one.
…G-3644] Live syncs read the WebView's traits, but a no-overlay survey lives in the SDK's own window, which ignores the host window's overrideUserInterfaceStyle. Resolve from the host window (or presenter) instead, observe it on iOS 17+, and re-sync on foreground for iOS 16.
|
itsjavi
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Ref ENG-3644
What & why
Was: iOS surveys always rendered light, and the SDK dropped the workspace's compiled custom CSS.
Now:
Formbricks.setAppearance(.light | .dark | .system)switches surveys, live while open. Compiled workspace and survey CSS reach the renderer.setAppearanceworks beforesetup, surviveslogout, resets on app restart, and is never sent to the server. Unknown values log and fall back to light..systemfollows the app's own theme (includingoverrideUserInterfaceStyle), not the phone's.customCssis forwarded untouched, with empty fields omitted and no key when there is none.updateUIViewcalledloadHTMLStringon every SwiftUI update, which would restart the survey.Where to look
SurveyWebView.swift: load-once guard, liveevaluateJavaScriptswitch, listener cleanup indismantleUIView.Appearance.swift: state andsystemresolution.FormbricksViewModel.swift:appearanceandcustomCssprops.Coverage
customCssomit/forward/decodeAppearanceTests(new). Rerun:xcodebuild test -scheme FormbricksSDK -destination 'platform=iOS Simulator,name=iPhone 16'Screen recording and screenshots
Full-quality recording (mp4)
Local Formbricks server on the dark-mode and custom-CSS epic branch, workspace CSS: pill buttons in light, amber buttons in dark. The demo build temporarily allowed
http://localhost; that change is not in this PR.Open gaps
.systemlive updates in the passthrough window rely on the host applying its theme to that window too; the demo sets it on every scene window.setAppearance; older servers stay light.Breaking changes
Migrations & env
None. CI: restores the
sonarqube-scan-actionv6.0.0 pin that #61 bumped to v8.2.2; v8 fails on this runner importing SonarSource's signing key, which broke every SonarQube run onmaintoo.Agent: claude-sonnet-5-5 (Claude Code), effort unknown.