-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Today page not handling boundary between semesters properly #3757
Comments
Apology, this issue has been fixed by #3760, i forgot to close the issue. |
Re-opening this issue becuase #3760 wasn't merged, the author closed the PR without merging. Can I check if it was merged in some other PR that isn't linked by this issue? I think that this issue went away by itself because the semester started, and not due to the fix. |
I also closed my pr for now cause I found getWeek(date) wasn’t returning the expected week number. Will look into this next week |
This has taken a while, but big thanks to @xinyuwang-nus on #3814 whose fix pointed out some deeper issues.
ExplanationWe only ever render modules from one semester. So on the last Thursday of Semester 1, do we render the Thursday class of Semester 1, or the Monday class of Semester 2. The correct answer is both, but it seems like there's no code to currently support that. The current code in nusmods/website/src/views/today/TodayContainer/TodayContainer.tsx Lines 348 to 361 in 6588b48
In the past, a special fix was added in #1391 to handle the boundary between Semester 1 and 2. However, the fix doesn't work because it relies on there not being any classes in Semester 1, since it just switches to rendering Semester 2 modules one week early. This causes problems when the opposite case is true, i.e. for the boundary between Special Term II and Semester 1, which surfaces as modules being wrongly rendered as in this issue and in #2789. SolutionA full fix to this problem would be fetch the modules from both semesters and render them accordingly, in the In the interim, I'm okay to merge #3814 (pending fixes to linting) since Special Term rendering of modules is broken anyway. The solution there reverses the fix in #1391 and then handles the boundary between Semester 1 and Semester 2 as a special case. |
Refer to #3757 (comment) for analysis of this issue.
Today dashboard display classes only according to days in week, not checking if the class is conducted on particular weeks
Expected behavior
Tutorial slot not showing up on 1 Aug, which only starts from week 1
Actual behavior
Slot showed up
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: