Skip to content

upload-submission-modal: migrate modal service to uibModal#487

Open
sheshankarvapally wants to merge 1 commit intothoth-tech:10.0.xfrom
sheshankarvapally:clean-upload-submission-modal-10x
Open

upload-submission-modal: migrate modal service to uibModal#487
sheshankarvapally wants to merge 1 commit intothoth-tech:10.0.xfrom
sheshankarvapally:clean-upload-submission-modal-10x

Conversation

@sheshankarvapally
Copy link
Copy Markdown

Summary

Migrated the upload-submission-modal dependency from the old AngularJS $modal service to $uibModal.

Investigation

The upload-submission-modal module is still required because it controls the task submission workflow, including file/evidence upload, test submission handling, group contribution flow, comments, declaration display, and upload completion handling.

The module should not be removed because task submissions still depend on this modal workflow.

The blocker identified was the old $modal dependency used to open the submission modal.

The template and SCSS files were reviewed as part of the ticket. However, they do not directly use the modal service, so they did not require changes for this dependency migration.

Migration

The migration was completed in upload-submission-modal.coffee.

The factory injection was updated from $modal to $uibModal.

The modal open call was updated from $modal.open to $uibModal.open.

The existing modal configuration was preserved, including:

  • same template URL
  • same controller
  • same resolved task value
  • same resolved reuploadEvidence value
  • same large modal size
  • same static backdrop behaviour
  • same keyboard setting
  • same upload workflow

This keeps the migration small, focused, and safe, while removing the old modal service dependency from this module.

Changes Made

  • Replaced the old $modal service injection with $uibModal.
  • Replaced $modal.open with $uibModal.open.
  • Kept the existing modal configuration and workflow unchanged.
  • No changes were required in the HTML template or SCSS file.

Files Changed

  • src/app/tasks/modals/upload-submission-modal/upload-submission-modal.coffee

Verification

  • Confirmed the PR contains only 1 commit.
  • Confirmed only 1 file changed.
  • Confirmed the diff is limited to 2 additions and 2 deletions.
  • Confirmed $modal.open is no longer used in upload-submission-modal.coffee.
  • Confirmed the remaining $modalInstance references are expected because they control the currently opened modal instance.
  • Commit passed the project commitlint hook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant