Skip to content

docs(surveys): correct EmojiRating unselected tint in KDoc - #751

Merged
marandaneto merged 2 commits into
mainfrom
posthog/fix-emoji-rating-kdoc
Sep 2, 2026
Merged

docs(surveys): correct EmojiRating unselected tint in KDoc#751
marandaneto merged 2 commits into
mainfrom
posthog/fix-emoji-rating-kdoc

Conversation

@phillram

@phillram phillram commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

The EmojiRating KDoc says unselected emojis use ratingButtonColor. The code tints them with inputTextColor at 50% alpha:

val tint =
    if (isSelected) {
        appearance.ratingButtonActiveColor
    } else {
        appearance.inputTextColor.copy(alpha = 0.5f)
    }

The code is right and matches the iOS SDK, so this corrects the doc to describe what it does. ratingButtonColor is not read in this file at all, which makes the old wording actively misleading for anyone reasoning about survey appearance across platforms.

Spotted by an SDK user while they were investigating a related iOS rendering bug (posthog-ios#793).

💚 How did you test it?

Not built — comment-only change, no behavior touched. I checked that both KDoc links resolve: ResolvedSurveyAppearance declares inputTextColor and ratingButtonActiveColor.

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran pnpm changeset to generate a changeset file

No changeset — nothing user-facing changes, so there is nothing to put in release notes.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Opus in PostHog Desktop. This came out of investigating an iOS emoji rating bug, where the Android implementation was the reference for correct behavior. Reading it turned up the doc mismatch. Verified against the source rather than the report: read the tint branch and the ResolvedSurveyAppearance fields before editing.


Created with PostHog Desktop

The KDoc said unselected emojis use ratingButtonColor. The code tints them
with inputTextColor at 50% alpha, which matches the iOS SDK. Correct the doc
to describe what the code does.

Generated-By: PostHog Desktop
Task-Id: d4c503a5-e8e6-46d4-aedc-0ad42bfef186
@phillram phillram self-assigned this Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor
⚠️ `posthog-android-surveys-compose` is modified but this PR has no changeset

This is informational — the PR is not blocked. Click the triangle above to collapse, or push a fix and this comment will auto-delete.

Modified in this PR but no changeset added:

  • posthog-android-surveys-compose

If this change should ship, run pnpm changeset and select a bump level.
If it isn't user-facing (refactor with no behavior change, internal tooling, generated files), no action needed.

The summary said the control renders 3 or 5 face shapes. emojisForScale maps
a 2-point scale to thumbs up and thumbs down, and there is a preview for that
case. The surrounding comments already describe thumbs; the class KDoc was the
last place that did not.

Also give the unselected clause its noun.

Generated-By: PostHog Desktop
Task-Id: d4c503a5-e8e6-46d4-aedc-0ad42bfef186
@phillram
phillram marked this pull request as ready for review September 1, 2026 22:47
@phillram
phillram requested a review from a team as a code owner September 1, 2026 22:47
@greptile-apps

greptile-apps Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "docs(surveys): note thumbs scale in Emoj..." | Re-trigger Greptile

@marandaneto
marandaneto merged commit 90660e3 into main Sep 2, 2026
17 checks passed
@marandaneto
marandaneto deleted the posthog/fix-emoji-rating-kdoc branch September 2, 2026 07:13
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