Skip to content

[Feature:RainbowGrades] Add show_notes#12756

Closed
GarvitKhandelwal31 wants to merge 6 commits into
Submitty:mainfrom
GarvitKhandelwal31:add-show-notes-clean
Closed

[Feature:RainbowGrades] Add show_notes#12756
GarvitKhandelwal31 wants to merge 6 commits into
Submitty:mainfrom
GarvitKhandelwal31:add-show-notes-clean

Conversation

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Fixes #12753.

Rainbow Grades recently added support for the show_notes field in configuration JSON, but the Rainbow Grades Web UI did not expose this setting. That created a gap where instructors could not configure this behavior from the UI and had to edit JSON manually. This change closes that UI parity gap and makes show_notes configurable directly in the Rainbow Grades Configuration page.

What is the New Behavior?

The Rainbow Grades Configuration page now includes a per-gradeable Show Notes dropdown inside the Category/Gradeable Configuration section. For each gradeable, instructors can select:

  • never
  • instructor_only
  • student_only
  • student_and_instructor

Behavior details:

  • Existing values from gui_customization.json are loaded and shown in the dropdown.
  • If a gradeable does not already define show_notes, the UI defaults to never.
  • Changing the dropdown triggers autosave.
  • Saved values are persisted in gui_customization.json under each gradeable entry as show_notes.

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

  1. Open the Rainbow Grades Configuration page for a course.
  2. Enable Show Category/Gradeable Configuration.
  3. Move at least one bucket to Assigned Buckets (if needed) so gradeables are visible.
image
  1. For any gradeable, change Show Notes from never to instructor_only.
image
  1. Confirm status updates to All changes saved.
  2. Refresh the page.
  3. Verify the same gradeable still shows instructor_only.
  4. Download GUI Customization JSON.
  5. Verify the edited gradeable includes show_notes with the selected value.
image

Automated Testing & Documentation

Automated checks run:

  • ESLint passed for updated JavaScript and Cypress files.
  • Stylelint passed for updated CSS.
  • PHP syntax check passed for backend model changes.

End-to-end:

  • Rainbow Cypress spec includes coverage for interacting with the new Show Notes dropdown.
  • Persistence behavior was manually verified via page refresh and downloaded JSON validation.

Documentation:

  • No new external workflow introduced beyond exposing an existing config option in the UI.

Other information

  • Breaking change: No
  • Database migration required: No
  • Security concerns: None identified
  • Backward compatibility: Preserved (missing show_notes values continue to behave as never by default)

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Apr 7, 2026
Copilot AI review requested due to automatic review settings April 7, 2026 06:46
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to In Review in Submitty Development Apr 7, 2026

Copilot AI 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.

Pull request overview

Adds Web UI support for configuring the existing Rainbow Grades show_notes per-gradeable setting, closing parity with gui_customization.json.

Changes:

  • Adds a per-gradeable Show Notes dropdown to the Rainbow Grades customization page and threads the selected value into the JSON built/saved by the UI.
  • Loads existing show_notes values from existing customization JSON (defaulting to never) when building the page model.
  • Extends Cypress coverage to interact with the new dropdown.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
site/public/js/rainbow-customization.js Collects show_notes from the UI into the saved JSON and triggers autosave on dropdown changes.
site/public/css/rainbow-customization.css Adds styling for the new Show Notes label/select.
site/cypress/e2e/Cypress-Gradeable/rainbow_grading.spec.js Exercises the new Show Notes dropdown in the Rainbow customization UI.
site/app/templates/admin/RainbowCustomization.twig Renders the new Show Notes dropdown for each gradeable.
site/app/models/RainbowCustomization.php Provides default show_notes and loads persisted values from existing JSON.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread site/app/templates/admin/RainbowCustomization.twig
Comment thread site/cypress/e2e/Cypress-Gradeable/rainbow_grading.spec.js
Comment thread site/cypress/e2e/Cypress-Gradeable/rainbow_grading.spec.js
@codecov

codecov Bot commented Apr 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.65%. Comparing base (05dae18) to head (b77f0b6).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##               main   #12756   +/-   ##
=========================================
  Coverage     21.64%   21.65%           
- Complexity     9654     9657    +3     
=========================================
  Files           268      268           
  Lines         36244    36251    +7     
  Branches        487      487           
=========================================
+ Hits           7845     7850    +5     
- Misses        27916    27918    +2     
  Partials        483      483           
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.67% <75.00%> (+0.01%) ⬆️
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.

@Eli-J-Schwartz Eli-J-Schwartz 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 a functionality review of this PR. When I enabled the toggle, all gradables had a dropdown to select to who notes were available:

Image

When I reloaded the page, the settings I made persisted.

Then, I downloaded the GUI json file, and found that the settings I made were loaded correctly.

Image

I also took a look at the code, and it seems to be bug-free.
I noticed that this PR is a duplicate of #12757. Only one of the two should be merged.

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Apr 7, 2026
@JManion32

Copy link
Copy Markdown
Contributor

@GarvitKhandelwal31 Please review #12757, which is solving the same issue.

@bmcutler

bmcutler commented Apr 8, 2026

Copy link
Copy Markdown
Member

@GarvitKhandelwal31
Thanks for the PR and including screenshots. I think the interface is overwhelming to show those options -- most instructors will not use this feature. Let's add an additional toggle next to "extra credit" and "remove lowest" that says "customize show notes" (or something similar, does anyone have a better description?). Anyway, let's only display those show notes drop down options if the user has enabled show gradeable configuration AND customize show notes.

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor Author

Sorry for delay. Will do the required changes and a thorough review of #12757 tomorrow.

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor Author

Closing this PR to consolidate the work for the reviewers, I did test #12757 and it was working good as well. Would re-open if the reviewers would want.

@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Apr 9, 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.

Add "show_notes" option to Rainbow grades Web UI

5 participants