Exam Schedule widget added - #197
Merged
Merged
Conversation
…ard (excluded for B.Tech 1st year due to vague data)
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
It introduces a likely data typo, an accessibility gap in the toggle UI, and includes an unrelated dashboard regression (favourites removal) plus an unused import.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds an Exam Schedule widget to the dashboard that cross-references a user’s registered courses against a bundled slot/date mapping (with an exclusion rule for B.Tech Sem 1–2).
Changes:
- Added exam schedule utilities to normalize course codes, apply the exclusion rule, and build a chronologically sorted exam list.
- Added the
ExamScheduleWidgetcomponent (+ SCSS) and mounted it on the dashboard with Mid-Sem / End-Sem toggling. - Added a large static
examScheduleDatamapping used as the default schedule source.
File summaries
| File | Description |
|---|---|
| client/src/utils/examSchedule.js | Adds parsing, exclusion, and schedule cross-referencing helpers. |
| client/src/screens/dashboard/index.jsx | Mounts the new widget on the dashboard (and removes the favourites UI block). |
| client/src/screens/dashboard/components/examschedule/index.jsx | Implements the Exam Schedule widget UI and state handling. |
| client/src/screens/dashboard/components/examschedule/styles.scss | Styles for the widget and its empty/error/loading states. |
| client/src/data/examScheduleData.js | Adds the slot schedule + course-to-slot mapping dataset. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+465
to
+474
| "HS2008": "G", | ||
| "HS2011": "G", | ||
| "HS2018": "G", | ||
| "HS2022.": "G", | ||
| "HS2027": "G", | ||
| "HS2031": "G", | ||
| "HS2040": "G", | ||
| "HS2013": "G1", | ||
| "HS2022": "G1", | ||
| "HS2034": "G1", |
Comment on lines
+73
to
+86
| <div className="schedule-toggle-group"> | ||
| <div | ||
| className={`toggle-tab ${activeTab === "midSem" ? "active" : ""}`} | ||
| onClick={() => setActiveTab("midSem")} | ||
| > | ||
| Mid-Sem | ||
| </div> | ||
| <div | ||
| className={`toggle-tab ${activeTab === "endSem" ? "active" : ""}`} | ||
| onClick={() => setActiveTab("endSem")} | ||
| > | ||
| End-Sem | ||
| </div> | ||
| </div> |
Comment on lines
8
to
+12
| import CourseCard from "./components/coursecard"; | ||
| import ContributionBanner from "./components/contributionbanner"; | ||
| import Footer from "../../components/footer"; | ||
| import FavouriteCard from "./components/favouritecard"; | ||
| import ExamScheduleWidget from "./components/examschedule"; |
Comment on lines
243
to
+246
| <Space amount={50} /> | ||
| <Container> | ||
| <SubHeading text={"MY FAVOURITES"} type={"bold"} algn={"center"} /> | ||
| <div className="fav-container"> | ||
| {user?.favourites?.length > 0 ? ( | ||
| user.favourites.map((favourite) => ( | ||
| <FavouriteCard | ||
| name={favourite.name} | ||
| path={favourite.path} | ||
| key={favourite.id} | ||
| code={favourite.code} | ||
| id={favourite.id} | ||
| _id={favourite._id} | ||
| /> | ||
| )) | ||
| ) : ( | ||
| <> | ||
| <div className="favorites-coming-soon">Coming Soon!</div> | ||
| <div className="no-fav-graphic"></div> | ||
| </> | ||
| )} | ||
| </div> | ||
| </Container> | ||
| <ExamScheduleWidget /> | ||
| <Space amount={50} /> | ||
| <ContributionBanner contributionHandler={contributionHandler} /> |
Comment on lines
+46
to
+52
| try { | ||
| setIsLoading(false); | ||
| setHasError(false); | ||
| } catch (err) { | ||
| setHasError(true); | ||
| setIsLoading(false); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…ard (excluded for B.Tech 1st year due to vague data)