Closed emanuelen5 closed 1 month ago
The updates across the QuestionAdd
, QuestionEditForm
, and QuestionShow
components streamline the process of adding new quiz questions. A button is added to facilitate creating a new question right after another is added, enhancing the user experience by eliminating the need to navigate back and forth between pages.
File Path | Change Summary |
---|---|
admin/src/Quiz/QuestionAdd.tsx |
Removed withRouter import and added onNew method for navigation to add new question page. |
admin/src/Quiz/QuestionEditForm.tsx |
Added onNew function in Props interface and modified button rendering logic to include a new button for creating a new question. |
admin/src/Quiz/QuestionShow.tsx |
Added onNew method to navigate to a new question addition page based on the quiz_id . |
sequenceDiagram
participant AdminUser
participant QuestionAdd
participant QuestionEditForm
participant QuestionShow
participant Router
AdminUser->>QuestionAdd: Click 'Save'
QuestionAdd->>Router: Navigate to Save Question
Router-->>QuestionAdd: Confirm Save
AdminUser->>QuestionEditForm: Modify Question
QuestionEditForm->>Router: Navigate to Edit Question
Router-->>QuestionEditForm: Confirm Edit
AdminUser->>QuestionShow: View Question
QuestionShow->>Router: Navigate to Show Question
Router-->>QuestionShow: Confirm Show
AdminUser->>QuestionShow: Click 'New question'
QuestionShow->>Router: Navigate to Add New Question
Router-->>QuestionShow: Confirm Navigation
Objective | Addressed | Explanation |
---|---|---|
Button for creating new quiz question after adding new question (#443) | ✅ |
In the land where quizzes grow, A button shines with a bright glow, To add questions anew, Without much ado, Making the admin's workflow smoothly flow.
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Fixes #443
Summary by CodeRabbit
New Features
Enhancements
withRouter
dependency and adding a dedicatedonNew
method for better user experience.