Add a back-to-top button on long feeds

Open
#99 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
70/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
css, react, typescript
Domain
frontend

Research direction

Start in apps/web/src/components/PostList.tsx to see how the feed renders and where a scroll listener can go, then check apps/web/src/styles/global.css for existing fixed-position rules and the mobile bottom bar. Add a button that appears after about two screens of scrolling, scrolls smoothly to the top unless prefers-reduced-motion is set, and can be reached by keyboard. Done means it shows and hides at the right points, does not overlap other fixed elements on phones, and passes npm run typecheck, npm test and npm run lint.

Written by the indexing model from the issue text.

Description

enhancement good first issue web

After scrolling a long feed there is no quick way back to the top.

What to do

Show a small floating button after scrolling about two screens down. Clicking it scrolls smoothly to the top (respect prefers-reduced-motion). On phones it must not cover the bottom bar.

Where to look

apps/web/src/components/PostList.tsx, apps/web/src/styles/global.css.

Done when

The button appears and hides at the right times, is keyboard accessible, and does not overlap other fixed elements.

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.