[Bugfix:TAGrading] Fix header overlap#12793
Conversation
There was a problem hiding this comment.
Pull request overview
Restores the intended TA Grading inline PDF header behavior (no overlap with page 1) while improving usability on narrow/mobile widths by adjusting the file-view layout and scrolling behavior.
Changes:
- Updates the file-view header styling to be sticky/in-flow and makes the file content area independently scrollable.
- Adjusts “scroll to page” logic in TA grading and the embedded PDF renderer to account for the new layout.
- Adds mobile-specific CSS to reduce horizontal overflow issues and allow header rows to wrap.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
site/ts/ta-grading-rubric.ts |
Updates rubric-driven page navigation scroll logic for PDFs. |
site/public/js/pdf/PDFAnnotateEmbedded.js |
Updates initial PDF page scroll behavior after render. |
site/public/css/electronic.css |
Changes file-view layout: sticky header, scrollable content, and mobile overflow/wrapping tweaks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2ad1ff8 to
cdc07ea
Compare
There was a problem hiding this comment.
I tested the changes made on this PR and confirm that they work as described. I tested a TA grading gradeable with a PDF. and the info banner above did not cover up the PDF at any point. I made sure to resize my browser window to mobile dimensions, then zoom and scroll on the PDF. The image was not obstructed at any point. However, some tests are failing and they should be addressed before merging.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12793 +/- ##
============================================
- Coverage 21.67% 21.67% -0.01%
Complexity 9802 9802
============================================
Files 268 268
Lines 36724 36725 +1
Branches 489 490 +1
============================================
Hits 7960 7960
Misses 28279 28279
- Partials 485 486 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@GarvitKhandelwal31 |
Why is this Change Important & Necessary?
Solves #12763
#12766 changes were reverted by the PR #12784 due to a bug identified in the PR #12779
In PR #12779 in mobile view seeing the PDF is very difficult due to this PDF header overlap.
Screen recording of that-
577301720-83a6717d-95f9-4204-8f56-2355431a573c.mp4
What is the New Behavior?
This PR includes all the changes from #12766 while excluding the unnecessary portion identified in #12779. Also it fixes the poor PDF readability in mobile view.
Screen.Recording.2026-04-17.021938.mp4
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
No new automated tests were added in this PR (UI/layout and scroll behavior adjustment).
Other information
Breaking change: No.
Migrations required: No.
Security concerns: None identified.