Break up FacultySelector and ViewTimeTable into smaller modules

Offen
#266 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
52/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
react, typescript
Bereich
frontend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
TypeScript
Sterne
7
Forks
39
Ø Merge
4 Std. 24 Min.
Gemergte PRs (30 T.)
53

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CodeChefVIT/ffcs

Alle Issues in CodeChefVIT/ffcs

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.