Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

PostRow pin icon is size-guarded only while a post is pinned

Aperta
#333 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à
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
next.js, react, typescript
Ambito
frontend, testing

Direzione di ricerca

Read components/blog/PostRow.tsx, test-utils/react-tree.ts, and scripts/check-out.mjs check 8 to understand the pin rendering and existing SVG coverage. The issue describes adding a unit test when PostRow gets tests for other reasons, or moving the pin into components/ui/icons.tsx for coverage by icons.test.ts; completion means the pin’s size attributes are covered even when no post is pinned.

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

Descrizione

enhancement low-priority

#330 added width/height attributes to every inline <svg> so that a paint before the stylesheet applies can't draw them at full container width. scripts/check-out.mjs check 8 enforces that against every prerendered <svg> in out/.

The pin glyph in components/blog/PostRow.tsx renders only for a pinned post. Today that is content/blog/09-testnet-is-live.mdx, and its pin is the only <svg> on out/blog/index.html. If no post is pinned, check 8 sees nothing on the blog. A regression in the pin's attributes would then go unnoticed until a post is pinned again.

A unit test needs a vi.mock("next/link"), because findAll in test-utils/react-tree.ts expands function components and next/link's LinkComponent calls hooks. That's moderate cost for a low-risk glyph, so it's worth doing when PostRow gets a test for other reasons, or if the pin moves into components/ui/icons.tsx, where icons.test.ts would cover it automatically.

Lingua principale
TypeScript
Stelle
3
Fork
0
Merge medio
12h 41m
PR unite (30g)
70

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 decdn/website

Tutte le issue di decdn/website

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.