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

[Import/Export] Invalidate imported plan caches for its term

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start in src/hooks/data/useSavedPlans.ts, at the mutation's onSuccess and onError handlers, and read how the submitted items carry their term. Invalidate the per-term plans query for each distinct term plus the term-plan-counts query, and leave failed writes out of any success path. Done when the example in src/hooks/data/useSavedPlans.test.ts passes, the failure case is covered, and pnpm test, pnpm lint and pnpm typecheck all pass. Issue #846 is listed as a prerequisite, so check it has landed first.

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

Descrizione

import-export

What to build

Refresh the correct saved-plan lists after an import. An import into another semester should update that semester’s saved data and plan count, not just the currently selected list.

Files

Steps

  1. Read the submitted mutation items in onSuccess and collect their effective term IDs.
  2. Invalidate ["plans",term] for each distinct term plus ["term-plan-counts"].
  3. Keep failed writes in onError; do not report a successful import or invalidate an unrelated selected term only.

Example

NavbarFall, imported Spring → Spring plan cache invalidated; rejected mutation does not show a success.

Check it works

In src/hooks/data/useSavedPlans.test.ts, check the example above and the failure or limit described in the steps. Run pnpm test -- src/hooks/data/useSavedPlans.test.ts, pnpm lint and pnpm typecheck.

Before starting

  • #846 — Write imported plans to the explicit term locally

References

Assign yourself before starting, or comment to claim the issue. Project setup.

Lingua principale
TypeScript
Stelle
19
Fork
94
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

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 DevDogsUGA/DogDays

Tutte le issue di DevDogsUGA/DogDays

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.