Refactor toast to quiz deck level for immediate auto-advance #1677
+79
−221
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 refactors the quiz toast system to eliminate the 1.5 second delay when auto-submit is enabled and answers are correct.
Problem
Previously, when "auto submit answer" mode was activated, correct answers would show a success toast for 1.5 seconds before advancing to the next question. This created an unnecessary delay that slowed down the quiz experience.
Solution
The toast management has been moved from individual question components to the QuizDeck level, allowing for:
Implementation
QuizDeck.tsxDelaycomponentComponents Modified
QuizDeck.tsx- Added centralized toast management and immediate advance logicQuizDeckHanziToPinyinQuestion.tsx- Removed toast rendering, added immediate advanceQuizDeckOneCorrectPairQuestion.tsx- Removed toast rendering, added immediate advanceTesting
The refactor provides a much more responsive quiz experience while maintaining visual feedback during question transitions.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.