Skip to content

[Bugfix:TAGrading] Fix 2-panel open-document select#12577

Merged
williamjallen merged 3 commits into
Submitty:mainfrom
RichardJSun:bugfix/ta-grading-2panel-panel-options
May 1, 2026
Merged

[Bugfix:TAGrading] Fix 2-panel open-document select#12577
williamjallen merged 3 commits into
Submitty:mainfrom
RichardJSun:bugfix/ta-grading-2panel-panel-options

Conversation

@RichardJSun

@RichardJSun RichardJSun commented Mar 13, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

In 2-panel side-by-side mode, clicking a panel button to open a new document showed incorrect options in the dropdown. Users saw "Open as left panel" and "Open as bottom left panel" — with "Open as right
panel" only reachable by scrolling — making it non-obvious how to open a document in the right panel. Confirmed in Safari.

Two interacting issues caused this:

  1. CSS display:none on <option> elements is not respected cross-browser (Safari, Firefox), so options that should be hidden remained visible in the DOM.
  2. The size=2 attribute clipped the visible list to the first two DOM positions (leftTop, leftBottom), pushing rightTop out of view.

Fixes #11968

What is the New Behavior?

Instead of toggling a CSS hide class on static options, updatePanelOptions() now dynamically rebuilds the <option> elements based on the current layout. Only options applicable to the active panel
mode are inserted into the DOM, and size is set to the exact option count so no scrolling is needed.

Mode Options shown
2-panel Open as left panel, Open as right panel
3-panel two-on-left Open as top left panel, Open as bottom left panel, Open as right panel
3-panel two-on-right Open as left panel, Open as top right panel, Open as bottom right panel
4-panel All four options

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

  1. Navigate to TAGrading for any assignment submission.
  2. Open the panel layout selector and choose 2-panel side-by-side.
  3. Click a panel button to open a new document — the dropdown should show exactly 2 options: "Open as left panel" and "Open as right panel" with no scrolling required.
  4. Switch to 3-panel two-on-left — dropdown should show 3 options (top left, bottom left, right panel).
  5. Switch to 3-panel two-on-right — dropdown should show 3 options (left panel, top right, bottom right).
  6. Switch to 4-panel — dropdown should show all 4 options.
  7. Confirm each option opens the document in the correct panel position.
  8. Reproduce in Safari to verify the original bug is fixed.

Automated Testing & Documentation

No automated tests currently cover this UI behavior. A GitHub issue should be opened to track adding Cypress coverage for panel option visibility across layout modes.

Other information

Not a breaking change. No migrations or security concerns. The value attributes on each <option> are unchanged, so the existing change event handler that reads $(this).val() continues to work without
modification.

…en-document select

In 2-panel mode, the open-document dropdown showed "left" and "bottom left"
instead of "left" and "right" (with "right" and "bottom right" only reachable
by scrolling). Two issues caused this:
1. CSS `display:none` on `<option>` elements is unreliable across browsers
   (confirmed in Safari), so hidden options remained in the DOM.
2. `size=2` clipped the visible area to the first two DOM positions
   (leftTop, leftBottom), pushing rightTop out of view.

Replace the CSS hide/show approach with dynamic DOM reconstruction: rebuild
the select's options each call based on the current layout, setting `size`
to the exact option count so all options are always visible without scrolling.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Mar 13, 2026
@QuackHonk
QuackHonk self-requested a review March 24, 2026 19:00
@QuackHonk QuackHonk self-assigned this Mar 24, 2026
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Mar 24, 2026
@QuackHonk QuackHonk removed their assignment Mar 24, 2026
@QuackHonk
QuackHonk removed their request for review March 24, 2026 19:06
@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 Apr 8, 2026
Comment thread site/ts/ta-grading-panels.ts Outdated
@github-project-automation github-project-automation Bot moved this from In Review to Work in Progress in Submitty Development Apr 30, 2026
@williamjallen
williamjallen dismissed their stale review May 1, 2026 01:00

Requested changes have been addressed.

@codecov

codecov Bot commented May 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.67%. Comparing base (3d7d90b) to head (74b4e35).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12577   +/-   ##
=========================================
  Coverage     21.67%   21.67%           
  Complexity     9809     9809           
=========================================
  Files           268      268           
  Lines         36730    36728    -2     
  Branches        490      489    -1     
=========================================
  Hits           7960     7960           
+ Misses        28284    28283    -1     
+ Partials        486      485    -1     
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.02% <0.00%> (+<0.01%) ⬆️
migrator 100.00% <ø> (ø)
php 20.72% <ø> (ø)
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.

@github-project-automation github-project-automation Bot moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development May 1, 2026
@williamjallen
williamjallen merged commit 25137eb into Submitty:main May 1, 2026
87 of 94 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development May 1, 2026
prestoncarman added a commit that referenced this pull request May 21, 2026
* main: (50 commits)
  [Bugfix:Developer] Fix Broken CI (#12851)
  [Bugfix:System] Restore TCLAPP (#12850)
  [Bugfix:Submission] Fix non-VCS repo error (#12608)
  [Feature:Submission] Jupyter warnings outside notebook (#12523)
  [Bugfix:InstructorUI] Removed feature flag for Bulk Late Days (#12826)
  [Bugfix:Forum] Fix stats header rendering (#12698)
  [Bugfix:Autograding] Fix negative number tolerance (#12569)
  [Bugfix:HelpQueue] Always use Abbreviated Names in OH (#12820)
  [Bugfix:Autograding] Fix regrade team detection (#12737)
  [Dependency] Bump Lichen from v23.09.00 to v26.04.01 (#12823)
  [Dependency] Bump RainbowGrades from v25.10.00 to v26.04.01 (#12824)
  [Feature:Developer] Remove misc Java utils and TCLAPP (#12819)
  [Bugfix:TAGrading] Fix 2-panel open-document select (#12577)
  [Dependency] Bump AnalysisToolsTS from v23.10.00 to v26.04.00 (#12822)
  [Bugfix:Developer] Fix bump_repo permissions (#12821)
  [Bugfix:InstructorUI] Change Colors to match in Docker UI table (#12739)
  [Bugfix:Forum] Reduce Page Caching (#12339)
  [Bugfix:System] File lost when running install clean fix (#12158)
  [Bugfix:Submission] No File Rubric submit all user groups (#12812)
  [Dependency] Bump twig/markdown-extra from 3.23.0 to 3.24.0 in /site (#12721)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Safari Open Panels

3 participants