You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This pull requests adds a confirmation modal to AssignCourseSidePanel so that while selecting and assigning a course, accidentally clicking outside of the panel won't close the side panel.
Hi @LianaHarris360, here are some issues I was able to identify while manually testing:
When I click the 'Assign course' button the page becomes unresponsive. There are no errors in the console. If I navigate back to the 'Courses' page I can see that the course is listed in the table:
cannot.assign.course.mp4
The modal should not appear when the user hasn't made any changes. This is the existing behavior at Lessons, Quizzes and Users:
no.changes.mp4
The same should be valid if the user decides to click the 'Cancel' button if they haven't made any selections. If they have made any selection and they chose to click the Cancel button I think we should still show the confirmation modal.
Perhaps it should be further discussed what should be the label, text and buttons of the modal, as currently for the other places we are using this one:
Hi @LianaHarris360, I confirm that the reported issues are fixed. Now there are just the following scenarios to be handled too:
The confirmation modal is not shown if I have selected a radio button at 'Select course to assign' while it should because I have made a selection:
2notshown.mp4
The confirmation modal appears if I have made a selection at 'Select recipients' and then clicked the back arrow. In that case it should not appear, as the user is technically still editing things and should be able to go back and see the selected course:
@pcenov it is updated now so that the confirmation modal is displayed if a course is selected and is no longer displayed if there are selected recipients and the user clicks the back arrow or back button in the side panel.
Thanks @LianaHarris360 - I confirm that the above is fixed now but there are two additional cases derived from these changes that need to be handled as well:
If I have selected a radio button and I go to the 'Select recipients' page and don't select anything there, then when I click outside of the panel I'm not seeing the confirmation modal:
no.confirmation.mp4
If I have selected a radio button and I go to the course details page, then the confirmation modal is also not being displayed after clicking outside of the panel:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Summary
This pull requests adds a confirmation modal to
AssignCourseSidePanelso that while selecting and assigning a course, accidentally clicking outside of the panel won't close the side panel.closeconfirmationmodal.mp4
References
Closes #14140
Reviewer guidance