nusmodifications / nusmods

🏫 Official course planning platform for National University of Singapore.
https://nusmods.com
MIT License
557 stars 270 forks source link

Fix cell size for e learning by setting minimum size #3659

Closed JCSnap closed 4 months ago

JCSnap commented 4 months ago

Context

3658

This is a very short PR.

Implementation

Currently, E-learning module information often use placeholder time since they do not have a fixed time (eg. 0900 - 0901). Since the size of the cell is calculated based on the lesson time, the placeholder time causes the UI to be a bit weird as the calculated background width is short, and the module information is hindered by the UI.

image

This implementation ensures that the size of the background is at least half the cell:

image

My initial implementation was to make the cell occupy at least the whole cell but I thought maybe there could be lessons that are just 30 minutes, which is why I changed to such that the minimum is half a cell.

vercel[bot] commented 4 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nusmods-export ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2024 2:55am
nusmods-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 7, 2024 2:55am
vercel[bot] commented 4 months ago

@JCSnap is attempting to deploy a commit to a Personal Account owned by @nusmodifications on Vercel.

@nusmodifications first needs to authorize it.

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 53.70%. Comparing base (61829ad) to head (40e4a89).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3659 +/- ## ========================================== - Coverage 53.71% 53.70% -0.02% ========================================== Files 272 272 Lines 5959 5959 Branches 1418 1418 ========================================== - Hits 3201 3200 -1 - Misses 2758 2759 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kokrui commented 4 months ago

I also don't love how some courses show up when the border timing range is large, especially in dark mode

image

but that's for future further discussion where we can build on this work. I also wonder if we can just let the relevant departments know that placeholder timeslots are no longer required (cmiiw)