seas-computing / course-planner

SEAS Course Planning Application. JSDoc Docs at: https://seas-computing.github.io/course-planner/
0 stars 1 forks source link

Schedule: Fix course numbers appearing outside the bounds of the block #526

Closed jonseitz closed 2 years ago

jonseitz commented 2 years ago

On the Spring 2020 view of the Schedule, some prefix blocks are not large enough to contain all the course numbers. Should we change the font size, or implement some other fix here?

Vittorio to provide a mockup.

Vittorio2015 commented 2 years ago

Wrapping course prefix

Current "Schedule", Sprint 2020, Monday, 12 pm:

image

Adding overflow-wrap: normal; to h4

h4 {
    overflow-wrap: normal;
}
image
Vittorio2015 commented 2 years ago

Prefix block overflow

Current "Schedule", Sprint 2020, Tuesday, 10:30 am:

image

Adding overflow: scroll; to course prefix div class

div.sc-bQdRvg {
    overflow: scroll;
}
image

Structure of course prefix div

<div prefix="CS" class="sc-bQdRvg lToYU">
    <h4 class="sc-fXoxaI iIhzBf">CS</h4>
    <ul class="sc-FyeoB laNHN">
        <li class="sc-hzMMVR cHTNsT"></li>
        <li class="sc-hzMMVR cHTNsT"></li>
        <li class="sc-hzMMVR cHTNsT"></li>
        <li class="sc-hzMMVR cHTNsT"></li>
        <li class="sc-hzMMVR cHTNsT"></li>
        <li class="sc-hzMMVR cHTNsT"></li>
    </ul>
</div>

Persistent course prefix

  1. Adding absolute positioning and background color to prefix heading

position: absolute; background-color: rgb(103, 151, 219); /* CS specific background color */

  1. Adding top margin to the scrolling ul list of courses to compensate for the vertical space occupied by the prefix (i.e.: CS)

margin-top: 2em;

Result image

Recommendations