Add a back-to-top button on long feeds

Aperta
#99 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
70/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
css, react, typescript
Ambito
frontend

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
TypeScript
Stelle
6
Fork
6
Merge medio
1h 59m
PR unite (30g)
59

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Haseeb-MernStack/commune

Tutte le issue di Haseeb-MernStack/commune

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.