Add FRQ editor interface and navigation - #341
Merged
Merged
Conversation
SVGs typically only declare a viewBox (no width/height), so <img> has no intrinsic size to fall back on and previously got forced to a fixed w-full max-w-[450px] box regardless of their actual proportions. Now the SVG's own viewBox/width/height is parsed to derive its aspect ratio, so it scales proportionally within the same bounding box PNG/JPG already use, falling back to the old fixed-width behavior only when no intrinsic size can be determined. Fixes AP-Students#321 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Resize SVG stimulus images proportionally, matching PNG/JPG
7 tasks
Follow-ups from the review of AP-Students#341. All UI-only; no persistence is wired yet. - Derive question points from the sum of grading criteria and drop the separate question-level Points input. Previously "Add Criteria" raised the criteria total without touching question.points, so the accordion header could report "1 point" while the criteria summed to 2. Criteria are now the single source of truth, matching what the grading page will award. - Show a "Legacy" badge in the question header so a legacy question is identifiable while collapsed, per the FRQ spec. - Disable the controls that have no handler yet (Preview, Save Changes, Add Question, question Info, Create FRQ) with explanatory titles, so they stop looking functional. This matches how Delete FRQ / Delete Question were already handled. - Add makeId(): timestamp plus a short random suffix, per the spec's ID rule. Replaces a bare Date.now() for new criterion IDs. - Close the footer navigation popover after selecting an FRQ instead of leaving it parked over the footer, matching frq/FRQFooter.tsx. - Roll subquestion labels over to two letters past 26 questions rather than emitting punctuation from String.fromCharCode(97 + index). - Memoize the derived AdvancedTextbox arrays and narrow the question prompt's setQuestions to the question that owns it. AdvancedTextbox returns the whole array, and an in-flight upload resolves against the array captured when it started, so writing every index back let a slow upload clobber edits to sibling questions. - Format both files with Prettier and add the missing trailing newlines. - Comment why AccordionContent needs an inline opacity override. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Summary
Testing
npx eslint src/components/frq/editorRenderer.tsx src/components/frq/editorFooter.tsx— passed.npm run build— passed with existing unrelated warnings.