Skip to content

feat(share): redesign share button as popover with consolidated actions#312

Open
functionstackx wants to merge 1 commit intomasterfrom
claude/issue-268-20260505-0421
Open

feat(share): redesign share button as popover with consolidated actions#312
functionstackx wants to merge 1 commit intomasterfrom
claude/issue-268-20260505-0421

Conversation

@functionstackx
Copy link
Copy Markdown
Contributor

Closes #268

Summary

Promotes the chart-header share affordance from a small outlined icon-button (easy to miss) to a filled brand-color trigger that opens a popover containing:

  • A one-line explanation ("Anyone with this link will see your current selections and filters.")
  • The current share URL auto-selected on open so Cmd/Ctrl+C just works
  • A dedicated Copy button with Check / "Copied" feedback
  • X (Twitter) and LinkedIn share buttons consolidated inside the popover (previously hidden on mobile behind the sm: breakpoint)

Adds a share_popover_opened analytics event so popover discoverability can be measured separately from copy / social conversion (share_link_copied, social_share_twitter, social_share_linkedin kept unchanged). Refactors the four direct ShareButton + social-button consumers (ThroughputCalculatorDisplay, gpu-specs-content, GpuPowerDisplay, SubmissionsDisplay) to use the shared ChartShareActions wrapper.

Also wires .test.tsx files into vitest's include pattern so the existing chart-display-helpers.test.tsx and the new share-button.test.tsx actually run in CI (coverage exclude already listed **/*.test.tsx, but include was matching only .test.ts).

Test plan

  • pnpm typecheck
  • pnpm lint
  • pnpm test:unit — 1738/1738 pass (includes new ShareButton tests and now-running chart-display-helpers tests)
  • Verified in browser via Playwright on /inference, /calculator, /gpu-specs
  • Verified on overlay path (?unofficialruns=…) — share URL preserves the overlay param, popover opens, copy works

Note on the optional short-link service

Intentionally did not implement the optional /s/abc123 server-side short-link table — that's a DB migration + new API route + URL parser change, a separate concern from "make the button discoverable," and deserves its own design + PR.

🤖 Generated with Claude Code

Promotes the chart-header share affordance from a small outlined
icon-button (easy to miss) to a filled brand-color trigger that opens a
popover containing: a one-line explanation, the current share URL
auto-selected for Cmd/Ctrl+C, a dedicated Copy button with feedback,
and the X / LinkedIn share buttons consolidated inside (previously
hidden on mobile behind the sm: breakpoint).

Adds share_popover_opened analytics event so popover discoverability
can be measured separately from copy / social conversion. Refactors
the four direct ShareButton + social-button consumers to use the
shared ChartShareActions wrapper.

Wires .test.tsx files into vitest's include pattern so the existing
chart-display-helpers.test.tsx and the new share-button.test.tsx run
in CI (the coverage exclude already listed *.test.tsx, but the
include pattern was matching only .test.ts).

Closes #268

Co-authored-by: functionstackx <functionstackx@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 5, 2026

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

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview, Comment May 5, 2026 4:47am

Request Review

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.

Add better share link ux

1 participant