From 21ce2453aac31546c5c825583793b1541db7e42d Mon Sep 17 00:00:00 2001 From: Miguel Reese Date: Wed, 28 Oct 2026 00:07:21 -0700 Subject: [PATCH] Fix text that overflowed the View as button and two form fields - The sidebar's role switcher showed "Viewing as Department user / registrar", which ran past both edges of its button. Buttons don't wrap, and the sidebar can be as narrow as 200px. It now shows a short role name ("Viewing as Registrar"); the full name stays in the banner and the tooltip. - Correct / add course history: the Semester box was 108px wide inside the side panel and cut off "Spring 2026". Semester now has its own row, with Units and Grade sharing the next one. - Student information: the Address field is a two-line box, so a full street address is visible instead of cut off. Found by scanning for text wider than its box on every screen (as admin, student, faculty, advisor and registrar, at 320-1920px), with the role menu open, and in all 23 panels, report previews and Help, at desktop and phone widths. After these fixes nothing else is reported. Co-Authored-By: Claude Opus 5.5 --- src/components/RoleSwitcher.tsx | 4 ++-- src/lib/viewAs.ts | 13 +++++++------ src/screens/StudentRecord.tsx | 7 ++++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/components/RoleSwitcher.tsx b/src/components/RoleSwitcher.tsx index 579e45f..30d1969 100644 --- a/src/components/RoleSwitcher.tsx +++ b/src/components/RoleSwitcher.tsx @@ -37,8 +37,8 @@ export function RoleSwitcher() { return (
- {open && <>
setOpen(false)} /> diff --git a/src/lib/viewAs.ts b/src/lib/viewAs.ts index 86a5ab4..ffb9c41 100644 --- a/src/lib/viewAs.ts +++ b/src/lib/viewAs.ts @@ -10,12 +10,13 @@ import { fullName } from './names.js'; */ export interface ViewAs { role: Role; studentId?: string; facultyId?: string; } -export const ROLE_VIEWS: Record = { - student: { label: 'Student', jobTitle: 'Student', access: STUDENT_ACCESS, summary: 'Own record, registration, own outline, faculty & courses' }, - faculty: { label: 'Faculty', jobTitle: 'Faculty', access: ['FCI', 'GRADE'], summary: 'Grades for courses they teach, faculty & courses' }, - advisor: { label: 'Major advisor', jobTitle: 'Major advisor', access: ['ER', 'REG', 'MAJOR', 'FCI'], summary: 'Student records and approved outlines' }, - registrar: { label: 'Department user / registrar', jobTitle: 'Registrar staff', access: ['ER', 'REG', 'MAJOR', 'FCI', 'GRADE'], summary: 'Records, outlines, grade updates, catalog' }, - admin: { label: 'System administrator', jobTitle: 'System administrator', access: ALL_ACCESS, summary: 'Everything, including authorized users' }, +/** `short` fits the sidebar button; `label` is used in the menu and the banner. */ +export const ROLE_VIEWS: Record = { + student: { label: 'Student', short: 'Student', jobTitle: 'Student', access: STUDENT_ACCESS, summary: 'Own record, registration, own outline, faculty & courses' }, + faculty: { label: 'Faculty', short: 'Faculty', jobTitle: 'Faculty', access: ['FCI', 'GRADE'], summary: 'Grades for courses they teach, faculty & courses' }, + advisor: { label: 'Major advisor', short: 'Advisor', jobTitle: 'Major advisor', access: ['ER', 'REG', 'MAJOR', 'FCI'], summary: 'Student records and approved outlines' }, + registrar: { label: 'Department user / registrar', short: 'Registrar', jobTitle: 'Registrar staff', access: ['ER', 'REG', 'MAJOR', 'FCI', 'GRADE'], summary: 'Records, outlines, grade updates, catalog' }, + admin: { label: 'System administrator', short: 'Administrator', jobTitle: 'System administrator', access: ALL_ACCESS, summary: 'Everything, including authorized users' }, }; export const ROLE_ORDER: Role[] = ['student', 'faculty', 'advisor', 'registrar', 'admin']; diff --git a/src/screens/StudentRecord.tsx b/src/screens/StudentRecord.tsx index ad0308a..45cb6aa 100644 --- a/src/screens/StudentRecord.tsx +++ b/src/screens/StudentRecord.tsx @@ -206,7 +206,8 @@ function EditPanel({ db, student, only, onClose, onSave }: { {text('middleName', false, 'Optional')} {text('lastName', true, 'e.g. Okafor-Reyes')} {text('phone', true, '(310) 555-0142')} - {text('address', true, 'Street, city, state ZIP')} +
+