Skip to content

Add FRQ editor interface and navigation - #341

Merged
saa938 merged 6 commits into
AP-Students:frqfrom
TechnoSamurai02:frq-editor-ui
Jul 28, 2026
Merged

Add FRQ editor interface and navigation#341
saa938 merged 6 commits into
AP-Students:frqfrom
TechnoSamurai02:frq-editor-ui

Conversation

@TechnoSamurai02

Copy link
Copy Markdown
Contributor

Summary

  • Builds the FRQ editor interface for descriptions, questions, points, response types, statuses, and grading criteria.
  • Adds footer controls for batch information, visibility, FRQ selection, and previous/next navigation.
  • Uses AP-style subquestion labels such as 1a, 1b, and 1c.
  • Keeps all data in memory for now; Firestore saving is not included yet.

Testing

  • npx eslint src/components/frq/editorRenderer.tsx src/components/frq/editorFooter.tsx — passed.
  • npm run build — passed with existing unrelated warnings.
  • Manually tested FRQ navigation and subquestion labels using the local Firebase emulators.

saa938 and others added 5 commits July 21, 2026 11:25
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
@saa938
saa938 changed the base branch from main to frq July 28, 2026 17:06
@saa938
saa938 marked this pull request as ready for review July 28, 2026 18:17
Copilot AI review requested due to automatic review settings July 28, 2026 18:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@saa938 saa938 linked an issue Jul 28, 2026 that may be closed by this pull request
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>
@saa938
saa938 merged commit d011a56 into AP-Students:frq Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

INTERN - Build FRQ Editor Page

4 participants