Fix select dropdown sizing and auto-version display - #38
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
teacherbuddy/components/projects/project-list-view.tsx
Lines 99 to 103 in 605276e
When editing a project list, visibleStudents is built from sortedStudents without filtering by activeClassId, so the “Add students” list can include students from other classes. This lets users add cross‑class students into a list that is otherwise scoped by classId, which breaks the class‑scoped behavior introduced in this commit and can lead to mixed-class project lists. Filter the candidate students by activeClassId before applying the includeExcluded toggle.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Updated layout in `breakout-rooms`, `generator`, and `play` pages to use a centered container with a maximum width instead of a flex column layout. - Adjusted `projects` page to use a fragment instead of a div for better structure. - Simplified `quizzes` page layout by removing unnecessary div wrappers around the `QuizEditor` component. - Modified `app-shell` to remove redundant max-width styling on the main container.
- Updated the `projects` page to use a div container instead of a fragment, enhancing layout consistency. - Rearranged components to maintain a clear and organized structure within the page.
- Updated button classes in `quiz-play-card`, `project-list-builder`, and `quiz-editor-form` to ensure full-width styling on smaller screens. - Adjusted layout properties in `quiz-editor` and `sidebar` for improved responsiveness and structure. - Ensured consistent use of width properties to enhance user experience across various components.
- Updated `RootLayout` to retrieve sidebar state from cookies, allowing the sidebar's open/closed state to persist across sessions. - Modified `AppShell` to accept `defaultSidebarOpen` prop, ensuring the sidebar's state is consistent with user preferences. - Enhanced `SidebarProvider` to manage sidebar state more effectively, including cleanup of legacy cookie names to avoid confusion.
## What changes and why This PR brings `dev` up to date with `main` by merging five commits that deliver class-scoped student management, a unified quiz editor with bulk JSON import, select dropdown and version display fixes, and dependency updates. - **Class-scoped students (#37)** Students are now associated with a class. A shared **ClassSelector** lets users pick the active class; all student operations (add, edit, import, view) and features (generator, breakout rooms, projects, quiz play) use that class’s roster. This gives a single source of truth and clearer UX. - **Unified quiz editor + bulk JSON import (#36)** Quiz details, question editing, and JSON import live in one **QuizEditorForm**. Support for importing a single quiz or an array of quizzes (bulk merge) was added, with better validation and error handling. The separate quiz import card was removed. - **Select dropdown and version display (#38)** Shared `SelectContent` defaults to content-fit sizing with an override for trigger-aligned behavior; tests and docs were added. App version is read from `package.json` and shown in the sidebar (e.g. `v1.1.5`) instead of being hardcoded. - **Other** Question list card behavior was adjusted; dependencies and versions were updated (e.g. shadcn, Prettier sort imports, Tailwind PostCSS, TypeScript, ESLint, express). ## Related issues - Builds on / includes: #36 (quiz editor), #37 (student/class management), #38 (select + version). ## Scope Focused on the above feature and fix set. No unrelated changes. ## Tests - **Added:** `lib/__tests__/classes.test.ts`, `components/quizzes/__tests__/quiz-editor-form.test.tsx`, `components/ui/__tests__/select.test.tsx`. - **Updated:** `context/__tests__/app-reducer.test.ts`, `components/students/__tests__/student-form.test.tsx`, `lib/__tests__/storage.test.ts`, `lib/__tests__/type-guards.test.ts` for class-scoped state and new behavior. - No E2E tests added; covered behavior is exercised by the unit/integration tests above.
Summary
SelectContentdefault so option popups size to their content while keeping the override prop for trigger-aligned behavior, and document it alongside new testspackage.json’s version throughlayout.tsxintoAppShellso the sidebar label becomesv1.1.5without hardcoding and bump the package version accordingly