Repository navigation
Conversation
…urvey renderer [ENG-3647]
Dhruwang
marked this pull request as ready for review
October 8, 2026 07:06
Contributor
|
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 |
itsjavi
reviewed
Oct 8, 2026
A setAppearance call before surveys.umd.cjs finished loading hit no renderer but was still recorded as applied, so the change was lost and repeats deduped. The page now reports onSurveyRendered; the host holds changes until then and diffs against the value actually baked into the page.
…orm fallback [ENG-3647]
|
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-3647
What & why
Was: Flutter surveys always rendered light, and the SDK dropped the workspace's compiled custom CSS.
Now:
Formbricks.setAppearance(FormbricksAppearance.light | dark | system)switches surveys, live while open. Compiled workspace and survey CSS reachrenderSurvey.setup(synchronous, not queued), or via the widget'sappearance:. Surviveslogout, resets on app restart, never persisted or sent to the server. A string is accepted; unknown values log and fall back to light.systemfollows the app's own theme (Theme/ThemeMode, else Cupertino), not the phone's, and updates live.runJavaScriptwith?., so older servers stay light. TheWebViewHostBuildersignature is unchanged: the value reaches the default host through anInheritedNotifier.customCssforwarded untouched, empty fields omitted, no key when there is none.Where to look
appearance.dart: state,systemresolution,customCssbuilding, scope.survey_webview.dart: frozen initial value,didChangeDependenciessync.default_webview_host.dart: liverunJavaScript, listener cleanup.Coverage
systemresolution (Material app dark on light phone, pinned light on dark phone, Cupertino),customCssomit/forward, html optionsappearance_test.dart,survey_html_test.dart(new). Rerun:flutter testinpackages/formbricks(366 pass)Screen recording and screenshots
Full-quality recording (mp4)
iOS simulator against a local server on the dark-mode and custom-CSS epic branch; workspace CSS gives pill buttons in light and amber in dark. The playground gained appearance and app-theme buttons.
Open gaps
setAppearance; older servers stay light.Breaking changes
Migrations & env
None.
Agent: claude-sonnet-5-5 (Claude Code), effort unknown.