Skip to content

Build the degree composition from the student's degree - #142

Merged
HarryRandall merged 2 commits into
mainfrom
feat/dynamic-degree-composition
Sep 26, 2026
Merged

HarryRandall merged 2 commits into
mainfrom
feat/dynamic-degree-composition

Conversation

@HarryRandall

Copy link
Copy Markdown
Owner

Summary

The dashboard's Degree composition card was a fixed sample. It now reflects the student's own degree.

  • Divides the degree into programme core, major, minors and electives, using the published programme rules and the student's chosen major and minors. Electives are whatever units remain.
  • Places each plan course in the first section it counts toward that still has room, completed courses first. Courses that don't fit anywhere else fall through to electives.
  • Lays the sections out by size: the largest takes the left column and the rest stack on the right. Blocks are positioned in percentages so the layout doesn't jump on load.
  • An unchosen major or minor shows "Add a major" or "Add a minor" on hover and links to that tab on the requirements page, which now accepts ?tab=.
  • On hover, course slots show the course name, status and units with a clearer open cue, and the slot grid fits inside its block.
  • Moves the legend into the card header in place of the unit total.
  • Centres the calendar grid, removes the "No dates to show" note and lines up the calendar heading with the composition heading.

Verification

  • pnpm verify, which passed on the same tree before it was moved to this branch
  • Browser smoke test: checked on the local dashboard
  • Supabase migration, generated types and adviser checks: not applicable, no data changes

New unit tests cover section sizing, course placement, the major and minor prompts, and the size-sorted layout.

Deployment notes

None. The dashboard now also loads the published majors and minors list, which the requirements page already reads.

The month grid now sits in the middle of the card, the note about study
periods without dates is gone, and the month buttons overhang the header
row so the month name lines up with the neighbouring card's heading.
The dashboard composition was a fixed sample. It now divides the degree
into programme core, major, minors and electives from the published
rules and the student's choices, places each plan course in the first
section with room, and sizes electives from what remains.

Sections are laid out largest first, with the rest stacked beside it.
An unchosen major or minor offers to add one and links to that tab on
the requirements page, which now accepts a tab parameter. Course slots
show the course on hover and fit inside their block, and the legend
moves into the header.
@vercel

vercel Bot commented Sep 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
coursemap Building Building Preview Sep 26, 2026 4:29am UTC

@HarryRandall
HarryRandall merged commit 46b1514 into main Sep 26, 2026
5 of 6 checks passed
@HarryRandall
HarryRandall deleted the feat/dynamic-degree-composition branch September 26, 2026 04:30

This branch was successfully deployed

1 active deployment
Preview — 161bb938 Deployed Sep 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant