Skip to content

[UI/UX:InstructorUI] Further Improve Editor UX#12218

Merged
bmcutler merged 4 commits intomainfrom
editor-perms-check
Nov 25, 2025
Merged

[UI/UX:InstructorUI] Further Improve Editor UX#12218
bmcutler merged 4 commits intomainfrom
editor-perms-check

Conversation

@JManion32
Copy link
Copy Markdown
Contributor

@JManion32 JManion32 commented Nov 18, 2025

Why is this Change Important & Necessary?

In preparation for modularizing the gradeable configuration editor for use in various areas of the site, there were several small tweaks that could be made to improve the UI and UX of the feature. This PR further builds on changes from #11991 and #12003.

What is the New Behavior?

Various changes to the gradeable configuration editor's UI to improve UX, see below:

1) Opening and Closing Folders:

Before, the entire file structure would be displayed at all times. This could become cumbersome when there were many folders and many files. Now, the contents of folders are toggled on click, and the folder icon is updated accordingly.
image

2) Realigned Files:

Though #12003 aimed to fix file alignment, it fell short due to root level files having the same indentation multiplication as nested files. This PR removes the indentation argument from the display_config_files macro, instead applying a set indentation to each nested level of files. All icons of each level should now be perfectly aligned at all times.

Before:

image

After:

image

3) Close on Repeat Click:

Selecting a file opened the editor, but selecting that same file again did not close it. Now, the editor closes on repeat click, using the same functionality as clicking the Cancel button.

4) Binary File Check:

Implemented a trivial binary file check in Twig:
image

This is likely not the best way to check for binaries, but it covers the common types, preventing the user, in most cases, from receiving the "File type not supported" error by giving the files non-clickable appearance and functionality:

image

If a binary file is included that is not part of this check, the file will appear clickable, and on click, a simple error message will display.

5) Remove Scrolling on File Open

Previously, when the user opened a file, the page would automatically scroll to a hardcoded value with the intention being to display the config editor. This worked well for standard file structures, but for large ones, it did not work as intended, sometimes even scrolling the user further away from the editor. This PR removes that call to the scroll function completely.

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

  1. Navigate to the Submissions/Autograding tab of any gradeable.
  2. Upload a gradeable configuration (see here for instructions).
  3. Test each of the new features, ensuring they work as specified above.
  4. Ensure no previous functionality has been inhibited.

Automated Testing & Documentation

There is currently no testing for the gradeable configuration editor. Documentation can be found here.

Other information

  • This is not a breaking change.
  • The primary purpose of this PR was to address permission issues with the configuration editor. None were found, so I instead looked to the UX.
  • The follow-up to this PR will modularize all config editor logic, enabling it to be used in other areas of Submitty such as the Grades Configuration page, and the Bulk Upload Redaction page

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 21.71%. Comparing base (d7f9077) to head (5c6ccca).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12218   +/-   ##
=========================================
  Coverage     21.71%   21.71%           
  Complexity     9612     9612           
=========================================
  Files           268      268           
  Lines         36070    36070           
  Branches        475      475           
=========================================
  Hits           7832     7832           
  Misses        27767    27767           
  Partials        471      471           
Flag Coverage Δ
autograder 21.39% <ø> (ø)
js 2.07% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.71% <ø> (ø)
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.

@JManion32 JManion32 marked this pull request as ready for review November 18, 2025 19:56
@automateprojectmangement automateprojectmangement bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Nov 18, 2025
Copy link
Copy Markdown
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.

I tested each of the 5 listed features on the editor for a grade configuration I uploaded myself (simple Python in the Sample course). All of the features listed in the PR functioned as described with no issues. Particularly I uploaded a .mp3 file to the editor and attempted to click it, confirming that the error message displays. While the binary file type check is not fully comprehensive, it does seem to cover all common use cases.

Overall the UI elements on this part of the page have been cleaned up and improved, and the user experience is certainly in a better state with these changes. As far as I can tell, no previous functionality has been impacted by these changes.

@github-project-automation github-project-automation bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Nov 18, 2025
@JManion32 JManion32 moved this from Awaiting Maintainer Review to Ready to Merge in Submitty Development Nov 22, 2025
@bmcutler bmcutler merged commit 6b716c3 into main Nov 25, 2025
25 checks passed
@bmcutler bmcutler deleted the editor-perms-check branch November 25, 2025 05:11
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.

3 participants