Skip to content

[Feature:InstructorUI] Automatic Height for Input Cells#12287

Merged
bmcutler merged 8 commits intomainfrom
simple-entry-height-fix
Jan 27, 2026
Merged

[Feature:InstructorUI] Automatic Height for Input Cells#12287
bmcutler merged 8 commits intomainfrom
simple-entry-height-fix

Conversation

@JManion32
Copy link
Contributor

@JManion32 JManion32 commented Dec 28, 2025

Why is this Change Important & Necessary?

fixes #12278
The <textarea> for simple gradeables is set to 1 line of text (unless you click on it). If an instructor wants to view all of the comments, they have to manually expand each box, and when they click away, it collapses.

What is the New Behavior?

  • Added an Auto-Expand Rows toggle, allowing the user to choose between an expanded text view, and the standard one line of text.
  • Text expansion is as large as the amount of text in the input box
  • The user's preference is saved with a cookie
  • While working on this PR, I found that several CSS classes were in server.css, when they should have been in simple-grading.css, so I moved them over.
  • Small accessibility change: Checkpoint hover is now cursor: pointer and Text hover is cursor: text
  • Another small change: Adjusted row lengths, making numeric/checkpoint smaller, and text larger.
  • Clicking on an individual text box will still automatically expand it, and clicking off will close it.

Before Clicking (Numeric/Text Gradeable)

image

After Clicking (Numeric/Text Gradeable)

image

Note that the functionality should be the same for both gradeable types.

What steps should a reviewer take to reproduce or test the bug or new feature?

Create 2 different types of gradeables:

  1. Checkpoint
  2. Numeric / Text
    For each, verify:
  • toggle works and persists on reload.
  • Text boxes automatically expand while entering text and collapse when clicking away
  • User can change height, and scrollbar mitigates overflow

Automated Testing & Documentation

There is no automated testing for this new change. If this PR is determined to be the best solution for this issue, I will make one.

Other information

This is not a breaking change.

@github-project-automation github-project-automation bot moved this to Seeking Reviewer in Submitty Development Dec 28, 2025
@JManion32 JManion32 changed the title Initial Commit [Feature:InstructorUI] Automatic Height for Input Cells Dec 28, 2025
@codecov
Copy link

codecov bot commented Dec 28, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.67%. Comparing base (f2fc7e1) to head (8afb535).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12287   +/-   ##
=========================================
  Coverage     21.67%   21.67%           
  Complexity     9618     9618           
=========================================
  Files           268      268           
  Lines         36158    36158           
  Branches        486      486           
=========================================
  Hits           7837     7837           
  Misses        27839    27839           
  Partials        482      482           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <ø> (ø)
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 90.72% <ø> (ø)

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.

@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 Jan 12, 2026
@hyeenaa hyeenaa self-requested a review January 16, 2026 22:31
@automateprojectmangement automateprojectmangement bot moved this from Seeking Reviewer to In Review in Submitty Development Jan 16, 2026
Copy link
Contributor

@williamschen23 williamschen23 left a comment

Choose a reason for hiding this comment

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

Pretty sure that's not what Barb said in the issue description (don't know if she said something different in person). She said that on page load the box should automatically resize to fit the content. This should be the default behavior of every markdown cell (not within the scope of the PR but yeah)

@williamschen23 williamschen23 removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Jan 17, 2026
Copy link
Contributor

@Rkoester47 Rkoester47 left a comment

Choose a reason for hiding this comment

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

The changes made on this branch made the desired changes described in the PR. On main, if I tried to fill up a text box on either type of gradeable, the text box would become too large and behave unhelpfully. I also encountered an error after entering too many characters and had to refresh the page.

On this branch, I am able to add multiple lines of text and have the text box reset to one single line when I click out of it. The new max character limit of 150 also seems to prevent the error I described earlier. The text box and scroll bar now look and behave much better than on main. On reload, the text in the single line of text box is still visible, resolving the linked issue.

I tested these changes in Firefox, and it seems that everything is working as desired.

@github-project-automation github-project-automation bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Jan 20, 2026
Copy link
Contributor

@hyeenaa hyeenaa left a comment

Choose a reason for hiding this comment

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

On the main branch for the submitty vm this behaves as outlined in the initial issue #12278 made by Barb. I fill up the text box with hundreds of line and it becomes unhelpfully large, covering the page.

After testing it on the branch, it works better, only expanding up to 150px height and adding a scrollbar.

The previous implementation of this PR left more to be desired. In this commit, I added a toggle (saved with a cookie) that allows the user to switch between expanded cell heights, and collapsed. I have also given the user the freedom to expand the row as much as possible, rather than capping it.
.cell-grade is used in the js logic to ensure changes persist. I had adjusted the styles in this PR, and as a result, text was no longer persisting on reload. Now cell-grade is in the correct places, and other CSS logic has been abstracted to new classes.
@bmcutler bmcutler merged commit 75249b4 into main Jan 27, 2026
23 of 26 checks passed
@bmcutler bmcutler deleted the simple-entry-height-fix branch January 27, 2026 18:05
@github-project-automation github-project-automation bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

numeric/text gradeable - textbox should resize

5 participants