Add a Share button that uses the phone's share sheet

Open Beginner friendly
#111 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
react, typescript
Domain
frontend

Research direction

Start in apps/web/src/components/PostCard.tsx and find where the post link and existing actions are rendered; add a Share action that checks for navigator.share before calling it. Use the helper in apps/web/src/lib/toast.ts for the copy-link fallback, and ignore AbortError when the sheet is cancelled. Run npm run typecheck, npm test and npm run lint; done means both the phone share path and the desktop copy fallback work without console errors.

Written by the indexing model from the issue text.

Description

enhancement good first issue web

On phones people expect to share to other apps.

What to do

Add a Share action on posts that calls navigator.share({ title, url }) when available, and falls back to copying the link with a toast. Ignore the error when the person simply cancels the sheet.

Where to look

apps/web/src/components/PostCard.tsx, apps/web/src/lib/toast.ts. Links to posts already show rich previews.

Done when

It works on a phone and on a desktop browser without the share API, with no console errors.

How to work on it

Fork the repo, branch from main, and follow CONTRIBUTING.md. Run npm run typecheck, npm test and npm run lint before opening a PR. Comment here if you'd like to take it, and ask if anything is unclear.


Generated by Claude Code

Dominant language
TypeScript
Stars
6
Forks
6
Avg merge
1h 59m
Merged PRs (30d)
59

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Haseeb-MernStack/commune

All issues in Haseeb-MernStack/commune

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.