Merge dev into main - #40
Conversation
- Bump version of `shadcn` to 3.8.4. - Update `@ianvs/prettier-plugin-sort-imports` to 4.7.1. - Upgrade `@tailwindcss/postcss` to 4.1.18. - Update `@types/node` to 20.19.33, `@types/react` to 19.2.13, and `@types/react-dom` to 19.2.3. - Upgrade `eslint` to 9.39.2 and `typescript` to 5.9.3. - Update `express` and `express-rate-limit` versions in bun.lock for improved functionality and security.
## Summary Refactors the quiz editor flow by unifying quiz details, question editing, and JSON import into a single **QuizEditorForm**, and adds bulk JSON import plus UX improvements. ## What changed - **QuizEditorForm** - Single “Quiz Builder” card now holds title, description, questions, and **Import from JSON** in one place. - **Bulk import**: JSON can be a single quiz object or an array of quizzes; multiple quizzes are merged into the current draft with clear feedback. - Validation and error handling for JSON import improved (parse errors, invalid shape) with toast and inline messages. - Optional **description** field for quizzes added; state and app reducer updated accordingly. - Height tracking on the builder card for more consistent layout. - **QuizImportCard removed** - Its behavior is folded into `QuizEditorForm`; no separate import step. - **App store / reducer** - New actions and state for quiz description; tests added in `context/__tests__/app-reducer.test.ts`. - **Other** - `quiz-editor-skeleton` and loading behavior updated for better loading feedback. - Docs: `components.md` and `routes.md` updated for the new flow. - `lib/models`, `lib/type-guards`, and `lib/page-info` updated as needed for descriptions and quiz shape. ## Why - One place to edit quiz metadata and questions and to import JSON reduces context switching and simplifies the UI. - Bulk import from JSON arrays supports faster setup when migrating or creating many quizzes. - Clear validation and errors make import failures easier to fix. ## Tests - **QuizEditorForm** (`components/quizzes/__tests__/quiz-editor-form.test.tsx`): Renders unified builder, imports valid JSON (single and array), shows errors for invalid JSON, and verifies “Save Quiz” behavior. - **App reducer** (`context/__tests__/app-reducer.test.ts`): Covers student and quiz actions (including description); existing tests extended/added as needed. No additional E2E tests: changes are form and state logic covered by the above unit tests. ## Checklist - [x] Changes limited to quiz editor refactor and related state/docs (no unrelated features). - [x] Tests added/updated for new and touched behavior. - [x] Documentation updated where the flow or components changed.
# Enhance student and class management features ## Summary This PR refactors student and class handling so that students are consistently **class-scoped**. Class selection is integrated across student management, generator, breakout rooms, projects, and quiz play. The app state and storage layer are updated to support class-scoped rosters and a shared class selector. ## What changed - **Class-scoped students**: Students are associated with a class. The active class is selected via a shared **ClassSelector**; all student operations (add, edit, import, view) apply to the selected class. - **New `lib/classes.ts`**: Utilities for class names (normalize, key, parse), and for parsing class import text (`Class Name: Student A, Student B`). - **ClassSelector component** (`components/classes/class-selector.tsx`): Reusable dropdown for choosing the active class; used on `/students`, `/generator`, `/breakout-rooms`, `/projects`, and `/play`. - **Student form & table**: Refactored to work with the selected class (create/edit/delete scoped to that class). Student table and form UI/layout improved for responsiveness. - **App store & storage**: State and persistence updated for class-based rosters; storage API and type guards adjusted accordingly. - **Feature parity**: Generator, breakout groups, project lists, and quiz play all use the active class from the class selector. - **Docs**: README and project docs updated for class-scoped flows and usage examples. ## Why - **Single source of truth**: One active class drives all features that use students. - **Clearer UX**: Users pick a class once and all tools (draw, breakout, projects, play) use that class’s roster. - **Consistent data model**: Students and classes are modeled and stored in a consistent way for future features. ## Tests - **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` to match new state shape and class-scoped behavior. - **Added**: `lib/__tests__/classes.test.ts` for `lib/classes.ts` (normalize, parse, import parsing). - No new tests were skipped; existing coverage was adjusted for the refactor. ## Checklist - [x] Students are class-scoped; ClassSelector used where needed. - [x] Storage and app state support class-scoped rosters. - [x] Tests updated/added; `lib/classes` covered. - [x] README and project docs updated.
Summary - normalize the shared `SelectContent` default so option popups size to their content while keeping the override prop for trigger-aligned behavior, and document it alongside new tests - pass `package.json`’s version through `layout.tsx` into `AppShell` so the sidebar label becomes `v1.1.5` without hardcoding and bump the package version accordingly - add the new 1.1.5 changelog entry and refresh component docs to cover the select behavior update
…lock - Bump React version from 19.2.3 to 19.2.4 for performance improvements. - Update @types/node from 20.19.33 to 25.2.3 for compatibility with the latest Node.js features. - Upgrade @types/react from 19.2.13 to 19.2.14 to ensure type accuracy and support for new React features. - Adjust @types/react-dom to match the updated React version.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Bump react-dom version from 19.2.3 to 19.2.4 for consistency with the updated React version. - Ensure peer dependencies are aligned with the new version for improved compatibility.
💡 Codex Reviewteacherbuddy/context/app-store.tsx Lines 469 to 472 in 23a3284
Lines 450 to 451 in 23a3284
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Updates from dev: dependency updates, select dropdown fix, student/class management, quiz editor refactor.