Skip to content

feat(sources): offer a copy link on the topic and directory surfaces - #6566

Draft
tomeredlich wants to merge 3 commits into
mainfrom
claude/snapshot-surfaces-topic-directory-3b3fd5
Draft

feat(sources): offer a copy link on the topic and directory surfaces#6566
tomeredlich wants to merge 3 commits into
mainfrom
claude/snapshot-surfaces-topic-directory-3b3fd5

Conversation

@tomeredlich

@tomeredlich tomeredlich commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Tags, sources, squads and archives all end in a live feed, and all four hid sharing behind the same overflow menu. On the squad directory card that menu is invisible group-hover/menu:visible, so on touch there was no share route at all.

Each surface now carries a copy link in the spot its own layout allows:

Surface Placement
Tag page Between Block and the overflow menu
Source page Beside the follow and notify buttons
Squad directory card Before Join, so it never competes with the conversion
Best of / archive Beside a heading row that carried no controls
Source directory rows Revealed on hover from laptop up, always present below it

CopyLinkButton wraps the existing useShareOrCopyLink, so it resolves to the native sheet on mobile and a clipboard copy on desktop, exactly as the menu item did. The hook already raises a toast, so the button stays static instead of swapping in a confirmation icon. It matches whatever sits next to it: Float beside Block and the overflow menu, tertiary on the squad card and in the directory rows.

The source page opts in through showCopyLink, so PostUsersHighlights — the other SourceActions consumer — keeps its current row.

Storybook

Features/Snapshot/Surfaces/Topic & directory pages documents all four placements across desktop, tablet and mobile.

Also here

SourceActions passed an optional source.id straight into follow/unfollow, which never type-checked in strict mode. Both calls now route through one helper that fails fast rather than firing a mutation it cannot form. Pre-existing on main, fixed here because the strict guard only checks files a branch touches.

@vercel

vercel Bot commented Sep 1, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
daily-webapp Ready Ready Preview Sep 2, 2026 3:11pm UTC
storybook Building Building Preview Sep 2, 2026 3:11pm UTC

Request Review

Wraps useShareOrCopyLink so a surface can offer a link directly instead of
burying it in an overflow menu: the native sheet on mobile, a clipboard copy
on desktop. The hook already raises a toast on copy, so the button stays
static rather than swapping in a confirmation icon.

Defaults to Float because it usually sits beside a Block or overflow button;
surfaces whose neighbours are tertiary pass their own variant.
All four of these surfaces ended in a live feed and hid sharing behind the
same overflow menu. On the squad card that menu is `invisible
group-hover/menu:visible`, so touch had no share route at all.

Give each one a copy link in the spot its own layout allows:

- tag page, between Block and the overflow menu
- source page, beside the follow and notify buttons, behind `showCopyLink`
  so PostUsersHighlights keeps its current row
- squad directory card, before Join so it never competes with the conversion
- archive index, beside a heading row that carried no controls
- source directory rows, revealed on hover from laptop up and always present
  below it, using opacity so the button stays focusable

SourceActions passed an optional source.id straight into follow/unfollow,
which never type-checked in strict mode; route both through one helper that
fails fast instead of firing a mutation it cannot form.
One story covering the four surfaces, each showing the placement that ships
across desktop, tablet and mobile, so the layouts can be compared side by
side without opening four pages.

Mockup-to-eng-pass: 1
@tomeredlich
tomeredlich force-pushed the claude/snapshot-surfaces-topic-directory-3b3fd5 branch from 0dd55be to 0132963 Compare September 2, 2026 15:05
@tomeredlich tomeredlich changed the title docs(snapshot): document topic and directory page share placements in Storybook feat(sources): offer a copy link on the topic and directory surfaces Sep 2, 2026
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