feat: comment-first action row experiment#6159
Open
tsahimatsliah wants to merge 9 commits into
Open
Conversation
Place Comment before Upvote/Downvote across feed cards, mobile floating bar, reader bars, and the extension companion menu. Swap the comment icon for a new Filled=yes/no design (DiscussIconV2) only inside those action rows; other DiscussIcon consumers (Reply, notifications, sidebar) are untouched. The post page (PostActions) only swaps the icon and keeps its existing order. When the flag is on, the feed Reply button navigates to the post page with ?comment=true so NewComment auto-opens the composer on arrival; the post-type guard in NewComment is dropped so this works for all post types. Tooltip copy renamed "Comment"/"Comments" to "Reply" in feed cards and reader bars, with matching spec selector updates. All behavior gated behind a new boolean GrowthBook flag `comment_first_action`, default off. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
When comment_first_action is on, the grid variant routes the comment button through the link branch, which lacked the grid `typo-footnote` size and used a different label padding than the upvote counter. That made the comment number render larger and misaligned next to the smaller upvote number. Share one variant-aware counter className and label padding across the comment and upvote counters so every number in the action row matches in size and alignment, as in production. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The counter's footnote line (18px) sat top-aligned inside its 20px (h-5) box, so the numbers rode ~2px high relative to the action-row icons. Add leading-5 to the shared counter className so the line fills the box and the digits center optically against the icons. Animation-safe: the scroll children are explicit h-5. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The previous leading-5 was silently overridden by typo-footnote, whose line-height is emitted later in the same Tailwind utilities layer, so the computed line stayed 18px and the digits kept riding high in the 20px (h-5) box. Use !leading-5 to win the override. Verified in Storybook: the digit ink center now sits within 0.25px of each icon's center. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review fixes so the experiment isolates a single variable (comment placement) and the control is byte-for-byte production: - Gate the "Reply" tooltip/aria copy behind the flag. It was rendering for everyone, contaminating the control group. Control now keeps "Comment"/"Comments"; revert the 6 test selectors accordingly. - Drop the feed link-navigation behavior: no more ?comment=true href, useCommentLink override, or nulled onClick. The comment button keeps the production click handler, so LogEvent.CommentsClick analytics and the post modal behave identically across both arms. - Restore the NewComment Welcome/Poll guard removed for the dropped ?comment=true flow. - Gate the reader-bar aria-label alongside the tooltip so they match. Keeps (gated): comment-first ordering and the DiscussIconV2 swap. The counter centering fix stays since it applies equally to both arms. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
idoshamun
reviewed
Jun 9, 2026
| ButtonColor, | ||
| ButtonVariant, | ||
| } from '@dailydotdev/shared/src/components/buttons/Button'; | ||
| import { |
Member
There was a problem hiding this comment.
@tsahimatsliah do we really want to touch companion in this PR?
Member
Author
There was a problem hiding this comment.
No, i didn't know he touched it
idoshamun
reviewed
Jun 9, 2026
| const commentButton = config.useCommentLink ? ( | ||
| <LinkWithTooltip | ||
| tooltip={{ content: 'Comment' }} | ||
| tooltip={{ content: isCommentFirst ? 'Reply' : 'Comment' }} |
Member
There was a problem hiding this comment.
Why do we experiment on the tooltip?
Member
Author
There was a problem hiding this comment.
it's becuase I saw Nimrod changed this on his PR, but I can remove it and keep it like in the production
idoshamun
approved these changes
Jun 9, 2026
Per review feedback: - Revert all CompanionMenu changes; the companion menu is out of scope for this experiment. Also drop the CompanionMenu strict-skip entry it required, restoring scripts/typecheck-strict-changed.js to baseline. - Stop experimenting on the comment tooltip copy. Feed cards and reader bars keep the production "Comment"/"Comments" copy regardless of the flag. The experiment is now purely the comment-first ordering plus the DiscussIconV2 swap. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The test_webapp job failed on an async findBy* timeout in an unrelated test (PostPage "should show source name"). Reproduced locally as suite-level flakiness: different unrelated tests fail across runs and a full clean pass occurs, with the changed code gated off by default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
DiscussIconV2) only inside those action rows; otherDiscussIconconsumers (Reply, notifications, sidebar nav, analytics, etc.) are unchanged.?comment=trueandNewCommentauto-opens the composer on arrival (post-type guard dropped so it works for all post types). The feed-levelonCommentClickis suppressed so the desktop post modal doesn't open alongside the link navigation.Comment/Comments→Replyon feed cards and reader bars, with matching spec selector updates.comment_first_action(defaultfalse). Flag off = identical to today.Test plan
🤖 Generated with Claude Code
Preview domain
https://experiment-comment-first-action.preview.app.daily.dev