[UI/UX:TAGrading] Fix Notebook code box overflow#12621
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12621 +/- ##
=========================================
Coverage 21.64% 21.64%
Complexity 9861 9861
=========================================
Files 268 268
Lines 36920 36920
Branches 495 495
=========================================
Hits 7990 7990
Misses 28439 28439
Partials 491 491
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Rkoester47
left a comment
There was a problem hiding this comment.
I tested the changes on this PR, and found what I believe are some issues to be resolved.
When testing grading a student submission with a very long code in a text box, the textbox did not immediately have a scrollbar visible. If I click into the box and then decide to try to scroll, the scrollbar appears and works. I don't think it should work this way, as the PR describes there should be a scrollbar visible immediately if the text overflows the box size.
Additionally, I was not able to drag and resize any text boxes while on this branch. I tested on a large box with text that went outside the visible window, as well as with a smaller box. Clicking the corner and dragging my mouse did not change the size of the text boxes.
642ff14 to
6da92fa
Compare
|
Hi @Rkoester47 Thank you for pointing it out. I have made the required changes and now it is working as intended. The textbox has a scroll bar visible immediately and it is dragable and resizable both horizontally and vertically. Screenshots
-
|
There was a problem hiding this comment.
I performed primarily a functionality test. In case it is relevant, I was using firefox during my testing. When testing, I was able to scroll down to read the rest of the text in the coding box, so it does fix the primary issue of not being able to scroll. Visually, however, I believe there is still some room for improvement. First, upon entering the notebook, I noticed that all of the boxes had a horizontal scroll wheel that didn't function, like in this picture:
but not only that, but when scrolling down on the long code textbox, I could see three different scroll wheels as seen below:
Of the three only the small one seen in the bottom right corner actually does anything or moves, but it seems to only visually represent scrolling down, as I can't figure out a way to interact with it, mostly due to the larger vertical scroll wheel blocking it when I try to mouse over it:
Besides that, the other issue I somewhat have is being able to expand the textbox, as there doesn't seem to be a maximum or minimum size:
While not really a bug, I believe this could cause some errors with users using it, and I think a minimum and maximum size could benefit this pr to prevent any potential errors. Besides that, I couldn't find any other problems with expanding the text box. Overall, I think it's looking good, there's definitely good progress and just needs some changes before its good.
|
Hi! @aconfo i have made the changes you requested. Now no multiple scroll bar visibility issue is not there. And There is also maximum and minimum resize limit. I have tested both on firefox and chromium. Both looks okay. Here is the videos: Firefox2026-04-09.01-41-01.mp4Chromium2026-04-09.01-43-04.mp4 |
Rkoester47
left a comment
There was a problem hiding this comment.
Thank you for making the requested changes. I have thoroughly tested this branch, including your most recent commits and can see that the requested feedback was implemented well. The scrollbar appears by default if there is overflow text, there is only one scrollbar, and the resizing of windows works correctly now as well. This is certainly a much needed quality of life improvement for the Notebook type gradeables.
I think this is a good change overall, and the implementation in the code is minimal and makes sense to me. I am approving this pull request.
aconfo
left a comment
There was a problem hiding this comment.
I tested the changes again on notebook basic in the notebook section and I was able to resize it and the limits for it worked very well. I think this looks really good and I wasnt able to find any issues.
Removed the extra new line
|
Please update the initial message to show the updated before & after images. |
Rkoester47
left a comment
There was a problem hiding this comment.
After discussing this PR further, we just have one more request before final approval. The feature works well with your current changes, but the text boxes should start at a size appropriate to the amount of text (student's answer) that is inside them, up to a certain point.
That is to say, if a student has entered 20 or so lines of text, the box can start at that size for the grader. If they have entered 100 lines of text, choose an appropriate max size to start the box at and allow resizing afterwards as you already are. Good work!
|
Will resolve the conflicts very soon. |
dandrecollins07-ctrl
left a comment
There was a problem hiding this comment.
Tested locally using a notebook submission with 190 lines of code. Verified notebook grading view behavior, including scrolling and manual resizing of code boxes. Reviewed the CSS changes and did not encounter any issues during testing. There is however, an unrelated merge conflict. Approving.
dandrecollins07-ctrl
left a comment
There was a problem hiding this comment.
Merged conflict fixed (not regarding issue for PR). Tested locally with 190+ lines of code. Did not encounter any issues. Approving.
dagemcn
left a comment
There was a problem hiding this comment.
Changes here look good, this ensures that the code boxes are much easier to use for graders.


Why is this Change Important & Necessary?
Fixes #11916 where student code boxes in the Notebook grading interface were fixed in size and non-interactive. Large submissions were often cut off, and TAs could not scroll through the code or resize the boxes to fit the content.
What is the New Behavior?
pointer-events:nonefrom the code boxes in the grading view. Editing is still prevented via CodeMirror'sreadOnlysetting.min-heightbased on instructor settings but expand toautoheight to fit student content..CodeMirror-scrollelement to ensure scrollbars appear when content exceeds the maximum height.Screenshots
Before
After
Steps to Reproduce / Test