Skip to content

[UI/UX:TAGrading] Fix Notebook code box overflow#12621

Merged
bmcutler merged 6 commits into
Submitty:mainfrom
tijaruS:fix/codebox-overflow
Jun 19, 2026
Merged

[UI/UX:TAGrading] Fix Notebook code box overflow#12621
bmcutler merged 6 commits into
Submitty:mainfrom
tijaruS:fix/codebox-overflow

Conversation

@tijaruS

@tijaruS tijaruS commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

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?

  • Restored Mouse Events: Removed pointer-events:none from the code boxes in the grading view. Editing is still prevented via CodeMirror's readOnly setting.
  • Dynamic Sizing: Code boxes now use min-height based on instructor settings but expand to auto height to fit student content.
  • Manual Resizing: Added a vertical resize handle to the bottom corner of code boxes.
  • Scroll Correction: Targeted the internal .CodeMirror-scroll element to ensure scrollbars appear when content exceeds the maximum height.

Screenshots

Before

Before fix

After

After fix

Steps to Reproduce / Test

  1. Open a Notebook gradeable in the TA grading interface.
  2. View a student submission with a long code response.
  3. Verify that the box has expanded to fit the code or shows a scrollbar.
  4. Verify that you can manually drag the bottom-right corner of the box to resize it.

@codecov

codecov Bot commented Mar 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.64%. Comparing base (b9135e9) to head (520c220).

Additional details and impacted files

Impacted file tree graph

@@            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           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.01% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.70% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tijaruS tijaruS changed the title [UI/UX:Grading] Enable scrolling and resizing for Notebook code boxes [UI/UX:Grading] Fix Notebook code box overflow Mar 24, 2026

@Rkoester47 Rkoester47 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Mar 26, 2026
@tijaruS
tijaruS force-pushed the fix/codebox-overflow branch from 642ff14 to 6da92fa Compare March 31, 2026 14:09
@tijaruS

tijaruS commented Mar 31, 2026

Copy link
Copy Markdown
Contributor Author

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

image - image

@aconfo aconfo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Image

but not only that, but when scrolling down on the long code textbox, I could see three different scroll wheels as seen below:

Image

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:

Image

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:

Image Image 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.

@tijaruS

tijaruS commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

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:

Firefox

2026-04-09.01-41-01.mp4

Chromium

2026-04-09.01-43-04.mp4

@Rkoester47 Rkoester47 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@tijaruS tijaruS changed the title [UI/UX:Grading] Fix Notebook code box overflow [UI/UX:Grading] Notebook code box overflow Apr 30, 2026
@tijaruS tijaruS changed the title [UI/UX:Grading] Notebook code box overflow [UI/UX:TAGrading] Fix Notebook code box overflow Apr 30, 2026

@aconfo aconfo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation Bot moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development Apr 30, 2026
Removed the extra new line
@bmcutler

Copy link
Copy Markdown
Member

@tijaruS

Please update the initial message to show the updated before & after images.
Also please fix the merge conflicts

@Rkoester47 Rkoester47 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Apr 30, 2026
@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label May 15, 2026
@tijaruS

tijaruS commented May 21, 2026

Copy link
Copy Markdown
Contributor Author

Will resolve the conflicts very soon.

@dagemcn dagemcn self-assigned this Jun 4, 2026
@dagemcn dagemcn removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jun 4, 2026
@dagemcn dagemcn removed their assignment Jun 4, 2026

@dandrecollins07-ctrl dandrecollins07-ctrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 dandrecollins07-ctrl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merged conflict fixed (not regarding issue for PR). Tested locally with 190+ lines of code. Did not encounter any issues. Approving.

@dagemcn dagemcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes here look good, this ensures that the code boxes are much easier to use for graders.

@bmcutler
bmcutler merged commit 2d738b8 into Submitty:main Jun 19, 2026
45 of 50 checks passed
@github-project-automation github-project-automation Bot moved this from Work in Progress to Done in Submitty Development Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Notebook code boxes not showing full content

7 participants