feat(share): flat end-of-conversation band + split copy-link button#6369
Draft
tsahimatsliah wants to merge 7 commits into
Draft
feat(share): flat end-of-conversation band + split copy-link button#6369tsahimatsliah wants to merge 7 commits into
tsahimatsliah wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds a `split` variant to ShareActions: two real buttons that read as one control. The left half copies the link and cross-fades its glyph to a green check; the right half is a chevron that opens the standard DropdownMenu with the social tiles. Geometry matches a standard Button at every size — height, radius, type scale and outer padding — deviating only at the shared edge, where both inner paddings tighten one step and the chevron drops its icon-only square. The divider is a single rule: the chevron half keeps its own DS border while the main half drops `border-r`, since two borders meeting is what reads as a double line. Borderless variants have no border to inherit and draw their own. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drops the card's fill and border for a single hairline rule separating the strip from the comments above it, and moves the trigger to the labelled split button. `variant="card"` keeps the heavier self-contained surface for surfaces that want it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Every band state (either side of the threshold, flat vs card, in context below a comment list, a real 390px mobile frame) and the split control across all variants and sizes, with computed geometry printed beside the standard buttons so the guideline match is checkable rather than asserted. The auth/log/query decorator the share stories share is extracted to `share.mocks.tsx` — it had been copied verbatim into three story files. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
tsahimatsliah
force-pushed
the
claude/share-split-copy-button
branch
from
July 23, 2026 12:19
b0f60a3 to
598a1b0
Compare
Removes both gates: the `share_end_of_conversation` experiment flag (deleted, nothing else read it) and the `sharing_visibility` kill-switch check. The comment threshold is now the only condition, so the two-component split (gated wrapper + ungated band) collapses into one. `useSharingVisibility` and `sharing_visibility` stay — they gate the other surfaces in the initiative, this one just no longer consumes them. Tests for the discarded path are removed rather than inverted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Review pass over the PR: - The copy confirmation was swapped in for every ShareActions variant, which silently restyled the icon-only triggers on the feed card, brief header and mobile share widget. Those keep the existing `secondary` fill; the green check is now the split control's alone. - The flat band set `py-4 pt-6`, which resolved correctly only because Tailwind emits `pt-*` after `py-*` in the stylesheet — class order in the attribute has no bearing on it. Now `pb-4 pt-6`. - `hasActiveDiscussion` lost its last external caller with the flag wrapper, so it is no longer exported. - Comment still cited the old "Share this discussion" label. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- The chevron carried `pressed`, which renders `aria-pressed` and is painted as a held-down fill. Removed: the rotation is the only open-state signal the control wants, and Radix already sets `aria-expanded`, which is the correct semantic for a menu trigger. - The split dropdown repeated a "Share" heading under a trigger that already says so, and centred its tiles. Heading dropped and tiles aligned left. The popover used by the icon-only surfaces keeps both. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The `p-4` on DropdownMenuContent never applied — the dropdown's CSS module applies `p-1.5` at the same specificity and wins on stylesheet order, leaving 6px. And `flex-wrap` with `justify-start` collected all the leftover row width on one side, so the insets measured top 7 / right 41 / bottom 29 / left 15. Now `!p-4` so the override lands, and a 4-column grid whose columns divide the content box exactly. Measured insets: top 17 / right 17.8 / bottom 17 / left 17.8 — the 1.8px is cell-centring slack, identical on both sides. 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.
Stacked on #6349 (
claude/share-end-of-conversation), which is itself stacked on #6343. Review #6343 → #6349 → this one, or read this diff alone — it only touches the band and its share control.#6349 introduced the end-of-conversation share band as a bordered card with an icon-only share trigger, behind two feature flags. This PR is the design pass on top of it: the band goes flat by default, the trigger becomes a labelled split button, and the band ships to everyone.
Shipping to everyone
The band is no longer gated.
share_end_of_conversationis deleted (nothing else read it) and thesharing_visibilitykill-switch check is dropped from this component, so the comment threshold is the only condition. The flag anduseSharingVisibilitystay in the codebase — they gate the other surfaces in the initiative.That means no runtime off-switch for this band: turning it off after merge takes a revert. Flagged deliberately, per the product call to show it to everyone.
The band
flatis now the default variant: no fill, no card border, just a top hairline separating the strip from the comments above it.cardis still available viavariant="card"for surfaces that want the heavier self-contained block.The split copy control
ShareActionsgains asplitvariant — two real buttons that read as one control:prefers-reduced-motion).DropdownMenuwith the standard social tiles. It rotates to point back at the menu it opened.Geometry follows the button guidelines exactly rather than approximating them: at every
ButtonSizethe control matches a standard button's height, corner radius, type scale and outer padding. The only deviations are at the shared edge — both inner paddings tighten one step so the seam isn't sitting in a canyon, and the chevron drops the icon-only square so it hugs the seam symmetrically.The divider
The two halves are separated by a single rule, not two borders meeting:
border-r) — full height, matching the outer edge in width, colour and hover transition by constructiontailwind/buttons.tsgivesSubtle's borderTwo build-level gotchas worth knowing, both commented in the code:
bg-currentcompiles to nothing here — this theme replaces Tailwind'scolorswholesale and has nocurrentkey. A hairline drawn with it renders as no hairline, which is what let the two real borders read as a double rule in the first place.before:opacity-*does not survive this project's Tailwind build on pseudo-elements: the class lands in the DOM and the element renders at full strength. Both dividers mix their alpha into the colour instead.Structure
SplitShareButton.tsx— the control (padding maps, divider, chevron, dropdown).CopyStateIcon.tsx— the cross-fading copy/check glyph, shared with the mobile and popover paths.ShareActions.tsx— back to a variant router.The
iconvariant still uses the existing Popover rather thanDropdownMenu; migrating it would change the DOM of every icon-only share surface in the app, so it is deliberately left for a follow-up.Storybook
Components/Share/EndOfConversationShare— every state (below/at/above threshold, no comments, flat vs card, dark/light), plus a real 390px iframe for the mobile path.Components/Share/SplitShareButton— the split control across all five variants and all five sizes, and anAgainstStandardButtonspage that prints live computed geometry (height, radius, type, padding) beside the standard buttons so the guideline match is checkable rather than asserted.Verification
ShareActions.spec.tsx,EndOfConversationShare.spec.tsx,PostComments.spec.tsx, including a new test that opens the dropdown and asserts the social tiles are present. Tests for the now-removed flag paths are deleted rather than inverted.packages/webappPostPagesuite passes (48 tests) — cross-package check per AGENTS.md.Subtle's computedborderLeftColor.Seeing it on the preview
Open any post with more than 3 comments — no flags to toggle.
🤖 Generated with Claude Code
Preview domain
https://claude-share-split-copy-button.preview.app.daily.dev