From 05cd0c7d1512e8e2bfb43379a58df0464ff9a223 Mon Sep 17 00:00:00 2001 From: Tsahi Matsliah Date: Tue, 9 Jun 2026 11:00:02 +0300 Subject: [PATCH 1/7] feat: comment-first action row experiment 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 --- .../extension/src/companion/CompanionMenu.tsx | 57 +++--- packages/shared/src/components/Feed.spec.tsx | 4 +- .../cards/article/ArticleGrid.spec.tsx | 2 +- .../cards/collection/CollectionGrid.spec.tsx | 2 +- .../components/cards/common/ActionButtons.tsx | 166 +++++++++++------- .../cards/common/list/SignalList.spec.tsx | 2 +- .../components/cards/share/ShareGrid.spec.tsx | 2 +- .../components/cards/share/ShareList.spec.tsx | 2 +- .../components/icons/Discuss/filled-v2.svg | 3 + .../src/components/icons/Discuss/index.tsx | 6 + .../components/icons/Discuss/outlined-v2.svg | 3 + .../components/post/MobilePostFloatingBar.tsx | 101 +++++++---- .../shared/src/components/post/NewComment.tsx | 23 +-- .../src/components/post/PostActions.tsx | 30 ++-- .../post/reader/ReaderFloatingActionBar.tsx | 49 ++++-- .../post/reader/ReaderRailActionBar.tsx | 34 ++-- packages/shared/src/lib/featureManagement.ts | 5 + scripts/typecheck-strict-changed.js | 5 + 18 files changed, 313 insertions(+), 183 deletions(-) create mode 100644 packages/shared/src/components/icons/Discuss/filled-v2.svg create mode 100644 packages/shared/src/components/icons/Discuss/outlined-v2.svg diff --git a/packages/extension/src/companion/CompanionMenu.tsx b/packages/extension/src/companion/CompanionMenu.tsx index 48711e5351e..1c297444764 100644 --- a/packages/extension/src/companion/CompanionMenu.tsx +++ b/packages/extension/src/companion/CompanionMenu.tsx @@ -9,6 +9,7 @@ import { import { BookmarkIcon, DiscussIcon as CommentIcon, + DiscussIconV2 as CommentIconV2, DownvoteIcon, EyeIcon, FeedbackIcon, @@ -17,6 +18,8 @@ import { ShareIcon, UpvoteIcon, } from '@dailydotdev/shared/src/components/icons'; +import { useFeature } from '@dailydotdev/shared/src/components/GrowthBookProvider'; +import { featureCommentFirstAction } from '@dailydotdev/shared/src/lib/featureManagement'; import { Tooltip } from '@dailydotdev/shared/src/components/tooltip/Tooltip'; import Modal from 'react-modal'; import { feedback, isTesting } from '@dailydotdev/shared/src/lib/constants'; @@ -92,6 +95,8 @@ export default function CompanionMenu({ const { logEvent } = useLogContext(); const { user } = useContext(AuthContext); const { showPrompt } = usePrompt(); + const isCommentFirst = useFeature(featureCommentFirstAction); + const CommentIconComponent = isCommentFirst ? CommentIconV2 : CommentIcon; const [reportModal, setReportModal] = useState(); const { displayToast } = useToastNotification(); const dragStartRef = useRef({ y: 0, initialY: 0 }); @@ -334,6 +339,32 @@ export default function CompanionMenu({ useEventListener(isDragging ? window : null, 'mousemove', handleMouseMove); useEventListener(isDragging ? window : null, 'mouseup', handleMouseUp); + const commentButton = ( + + + + ); + return (
+ {isCommentFirst && commentButton} - + {!isCommentFirst && commentButton} +