Skip to content

Refresh student_quiz_report_v2 UI#76

Open
pritamps wants to merge 2 commits intomainfrom
student_quiz_report_v2_ui_refresh
Open

Refresh student_quiz_report_v2 UI#76
pritamps wants to merge 2 commits intomainfrom
student_quiz_report_v2_ui_refresh

Conversation

@pritamps
Copy link
Copy Markdown
Contributor

Summary

  • Redesigns the student_quiz_report_v2.html template around a mobile-first, card-based layout with responsive breakpoints at md (768px) and lg (1024px), so it reads well on both phones and desktop.
  • No backend / data-contract changes — the router still passes the same report context (header, overall_performance, recommendation, subject_performance, chapter_performance).
  • Chapter-wise section now uses tabs (Physics / Chemistry / Mathematics — or Biology for NEET) with a single table and icon column headers.
  • Subject-wise cards use a compact 4-cell pair table (Marks/Skipped, Wrong/Correct, Percentage/Accuracy) with a colored left border.
  • Overall score always renders above the recommendation card.
  • Removes the in-page "Print/Save" button. The separate student_quiz_report_v2_print.html is untouched, so PDF output is unaffected.
  • Adds ui/ to .gitignore (local Next.js mockup scratch dir used during design).

Test plan

  • Open a v2 session report on mobile width — container narrows, summary tiles go 2-col, subject cards stack.
  • Open the same report on desktop — summary renders as 6 tiles in one row, subject cards lay out in 3 columns.
  • Click Physics / Chemistry / Mathematics tabs in the Chapter-wise section — only the selected subject's chapters are visible.
  • Confirm NEET reports show Biology instead of Mathematics in both the subject cards and chapter tabs.
  • ?format=pdf still renders using the untouched print template.

🤖 Generated with Claude Code

Redesigns the v2 report template around a mobile-first card layout, with
responsive breakpoints at md (768px) and lg (1024px) so it also reads well
on desktop. No backend or data-contract changes — the router still passes
the same `report` context.

Key changes:
- Container: centered card that grows from max-w-md to max-w-5xl.
- Header: solid blue bar; student/test fields stack on mobile, single row on md+.
- Overall Score: standalone card (always above Recommendation).
- Overall Performance Summary: 2-col on mobile, 6-col on md+ (6 metric tiles:
  Total Marks, Correct, Percentage, Skipped, Wrong, Accuracy).
- Subject-wise Performance: stacked on mobile, 3-col on md+; each card has a
  colored left border and a 4-cell pair-table (Marks/Skipped, Wrong/Correct,
  Percentage/Accuracy).
- Chapter-wise Performance: tabbed single-table view (Physics/Chemistry/
  Mathematics or Biology for NEET) with icon headers for Correct/Wrong/Skipped.
- Removed the in-page Print/Save button.
- Print template (student_quiz_report_v2_print.html) left untouched.

Also adds `ui/` to .gitignore (local Next.js mockup scratch dir).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Zero-attempt v2 records store `accuracy` (overall and per-subject) as
null, since correct / (correct + wrong) is 0/0. The new template formats
every summary and subject-card number, so null reaches `%.2f` and raises
TypeError during render.

Fall back to 0 for marks_scored, num_correct/wrong/skipped, percentage
and accuracy so a "student skipped everything" session renders as 0/0.00%
instead of crashing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator

@suryabulusu suryabulusu left a comment

Choose a reason for hiding this comment

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

looks good with some comments on discord

<div class="flex flex-col items-center justify-center py-8 bg-gray-50 rounded-2xl mb-4 md:mb-6">
<div class="text-[10px] md:text-xs text-gray-500 uppercase tracking-wider mb-2">Overall Score</div>
<div class="text-5xl md:text-6xl font-bold text-[#4a90e2] leading-none">
{{ (report.overall_performance.marks_scored or 0)|int }}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

worth showing marks_scored out of max_marks_possible ... like 100/180 ?

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.

2 participants