Conversation
|
The PR appears safe to merge with no actionable issues identified. Reviews (1) · Last reviewed commit: "fix(surveys): use the survey text color ..." |
Contributor
posthog-flutter Compliance ReportDate: 2026-09-18 03:18:27 UTC ✅ All Tests Passed!45/45 tests passed Capture Tests✅ 29/29 tests passed View Details
Feature_Flags Tests✅ 16/16 tests passed View Details
|
ioannisj
marked this pull request as ready for review
September 18, 2026 13:47
turnipdabeets
approved these changes
Sep 18, 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.
💡 Motivation and Context
Fixes #584.
Multiple-choice option labels in the Flutter survey widget were hardcoded to
Colors.black(50% alpha when unselected), so on a dark survey background like#1a1a2ethe options were nearly invisible. The "Other" option was readable because that branch already usedappearance.choiceButtonTextColor, which is what made the reporter's screenshot look so odd.Switches the plain-choice label in
posthog_flutter/lib/src/surveys/widgets/survey_choice_button.darttoappearance.choiceButtonTextColoras well, so it follows thetextColoroverride or the auto-contrast ofbackgroundColorlike the border, the check icon and every other text element in the popover.The issue asks for
textSubtleColorinstead. In posthog-js option labels take--ph-survey-input-text-color(packages/browser/src/extensions/surveys/survey.css:58), which isinputTextColoror the contrast ofinputBackground;textSubtleColoronly drives the hover border, the "Other" placeholder and the scrollbar. Flutter draws the choice buttons straight over the survey background rather than an input background, so the primary text colour is the matching contrast here, andtextSubtleColorisn't bridged from the native SDKs anyway.Worth a follow-up to decide whether the Flutter choice buttons should pick up
inputBackground/inputTextColorlike the web ones do. Out of scope for this fix.💚 How did you test it?
posthog_flutter/test/survey_choice_button_color_test.dart, which renders the button on a dark background and asserts the label colour is white (selected) and white at 50% alpha (unselected). I confirmed it fails onmainand passes with the fix.flutter testsuite passes (651 tests),flutter analyzeanddart formatare clean.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🤖 Agent context
DRI: @ioannisj
Autonomy: Human-driven (agent-assisted)