add full quiz histrory with show more/show less functionality#649
add full quiz histrory with show more/show less functionality#649Vrushti07 wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughPersisted all generated quizzes to Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Text_Input
participant LocalStorage as Storage
participant Router
participant Previous
User->>Text_Input: submit quiz details
Text_Input->>Storage: read `allQuizzes`
Text_Input->>Storage: write updated `allQuizzes` (prepend new)
Text_Input->>Router: navigate to /output
User->>Previous: open history page
Previous->>Storage: read `allQuizzes`
Previous->>Previous: derive `displayedQuizzes` (first 5 or all if showAll)
alt more than 5 and showAll=false
Previous->>User: render "Show More" button
else showAll=true
Previous->>User: render full list and "Show Less" button
end
User->>Previous: click Clear
Previous->>Storage: remove `allQuizzes`
Previous->>Previous: set showAll = false
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@eduaid_web/src/pages/Previous.jsx`:
- Around line 27-30: The handleClearQuizzes function currently removes
"allQuizzes" and clears setQuizzes but doesn't reset the showAll toggle; update
handleClearQuizzes to also call setShowAll(false) so the Show More/Show Less UI
is reset when quizzes are cleared (refer to handleClearQuizzes and the
showAll/setShowAll state variables).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e4ceb149-c2d6-4712-9c7b-5a8189439a54
📒 Files selected for processing (2)
eduaid_web/src/pages/Previous.jsxeduaid_web/src/pages/Text_Input.jsx
Addressed Issues:
Fixes #641
Improves the quiz dashboard history to display all generated quizzes instead of only last 5 and adds a show more/show less option to view full history.
How It Solves the Issue:
This ensures no quiz data is lost while maintaining a user-friendly interface.
Screenshots/Recordings:
Before :
5.questions.only.mp4
After :
Show.More.quiz.mp4
Summary by CodeRabbit