fix: CSS and a11y in class-detail components#1163
Conversation
|
Ready to act? Review this PR in Change Stack to turn feedback into patch suggestions you can inspect and refine. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThis PR updates the class detail page components with styling refinements and accessibility improvements. ClassNotFoundCard container gains min-h-screen sizing, LoadingSkeleton placeholder grids become responsive across breakpoints, SessionRow icons use simplified shrink-0 styling, and the clickable session row becomes keyboard-navigable via Enter and Space keys. ChangesClass Detail Page UI and Accessibility Improvements
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
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 |
carddev81
left a comment
There was a problem hiding this comment.
Looks good and tested good.
Summary
Three small UX/a11y fixes in
frontend/src/pages/class-detail/surfaced by CodeRabbit on PR #1133. All were preexisting; extracted into named components by Split 3.ClassNotFoundCard — Added
min-h-screento the outer wrapper soitems-centerhas a height to center against. Without it the "Class Not Found" card rendered flush to the top of the page. Also corrected Tailwind class order (bg-surface-hovermoved after layout utilities).LoadingSkeleton — Replaced fixed
grid-cols-5andgrid-cols-3with responsive variants to prevent horizontal overflow on narrow screens:grid-cols-2 sm:grid-cols-3 lg:grid-cols-5grid-cols-1 sm:grid-cols-2 lg:grid-cols-3SessionRow — Added
role="button",tabIndex={0}, and anonKeyDownhandler (Enter/Space) to the clickable row div so it is reachable and activatable via keyboard. The handler guards withe.target !== e.currentTargetto prevent inner button keypresses (Reschedule, Cancel) from also firing the row'sonClick. Also updated 6flex-shrink-0→shrink-0(canonical Tailwind v3 alias).Test plan
/program-classes/9999999/detail/classes:focus-visible)onClickCloses #ID-666