Break up FacultySelector and ViewTimeTable into smaller modules

Aperta
#266 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
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend

Direzione di ricerca

Start by reading src/components/cards/FacultySelector.tsx and src/components/cards/ViewTimeTable.tsx to trace their UI, state changes, and business logic. Then identify course and slot generation, faculty selection, filter, and save/share logic that can be extracted, along with repeated UI sections. Done means the pages behave as before and tests cover the extracted logic.

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

Descrizione

enhancement

FacultySelector.tsx and ViewTimeTable.tsx are each close to 1,000 lines. Both mix UI, state changes and business logic, which makes even small changes harder to review.

Would be good to refactor them without changing how the pages work.

Suggested direction

  • Move course/slot generation helpers out of FacultySelector.tsx into testable utilities.
  • Extract faculty selection state and handlers into a hook where it makes sense.
  • Move filter and save/share logic out of ViewTimeTable.tsx.
  • Break repeated UI sections into smaller components.
  • Keep the existing behavior and add tests around the extracted logic.

Files: src/components/cards/FacultySelector.tsx, src/components/cards/ViewTimeTable.tsx.

No need to split everything into tiny components — the goal is to make the code easier to follow and maintain.

Lingua principale
TypeScript
Stelle
7
Fork
39
Merge medio
4h 24m
PR unite (30g)
53

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 CodeChefVIT/ffcs

Tutte le issue di CodeChefVIT/ffcs

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.