[UI/UX:Submission] Fix scroll lock#12629
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12629 +/- ##
=========================================
Coverage 21.65% 21.65%
Complexity 9650 9650
=========================================
Files 268 268
Lines 36231 36231
Branches 487 487
=========================================
Hits 7846 7846
Misses 27902 27902
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@GarvitKhandelwal31 Please address failing CI |
|
@JManion32 Done. I even verified the JS lint errors locally, they are passing now. |
Rkoester47
left a comment
There was a problem hiding this comment.
I tested the changes made on this branch and they do seem to have effectively resolved the issue. On main, attempting to upload a profile picture will hide the scrollbar regardless of if it fails or succeeds. On this branch, uploading does not affect the scroll bar at all either way. Good work solving this issue.
QuackHonk
left a comment
There was a problem hiding this comment.
Looks good! Fixes the bug without creating new ones.
Farhanxikram
left a comment
There was a problem hiding this comment.
Functionality review:
everything looks good to me, didn't see any new bugs and this fixed the bug addressed in the issue :)
### Why is this Change Important & Necessary? Closes Submitty#12628. Uploading a new profile photo on My Profile could leave page scrolling disabled until a full reload. This is a UI regression that impacts usability and can make the page feel stuck after a successful upload. ### What is the New Behavior? After submitting the profile photo form (both success and error paths), the modal closes through the shared popup close handler so scroll state is correctly restored. The page remains scrollable immediately, without requiring a refresh. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Start Submitty in Vagrant and log in. 2. Navigate to My Profile. 3. Confirm the page is scrollable (if content exceeds viewport). 4. Click Upload profile photo. 5. Test error path: - Click Submit without selecting a file. - Confirm error message appears. - Confirm page scrolling is still enabled. https://github.com/user-attachments/assets/b716d45f-603d-46a6-bac6-a5222c2ef3a9 6. Test success path: - Reopen Upload profile photo. - Select a valid image and click Submit. - Confirm success message appears. - Confirm page scrolling is still enabled (no reload needed). https://github.com/user-attachments/assets/10964e9b-53a2-4137-a765-add1a6527027 ### Automated Testing & Documentation - Added Cypress regression assertions in the profile photo upload test to verify body does not retain the no-scroll class after submit (error and success scenarios). - No submitty.org documentation update is required for this bugfix. ### Other information - Breaking change: No. - Migrations required: No. - Security concerns: None identified. - Sysadmin action required: No.
### Why is this Change Important & Necessary? Closes Submitty#12628. Uploading a new profile photo on My Profile could leave page scrolling disabled until a full reload. This is a UI regression that impacts usability and can make the page feel stuck after a successful upload. ### What is the New Behavior? After submitting the profile photo form (both success and error paths), the modal closes through the shared popup close handler so scroll state is correctly restored. The page remains scrollable immediately, without requiring a refresh. ### What steps should a reviewer take to reproduce or test the bug or new feature? 1. Start Submitty in Vagrant and log in. 2. Navigate to My Profile. 3. Confirm the page is scrollable (if content exceeds viewport). 4. Click Upload profile photo. 5. Test error path: - Click Submit without selecting a file. - Confirm error message appears. - Confirm page scrolling is still enabled. https://github.com/user-attachments/assets/b716d45f-603d-46a6-bac6-a5222c2ef3a9 6. Test success path: - Reopen Upload profile photo. - Select a valid image and click Submit. - Confirm success message appears. - Confirm page scrolling is still enabled (no reload needed). https://github.com/user-attachments/assets/10964e9b-53a2-4137-a765-add1a6527027 ### Automated Testing & Documentation - Added Cypress regression assertions in the profile photo upload test to verify body does not retain the no-scroll class after submit (error and success scenarios). - No submitty.org documentation update is required for this bugfix. ### Other information - Breaking change: No. - Migrations required: No. - Security concerns: None identified. - Sysadmin action required: No.
Why is this Change Important & Necessary?
Closes #12628.
Uploading a new profile photo on My Profile could leave page scrolling disabled until a full reload. This is a UI regression that impacts usability and can make the page feel stuck after a successful upload.
What is the New Behavior?
After submitting the profile photo form (both success and error paths), the modal closes through the shared popup close handler so scroll state is correctly restored. The page remains scrollable immediately, without requiring a refresh.
What steps should a reviewer take to reproduce or test the bug or new feature?
Screen.Recording.2026-03-23.104155.mp4
Screen.Recording.2026-03-23.104456.mp4
Automated Testing & Documentation
Other information