Filter timetables by a class time range and rank by fewest lab days

オープン
#289 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
43/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
frontend

調査の方向性

Start with evaluateFilters in src/lib/filterUtils.ts and inspect how timetable slots are represented, especially lab slots and grouped timetables. The issue leaves lab behavior for Mixed theory time open, so clarify that before implementing the ranking and filtering changes. Done means the requested ranking, opposite-shift lab filtering, and existing building and faculty filters work together; check ViewTimeTable.tsx for the affected timetable flow.

索引モデルが issue の本文から書いたものです。

説明

Is your feature request related to a problem? Please describe.

The Morning, Evening and Mixed filters only look at theory slots (evaluateFilters in src/lib/filterUtils.ts skips lab slots), so a student can't keep their whole day, labs included, inside the hours they want. There is also no way to prefer timetables with labs on fewer days.

Describe the solution you'd like
  • Class time range: two handles snap to the times classes start and end. Timetables with any theory or lab class outside the range are removed. The full day means off.
  • Fewest lab days ranks timetables, best first, and never removes one.
  • Theory time (Morning, Evening, Mixed), Same building and the faculty filter keep working as they do today.
  • Generation is not changed; the options work on the generated timetables.
Additional context

The popover and the tags that show these options are in the UI issue (#288).

Related: #263 (same-building filtering), closed.

ViewTimeTable.tsx and filterUtils.ts are changing in other work:

  • #266 (open): splits ViewTimeTable.tsx into smaller modules.
  • #283 (open PR): changes timetable state in ViewTimeTable.tsx.
  • #262 (open): changes the saved-timetable local storage syncing in the same file.
  • #267 (merged): groups timetables with the same slot layout, so the ranking has to order the grouped timetables.
Design
Example

One way to build it (just an idea):

  • Look up each slot's start and end time from the timetable grid and drop timetables with a class outside the range.
  • Give each timetable a lab-day count and sort by it.
const shown = timetables.filter(tt => tt.start >= from && tt.end <= to);
主要言語
TypeScript
スター
6
フォーク
37
平均マージ
11時間 13分
マージ済み PR(30日)
55

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CodeChefVIT/ffcs のほかの issue

CodeChefVIT/ffcs の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。