Skip to content

Ck 7vn/css#1136

Merged
CK-7vn merged 8 commits into
CK-7vn/total-refactorfrom
CK-7vn/css
May 26, 2026
Merged

Ck 7vn/css#1136
CK-7vn merged 8 commits into
CK-7vn/total-refactorfrom
CK-7vn/css

Conversation

@CK-7vn
Copy link
Copy Markdown
Member

@CK-7vn CK-7vn commented May 22, 2026

Pre-Submission PR Checklist

  • No debug/console/fmt.Println statements
  • Unnecessary development comments removed
  • All acceptance criteria verified
  • Functions according to ticket specifications
  • Tested manually where applicable
  • Branch rebased with latest main
  • No business logic exists within the database layer

Description of the change

Screenshot(s)

No changes, everything was byte for byte identical transformation of CSS

Additional context

Couple things I left out of this, that i'll be creating asana tickets for

  • Removing dark mode instances, there's 120+ darkmode callers which is essentially dead code, the removal of that isn't in this PR, wanted to just verify that's what everyone wanted to do before removing it.
  • [#b3b3b3] focus-ring callers (45 occurrences), I know this is primarily from the focus rings continuing to get jacked up, want to read a little more and see the best way to fix this.

@CK-7vn CK-7vn requested a review from a team as a code owner May 22, 2026 21:54
@CK-7vn CK-7vn requested review from corypride and removed request for a team May 22, 2026 21:54
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Style
    • Rolled out unified brand theming across the app: consistent brand, brand-dark, brand-gold and surface-hover colors used for buttons, badges, icons, cards, charts, tooltips, calendar, and other UI elements.
    • Updated many layouts to use reusable utility/component classes for consistent spacing, headings, and hover/focus states.
  • Refactor
    • Consolidated repeated styling into shared design-system classes for more consistent, maintainable UI presentation.

Walkthrough

Adds exported brand color constants and many global CSS utilities, then replaces hard-coded color and layout classes across shared components, charts, pages, and feature flows to use the new brand tokens and utilities.

Changes

Frontend theme token rollout

Layer / File(s) Summary
Theme tokens and shared primitives
frontend/src/lib/brand.ts, frontend/src/styles/globals.css, frontend/src/components/ui/*, frontend/src/layouts/AuthenticatedLayout.tsx, frontend/src/lib/formatters.ts, frontend/src/pages/auth/*
Adds shared brand and surface constants, expands global theme mappings and utility classes, scopes calendar toolbar styles, and updates shared UI primitives, layout, formatters, and auth styling to use them.
Shared app components and common surfaces
frontend/src/components/Pagination.tsx, frontend/src/components/UnlockEdTour.tsx, frontend/src/components/charts/*, frontend/src/components/navigation/*, frontend/src/components/forms/*, frontend/src/components/schedule/*, frontend/src/components/shared/*, frontend/src/components/residents/*, frontend/src/components/student/ActivityHistoryCard.tsx
Updates common component styling, chart colors, navigation states, dialog and form buttons, schedule detail components, and shared modal or page header styling to use brand tokens and shared utility classes.
Dashboards, admin pages, and reporting views
frontend/src/pages/Dashboard.tsx, frontend/src/pages/ClassesPage.tsx, frontend/src/pages/ProgramsPage.tsx, frontend/src/pages/Schedule.tsx, frontend/src/pages/admin/*, frontend/src/pages/admin/resident-profile/*, frontend/src/pages/event-attendance/*, frontend/src/pages/programs/ProgramOverview*.tsx, frontend/src/pages/learning/ResidentOverview.tsx
Restyles overview, management, table, filter, chart, and attendance pages with shared card, table, search, badge, and brand color classes, including calendar event colors and admin resident profile cards.
Knowledge center and resident-facing views
frontend/src/components/knowledge-center/*, frontend/src/pages/knowledge-center/*, frontend/src/pages/student/ResidentHome.tsx
Applies shared media-card, brand-tag, caption, tab, empty-state, and brand color styling across knowledge center cards, management screens, viewers, and resident-facing content sections.
Class, program, and attendance flows
frontend/src/pages/class-detail/*, frontend/src/pages/program-detail/ClassesTab.tsx, frontend/src/pages/programs/AddClassEnrollments.tsx, frontend/src/pages/programs/ClassEnrollmentDetails.tsx, frontend/src/pages/programs/ClassEvents.tsx, frontend/src/pages/programs/ClassManagementForm.tsx, frontend/src/pages/programs/ProgramManagementForm.tsx
Updates class detail tabs, attendance and enrollment modals, program and class management forms, and related buttons, sections, list wrappers, tabs, badges, and progress colors to use shared theme classes.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/pages/admin/AdminManagement.tsx`:
- Around line 860-863: The username is currently rendered as a plain div but
must be a disabled Input to match backend behavior and tests: in
AdminManagement, replace the <div
className="field-readonly">{formData.username}</div> with an <Input
id="edit-username" value={formData.username} disabled className="mt-2 bg-muted"
/> (or the project's Input component equivalent) so the field remains
non-editable and has the exact className 'mt-2 bg-muted' for test assertions;
keep the existing <Label htmlFor="edit-username">Username</Label> and ensure the
Input uses formData.username as its value.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: baa04f7a-1d90-43e5-8a53-415129edb963

📥 Commits

Reviewing files that changed from the base of the PR and between ed088aa and 2e63825.

📒 Files selected for processing (99)
  • frontend/src/components/Pagination.tsx
  • frontend/src/components/UnlockEdTour.tsx
  • frontend/src/components/charts/EngagementRateGraph.tsx
  • frontend/src/components/charts/OperationalInsightsCharts.tsx
  • frontend/src/components/dashboard/TopContentList.tsx
  • frontend/src/components/forms/ChangePasswordForm.tsx
  • frontend/src/components/forms/ConsentForm.tsx
  • frontend/src/components/forms/LoginForm.tsx
  • frontend/src/components/knowledge-center/FavoriteCard.tsx
  • frontend/src/components/knowledge-center/HelpfulLinkCard.tsx
  • frontend/src/components/knowledge-center/LibraryCard.tsx
  • frontend/src/components/knowledge-center/VideoCard.tsx
  • frontend/src/components/navigation/Breadcrumbs.tsx
  • frontend/src/components/navigation/Sidebar.tsx
  • frontend/src/components/navigation/TopNav.tsx
  • frontend/src/components/programs/ProgramDialogs.tsx
  • frontend/src/components/residents/BulkImportDialog.tsx
  • frontend/src/components/residents/ResidentDialogs.tsx
  • frontend/src/components/schedule/BulkCancelClassesModal.tsx
  • frontend/src/components/schedule/ChangeInstructorModal.tsx
  • frontend/src/components/schedule/ChangeRoomModal.tsx
  • frontend/src/components/schedule/RRuleControl.tsx
  • frontend/src/components/schedule/RescheduleEventModal.tsx
  • frontend/src/components/schedule/RescheduleSeriesModal.tsx
  • frontend/src/components/schedule/RescheduleSessionModal.tsx
  • frontend/src/components/schedule/SessionDetailActions.tsx
  • frontend/src/components/schedule/SessionDetailClassDetails.tsx
  • frontend/src/components/schedule/SessionDetailHeader.tsx
  • frontend/src/components/schedule/SessionDetailStatusSection.tsx
  • frontend/src/components/shared/ConfirmDialog.tsx
  • frontend/src/components/shared/FormModal.tsx
  • frontend/src/components/shared/PageHeader.tsx
  • frontend/src/components/student/ActivityHistoryCard.tsx
  • frontend/src/components/ui/breadcrumb.tsx
  • frontend/src/components/ui/button.tsx
  • frontend/src/components/ui/card.tsx
  • frontend/src/components/ui/context-menu.tsx
  • frontend/src/components/ui/dropdown-menu.tsx
  • frontend/src/components/ui/menubar.tsx
  • frontend/src/layouts/AuthenticatedLayout.tsx
  • frontend/src/lib/brand.ts
  • frontend/src/lib/formatters.ts
  • frontend/src/pages/ClassesPage.tsx
  • frontend/src/pages/Dashboard.tsx
  • frontend/src/pages/FAQs.tsx
  • frontend/src/pages/ProgramsPage.tsx
  • frontend/src/pages/Schedule.tsx
  • frontend/src/pages/admin/AdminManagement.tsx
  • frontend/src/pages/admin/FacilityManagement.tsx
  • frontend/src/pages/admin/ResidentProfile.tsx
  • frontend/src/pages/admin/StudentManagement.tsx
  • frontend/src/pages/admin/resident-profile/ActiveEnrollmentsTable.tsx
  • frontend/src/pages/admin/resident-profile/AttendanceTrendChart.tsx
  • frontend/src/pages/admin/resident-profile/CompletedPrograms.tsx
  • frontend/src/pages/admin/resident-profile/HistoricalNotes.tsx
  • frontend/src/pages/admin/resident-profile/IncompleteEnrollments.tsx
  • frontend/src/pages/admin/resident-profile/ResetPasswordDialog.tsx
  • frontend/src/pages/admin/resident-profile/ResidentHeader.tsx
  • frontend/src/pages/admin/resident-profile/ResidentMetrics.tsx
  • frontend/src/pages/auth/Login.tsx
  • frontend/src/pages/auth/ResetPassword.tsx
  • frontend/src/pages/class-detail/AuditTab.tsx
  • frontend/src/pages/class-detail/BulkCancelSessionsModal.tsx
  • frontend/src/pages/class-detail/BulkGraduateModal.tsx
  • frontend/src/pages/class-detail/ChangeInstructorModal.tsx
  • frontend/src/pages/class-detail/ChangeRoomModal.tsx
  • frontend/src/pages/class-detail/ClassHeader.tsx
  • frontend/src/pages/class-detail/ClassNotFoundCard.tsx
  • frontend/src/pages/class-detail/EditClassModal.tsx
  • frontend/src/pages/class-detail/EnrollResidentsModal.tsx
  • frontend/src/pages/class-detail/EnrollmentHistoryTab.tsx
  • frontend/src/pages/class-detail/LoadingSkeleton.tsx
  • frontend/src/pages/class-detail/RosterTab.tsx
  • frontend/src/pages/class-detail/ScheduleTab.tsx
  • frontend/src/pages/class-detail/SessionRow.tsx
  • frontend/src/pages/class-detail/SessionsTab.tsx
  • frontend/src/pages/class-detail/SessionsTabBulkActions.tsx
  • frontend/src/pages/class-detail/SessionsTabFilterBar.tsx
  • frontend/src/pages/class-detail/SupportTab.tsx
  • frontend/src/pages/class-detail/TakeAttendanceModal.tsx
  • frontend/src/pages/class-detail/UnenrollResidentModal.tsx
  • frontend/src/pages/class-detail/index.tsx
  • frontend/src/pages/event-attendance/constants.ts
  • frontend/src/pages/event-attendance/index.tsx
  • frontend/src/pages/knowledge-center/KnowledgeCenterManagement.tsx
  • frontend/src/pages/knowledge-center/LibraryViewer.tsx
  • frontend/src/pages/knowledge-center/ResidentKnowledgeCenter.tsx
  • frontend/src/pages/knowledge-center/VideoViewer.tsx
  • frontend/src/pages/learning/ResidentOverview.tsx
  • frontend/src/pages/program-detail/ClassesTab.tsx
  • frontend/src/pages/programs/AddClassEnrollments.tsx
  • frontend/src/pages/programs/ClassEnrollmentDetails.tsx
  • frontend/src/pages/programs/ClassEvents.tsx
  • frontend/src/pages/programs/ClassManagementForm.tsx
  • frontend/src/pages/programs/ProgramManagementForm.tsx
  • frontend/src/pages/programs/ProgramOverviewFacilityAdmin.tsx
  • frontend/src/pages/programs/ProgramOverviewStatewide.tsx
  • frontend/src/pages/student/ResidentHome.tsx
  • frontend/src/styles/globals.css

Comment on lines 860 to 863
<Label htmlFor="edit-username">Username</Label>
<div className="border border-gray-300 rounded-md px-3 py-2 bg-gray-50">
<div className="field-readonly">
{formData.username}
</div>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Restore username as disabled Input in edit dialog.

This now renders username as a <div>, but this field must remain a disabled Input with className mt-2 bg-muted to preserve the backend-aligned non-editable pattern and associated test guardrails.

Suggested fix
-                            <div className="field-readonly">
-                                {formData.username}
-                            </div>
+                            <Input
+                                id="edit-username"
+                                value={formData.username}
+                                disabled
+                                className="mt-2 bg-muted"
+                            />

Based on learnings: "Render the username field in all edit dialogs as a disabled Input with className 'mt-2 bg-muted' ... to align with backend behavior ... Add tests to assert the field is disabled and contains the exact className."

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Label htmlFor="edit-username">Username</Label>
<div className="border border-gray-300 rounded-md px-3 py-2 bg-gray-50">
<div className="field-readonly">
{formData.username}
</div>
<Label htmlFor="edit-username">Username</Label>
<Input
id="edit-username"
value={formData.username}
disabled
className="mt-2 bg-muted"
/>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/pages/admin/AdminManagement.tsx` around lines 860 - 863, The
username is currently rendered as a plain div but must be a disabled Input to
match backend behavior and tests: in AdminManagement, replace the <div
className="field-readonly">{formData.username}</div> with an <Input
id="edit-username" value={formData.username} disabled className="mt-2 bg-muted"
/> (or the project's Input component equivalent) so the field remains
non-editable and has the exact className 'mt-2 bg-muted' for test assertions;
keep the existing <Label htmlFor="edit-username">Username</Label> and ensure the
Input uses formData.username as its value.

Copy link
Copy Markdown
Contributor

@carddev81 carddev81 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CK-7vn Great Job man!

There was only one styling issue I found that either you can create an asana ticket for or fix it here. The schedule navigation buttons active/inactive states are different than the target figma. I remember working on these and they were a pain.

Current
Image

Figma (notice the next button)
image

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@frontend/src/styles/globals.css`:
- Around line 461-465: The :focus rule for .unlocked-calendar .rbc-toolbar
button.rbc-active overrides the active styling causing the selected (rbc-active)
button to look like an inactive focused button; update the CSS so that
.rbc-active:focus preserves the brand background and white text (keep
background-color: your green and color: `#fff`) and add an additional visible
focus indicator such as outline/box-shadow or a border-color accent so keyboard
users can distinguish focus while retaining the active appearance; modify the
selector .unlocked-calendar .rbc-toolbar button.rbc-active:focus to apply these
changes rather than switching to the gray styles.
- Around line 454-459: Change the focus selector for the calendar toolbar
buttons to use :focus-visible instead of :focus so keyboard-only focus styles
match the rest of the calendar; update the rule targeting ".unlocked-calendar
.rbc-toolbar button:focus" to ".unlocked-calendar .rbc-toolbar
button:focus-visible" and keep the same declarations (background-color, color,
border-color, outline) so mouse clicks won't trigger the focus ring and styling
remains consistent with the other :focus-visible rules.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 248d2bf0-f57c-4ec4-b009-88074a95c4e8

📥 Commits

Reviewing files that changed from the base of the PR and between 2e63825 and 49632d1.

📒 Files selected for processing (1)
  • frontend/src/styles/globals.css

Comment on lines +454 to +459
.unlocked-calendar .rbc-toolbar button:focus {
background-color: #d1d5db;
color: #374151;
border-color: #e5e7eb;
outline: none;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Prefer :focus-visible over :focus for keyboard-only focus indication.

Lines 374–378 and 384–388 correctly use :focus-visible to show focus rings only during keyboard navigation. Using :focus here triggers on mouse clicks as well, which is inconsistent with modern accessibility patterns and the rest of the calendar styling.

♻️ Refactor to use :focus-visible
-.unlocked-calendar .rbc-toolbar button:focus {
+.unlocked-calendar .rbc-toolbar button:focus-visible {
     background-color: `#d1d5db`;
     color: `#374151`;
     border-color: `#e5e7eb`;
     outline: none;
 }

-.unlocked-calendar .rbc-toolbar button.rbc-active:focus {
+.unlocked-calendar .rbc-toolbar button.rbc-active:focus-visible {
     background-color: `#d1d5db`;
     color: `#374151`;
     border-color: `#e5e7eb`;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/styles/globals.css` around lines 454 - 459, Change the focus
selector for the calendar toolbar buttons to use :focus-visible instead of
:focus so keyboard-only focus styles match the rest of the calendar; update the
rule targeting ".unlocked-calendar .rbc-toolbar button:focus" to
".unlocked-calendar .rbc-toolbar button:focus-visible" and keep the same
declarations (background-color, color, border-color, outline) so mouse clicks
won't trigger the focus ring and styling remains consistent with the other
:focus-visible rules.

Comment on lines +461 to +465
.unlocked-calendar .rbc-toolbar button.rbc-active:focus {
background-color: #d1d5db;
color: #374151;
border-color: #e5e7eb;
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Active button loses visual state on focus, breaking keyboard navigation.

When an active toolbar button (.rbc-active) receives focus, it changes from brand green background with white text to gray background with gray text—identical to a focused inactive button. Keyboard users cannot distinguish which calendar view is currently selected, violating WCAG 2.1 SC 2.4.7 (Focus Visible).

Active buttons must remain visually distinct when focused. Consider applying a focus ring or border overlay while preserving the brand background and white text.

♿ Proposed fix preserving active state on focus
 .unlocked-calendar .rbc-toolbar button.rbc-active:focus {
-    background-color: `#d1d5db`;
-    color: `#374151`;
-    border-color: `#e5e7eb`;
+    background-color: `#556830`;
+    color: white;
+    border-color: `#556830`;
+    outline: 2px solid `#9ca3af`;
+    outline-offset: 2px;
 }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.unlocked-calendar .rbc-toolbar button.rbc-active:focus {
background-color: #d1d5db;
color: #374151;
border-color: #e5e7eb;
}
.unlocked-calendar .rbc-toolbar button.rbc-active:focus {
background-color: `#556830`;
color: white;
border-color: `#556830`;
outline: 2px solid `#9ca3af`;
outline-offset: 2px;
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/styles/globals.css` around lines 461 - 465, The :focus rule for
.unlocked-calendar .rbc-toolbar button.rbc-active overrides the active styling
causing the selected (rbc-active) button to look like an inactive focused
button; update the CSS so that .rbc-active:focus preserves the brand background
and white text (keep background-color: your green and color: `#fff`) and add an
additional visible focus indicator such as outline/box-shadow or a border-color
accent so keyboard users can distinguish focus while retaining the active
appearance; modify the selector .unlocked-calendar .rbc-toolbar
button.rbc-active:focus to apply these changes rather than switching to the gray
styles.

@CK-7vn CK-7vn merged commit 437969e into CK-7vn/total-refactor May 26, 2026
9 checks passed
@CK-7vn CK-7vn deleted the CK-7vn/css branch May 26, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants