New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assignment updates: confirmation dialog for assignment of hidden units #31899
Conversation
…ddenAssignment dialog
…dot-org/code-dot-org into confirm-assignment-of-hidden-units
@@ -8,7 +8,7 @@ import i18n from '@cdo/locale'; | |||
import Button from '@cdo/apps/templates/Button'; | |||
import DropdownButton from '@cdo/apps/templates/DropdownButton'; | |||
import BaseDialog from '@cdo/apps/templates/BaseDialog'; | |||
import ConfirmAssignment from './ConfirmAssignment'; | |||
import {ConfirmHiddenAssignment as ConfirmAssignment} from './ConfirmHiddenAssignment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this being used to confirm at hidden assignment or something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh wait is this the old functionality that we will deprecate once the new features go out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, AssignToSection will be deleted when the new feature goes out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be imported as just {ConfirmHiddenAssignment}
now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just had one question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work @Erin007 !
@@ -8,7 +8,7 @@ import i18n from '@cdo/locale'; | |||
import Button from '@cdo/apps/templates/Button'; | |||
import DropdownButton from '@cdo/apps/templates/DropdownButton'; | |||
import BaseDialog from '@cdo/apps/templates/BaseDialog'; | |||
import ConfirmAssignment from './ConfirmAssignment'; | |||
import {ConfirmHiddenAssignment as ConfirmAssignment} from './ConfirmHiddenAssignment'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be imported as just {ConfirmHiddenAssignment}
now?
And I press the first ".uitest-assign-button" element | ||
And I wait until element ".uitest-confirm-assignment-dialog" is visible | ||
And I wait until element "#confirm-assign" is visible | ||
And I press the first "#confirm-assign" element |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did the assignment work? the suspense is killing me!
can you please check that #confirm-assign
is gone, and .uitest-unassign-button
is visible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
LP-1023
Currently if a teacher tries to assign a unit that they have previously hidden from the Edit Section Dialog, they see a confirmation dialog prompting them to unhide the unit before assigning:
This changes opens a similar dialog when a teacher tries to assign a previously hidden unit from the script or course overview page:
To accomplish this I renamed the
ConfirmAssignment
component toConfirmHiddenAssignment
and modified it to only handle this case because we are no longer using the confirmation dialog to confirm any other type of assignment. To populate the message in the dialog I needed to pass sectionName and assignmentName into theAssignButton
component which handles when the dialog is displayed.I added a UI test to ensure that the confirmation dialog opens when it should and "unhide and assign" works correctly. (However, this file of tests is currently being skipped because it's flaky, but it's a good start for when I re-enable).