Skip to content

feat(share): sharing-visibility foundation (PR 1)#6343

Draft
tsahimatsliah wants to merge 1 commit into
mainfrom
claude/website-sharing-visibility-be6b32
Draft

feat(share): sharing-visibility foundation (PR 1)#6343
tsahimatsliah wants to merge 1 commit into
mainfrom
claude/website-sharing-visibility-be6b32

Conversation

@tsahimatsliah

@tsahimatsliah tsahimatsliah commented Jul 21, 2026

Copy link
Copy Markdown
Member

Foundation for the sharing-visibility initiative — a reusable share affordance + flags. Behind flags; share_copy_icon default off means no user-visible change vs main.

Part of the multi-PR sharing-visibility initiative (Storybook-first, one PR per surface). Full plan tracked separately.

Highlights

  • ShareActions primitive (icon/inline; desktop popover, mobile native share) + Storybook story
  • feature_sharing_visibility master kill-switch + useSharingVisibility gate
  • core copy-icon swap (LinkIcon→CopyIcon) gated behind share_copy_icon (default off) via useShareCopyIcon
  • new share-surface Origin values

🤖 Generated with Claude Code

Preview domain

https://claude-website-sharing-visibilit.preview.app.daily.dev

Reusable ShareActions primitive (icon/inline variants, desktop popover +
mobile native share) plus the initiative's flags and a flag-gated core
copy-icon swap.

- add ShareActions + Storybook story, useSharingVisibility gate
- add feature_sharing_visibility (master kill-switch) and share_copy_icon
- gate LinkIcon->CopyIcon swap behind share_copy_icon (default off == main)
  in ShareMobile, ActionButtons.v2, BriefPostHeaderActions
- add share-surface Origin values

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jul 21, 2026 5:51pm
storybook Building Building Preview Jul 21, 2026 5:51pm

Request Review

@tsahimatsliah

Copy link
Copy Markdown
Member Author

🧭 Task context (auto-maintained by /fresh)

  • Goal: Increase sharing visibility across daily.dev — add copy-link/share affordances on ~26 surfaces + an onboarding invite→Plus step, delivered as one PR per topic.
  • Branch: claude/website-sharing-visibility-be6b32 → main
  • Updated: 2026-07-21

Current focus: PR 1 (Foundation) is complete. Next up is PR 2 (feed-card copy-icon + hover share-out), Storybook-first.

Decisions (and why):

  • Storybook-first for every PR — build/iterate the component + story, get look-and-feel sign-off, THEN wire into surfaces (saves credits, faster iteration).
  • Per-topic GrowthBook flags + master kill-switch feature_sharing_visibility (all default false).
  • Core copy-icon swap (LinkIcon→CopyIcon) gated behind its OWN flag share_copy_icon (default off) — changing a core high-traffic icon must ramp independently to protect metrics; flag-off == main.
  • Reuse existing infra: useShareOrCopyLink, SocialShareList, getShareLink/ShareProvider, useGetShortUrl, Radix Popover.
  • Research: OG meta is the feat: turn links in comments to anchor elements #1 lever (link networks ignore URL params); TikTok dropped (no web intent); Slack has no share-intent URL (needs unfurl/OG or Slack app).

Key files:

  • packages/shared/src/components/share/ShareActions.tsx — reusable primitive (icon/inline; desktop popover + mobile native share; onShare(provider) callback)
  • packages/shared/src/hooks/useSharingVisibility.ts — master gate; useShareCopyIcon.ts — icon-swap gate
  • packages/shared/src/lib/featureManagement.tsfeature_sharing_visibility, share_copy_icon
  • packages/shared/src/lib/log.ts — new share Origins
  • packages/storybook/stories/components/ShareActions.stories.tsx — Icon/IconOpenOnHover/Inline stories
  • Gated icon swap: ShareMobile.tsx, cards/common/ActionButtons.v2.tsx, post/brief/BriefPostHeaderActions.tsx
  • Full plan (not in repo): ~/.claude/plans/okay-we-have-an-cheeky-pearl.md

Done:

  • PR 1 foundation: ShareActions + story, both flags + gates, gated copy-icon swap on 3 surfaces, new Origins.
  • Verified: strict typecheck, lint, tests (ShareActions 3/3 + card/brief 30/30), Storybook renders (localhost:6006).

Next:

  • PR 2 — feed-card: swap copy action to CopyIcon (flag) + hover-reveal share-out popover (Slack/WhatsApp/socials); mirror on comments (copy-permalink primary). Build story first.

Gotchas:

  • Two architectural splits to respect: engagement bar V1/V2 (useEngagementBarV2, .tsx.v2.tsx) and post redesign Focus Card (usePostRedesign).
  • No OG-image library — dynamic images = screenshot of Next pages under pages/image-generator/* (id="screenshot_wrapper").
  • Storybook story decorators need QueryClient + AuthContext + LogContext + mock ['shortUrl'] (useGetShortUrl reads AuthContext).
  • Node here is 24.17 vs repo 24.18 (harmless engine warning); deps needed pnpm install in this worktree.
  • ShareActions primitive itself uses CopyIcon unconditionally — fine, it's net-new UI wired only behind per-surface flags later. Only swaps on EXISTING surfaces are gated.

To continue this task in a fresh chat: check out claude/website-sharing-visibility-be6b32, then run /fresh https://github.com/dailydotdev/apps/pull/6343.

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.

1 participant