Uh oh!
There was an error while loading. Please reload this page.
fix(frontend): SemesterChips wrap + Pill button hardening (addresses #286 review) - #297
Conversation
…w of #286) Two issues found reviewing #286 (token unification): - Toggle dropped wrapping. SemesterChips now delegates to <Toggle>, which is inline-flex with no flex-wrap, while the code it replaced was an explicit flex-wrapping tablist. `semesters` is an unbounded list that grows each term, so the segmented control would overflow horizontally instead of wrapping on Gradebook + course-planner. Add an opt-in `wrap` prop to Toggle (block-level flex + flex-wrap) and pass it from SemesterChips. - Pill rendered a bare <button> (defaults to type="submit", would submit any enclosing form) with no pressed state. Add type="button" and aria-pressed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Deploying with |
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs | frontend-staging | 6a8f538 | Commit Preview URL Branch Preview URL | Jul 01 2026, 02:58 PM |
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Stacked fix for two issues found reviewing #286 (token unification). Targets
refactor/token-unificationso it merges into #286 before that PR lands.1.
Toggledropped wrapping →SemesterChipsoverflow (functional regression)On
main,SemesterChipsrendered adisplay:flex; flex-wrap:wraptablist. In #286 it delegates to<Toggle>, which isinline-flexwith no wrap.semesters: string[]is unbounded and grows every term (and #280 is ingesting more BU terms), so the segmented control would overflow horizontally instead of wrapping on Gradebook + course-planner.wrap?: booleanprop toToggle(defaultfalse; segmented controls stay single-row). Whentrue, the container is block-levelflex+flexWrap:"wrap"so it's width-constrained and wraps — matching the original behavior.SemesterChipspasseswrap.2.
Pillbare<button>(stability + a11y)Pillrendered<button onClick>with notype(defaults tosubmit— submits any enclosing<form>) and no pressed state. Addedtype="button"andaria-pressed={active}.Notes
tsc --noEmitstrict, eslint baseline, vitest) validates on this PR — changes are type-safe (optional prop w/ default, valid CSSProperties, standard button attrs).--accentdoc comments on refactor(frontend): unify CSS token layer + add (public) route group (Phase 1) #286 were checked and are not bugs:globals.cssdefines--accent: var(--brand-forest-bright)(#2D8F5C); thechanges-tour.htmllegend is correct, and the audit doc intentionally describes the pre-change state.🤖 Generated with Claude Code