Break up FacultySelector and ViewTimeTable into smaller modules

Ouverte
#266 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
52/100
Type d'issue
Refactorisation
Clarté
Plutôt claire
Activité
Active
Stack technique
react, typescript
Domaine
frontend

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
7
Forks
39
Merge moyen
4 h 24 min
PR mergées (30 j)
53

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de CodeChefVIT/ffcs

Toutes les issues de CodeChefVIT/ffcs

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.