QuizView - initial work for build mode - #75122
Open
fisher-alice wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Failed saves are not handled, resizing can hide the workspace, and accessibility issues remain.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Quiz build mode and a shared two-panel Quiz shell.
Changes:
- Adds quiz configuration editing and persistence.
- Extends ResourcePanel with quiz-specific tabs.
- Adds resizable builder and placeholder attempt layouts.
File summaries
| File | Description |
|---|---|
_quiz_fields.html.haml |
Links saved quizzes to build mode. |
types.ts |
Defines Quiz view and level types. |
QuizView.tsx |
Adds the shared Quiz layout. |
Quiz.tsx |
Removes the old placeholder component. |
quiz-view.module.scss |
Styles the two-panel layout. |
index.js |
Exports QuizView. |
entrypoint.ts |
Loads QuizView. |
useQuizBuilderView.tsx |
Composes builder content. |
QuizConfigurationPanel.tsx |
Implements configuration editing and saving. |
quiz-configuration-panel.module.scss |
Styles the configuration panel. |
useQuizAttemptView.tsx |
Provides the attempt placeholder. |
ResourcePanel/types.ts |
Adds quiz tab identifiers. |
ResourcePanel/styles.module.scss |
Adjusts empty-tab borders. |
ResourcePanel/index.tsx |
Supports quiz content and navigation behavior. |
projects/utils.ts |
Reads the quiz-builder app option. |
useTwoPanelLayout.ts |
Adds reusable sidebar resizing. |
Review details
Suppressed comments (3)
apps/src/quiz/builder/QuizConfigurationPanel.tsx:128
- Validation errors are inserted above the form while focus remains on Save, but this element is not a live region, so screen readers are not notified that saving failed. Mark the message as an alert.
{error && (
<Typography variant="body3" color="error">
{error}
</Typography>
apps/src/quiz/builder/QuizConfigurationPanel.tsx:75
- The new save flow has no frontend unit coverage for request serialization, local validation, server rejection, or loading-state cleanup. Add focused tests for a successful save, both local validation paths, and a rejected
HttpClient.put; the rejection case would catch the unreachable non-OK branch below.
const handleSave = async () => {
setError(null);
// Blank means "no time limit" - QuizConfigurationData needs a real
// positive integer otherwise. Checked here too, not just server-side
// (Quiz's own time_limit_minutes validation), so a bad value shows up
// immediately instead of after a round trip.
apps/src/quiz/builder/QuizConfigurationPanel.tsx:114
HttpClient.putthrows aNetworkErrorfor every non-2xx response (apps/src/util/HttpClient.ts:101-105), so this branch is unreachable. Controller validation failures and network failures therefore skipsetErrorand reject the click handler without telling the user. Catch the thrown error, read its response body when available, and set a fallback message for other failures.
if (!response.ok) {
const data = await response.json();
setError(data.error || 'Something went wrong.');
return;
- Files reviewed: 16/16 changed files
- Comments generated: 3
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+31
to
+34
| containerRef, | ||
| initial: sidebarInitialWidth, | ||
| min: sidebarMinWidth, | ||
| disabled: !isSidebarExpanded, |
Contributor
Author
There was a problem hiding this comment.
Updated -
Screen.Recording.2026-09-04.at.5.09.45.PM.mov
Comment on lines
+150
to
+151
| [Tabs.QuestionBank]: {title: 'Question Bank', icon: 'clipboard-question'}, | ||
| [Tabs.Configuration]: {title: 'Configuration', icon: 'wrench'}, |
Contributor
Author
There was a problem hiding this comment.
I'll log this as a follow-up TODO.
fisher-alice
marked this pull request as ready for review
September 4, 2026 22:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds a two-panel layout - the left panel is for Resource Panel and right panel is the workspace. Thee are also two modes: build and attempt. Both views will mount the resource panel. This is different from other level edit views intentionally. We use QuizView for building the quiz to provide a more seamless authoring experience for curriculum writers.
Updates were made in the resource panel:
QuizViewnow either renders either the build or attempt view.Follow-up work is to match the config panel UI with Moshe's beautiful mockups.
Links
Testing story
Tested locally:
Screencast vid of placeholder quiz attempt view, then level edit, then build questions view with configuration tab in Sidebar.
Screen.Recording.2026-09-04.at.4.01.19.PM.mov
Deployment notes
Privacy and security