[Feature:RainbowGrades] Add show_notes#12756
Conversation
There was a problem hiding this comment.
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_notesvalues from existing customization JSON (defaulting tonever) 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.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Eli-J-Schwartz
left a comment
There was a problem hiding this comment.
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:
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.
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.
|
@GarvitKhandelwal31 Please review #12757, which is solving the same issue. |
|
@GarvitKhandelwal31 |
|
Sorry for delay. Will do the required changes and a thorough review of #12757 tomorrow. |
|
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. |
Why is this Change Important & Necessary?
Fixes #12753.
Rainbow Grades recently added support for the
show_notesfield 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 makesshow_notesconfigurable 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:
neverinstructor_onlystudent_onlystudent_and_instructorBehavior details:
gui_customization.jsonare loaded and shown in the dropdown.show_notes, the UI defaults tonever.gui_customization.jsonunder each gradeable entry asshow_notes.What steps should a reviewer take to reproduce or test the bug or new feature?
nevertoinstructor_only.instructor_only.show_noteswith the selected value.Automated Testing & Documentation
Automated checks run:
End-to-end:
Documentation:
Other information
show_notesvalues continue to behave asneverby default)