Skip to content

[Feature:RainbowGrades] Add show_notes control to Rainbow Grades#12757

Merged
bmcutler merged 8 commits into
Submitty:mainfrom
jndlansh:feature/rainbow-grades-show-notes
Apr 14, 2026
Merged

[Feature:RainbowGrades] Add show_notes control to Rainbow Grades#12757
bmcutler merged 8 commits into
Submitty:mainfrom
jndlansh:feature/rainbow-grades-show-notes

Conversation

@jndlansh

@jndlansh jndlansh commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Closes #12753
Rainbow Grades configuration now supports the show_notes field that was added to config.json, but it was not accessible via the Web UI. This PR exposes the field in the Rainbow Grades Configuration page, allowing instructors to configure notes visibility per gradeable without manually editing JSON.

What is the New Behavior?

  • New "Notes visibility" dropdown appears for each Numeric/Text and Checkpoint gradeable in the Gradeables section
  • Dropdown options: never (default), instructor_only, student_only, student_and_instructor
  • Dropdown is only visible when "Show Category/Gradeable Configuration" toggle is ON, minimizing UI clutter
  • Electronic File gradeables do not show this control (not applicable)
  • Selections persist in gui_customization.json with the show_notes field per gradeable
Screenshot 2026-04-07 125055 Screenshot 2026-04-07 125107 Screenshot 2026-04-07 125117 Screenshot 2026-04-07 125638

What steps should a reviewer take to reproduce or test?

  1. Navigate to Rainbow Grades Configuration page
  2. In the Gradeables section, toggle "Show Category/Gradeable Configuration" ON
  3. Verify "Notes visibility" dropdown appears below Numeric and Checkpoint gradeable titles
  4. Change dropdown values and confirm status shows "All changes saved"
  5. Refresh the page—selections should persist
  6. Download GUI Customization and verify JSON contains "show_notes" fields with selected values

Automated Testing & Documentation

Existing Rainbow Grades test suite covers page load and general functionality. New Cypress test case recommended to specifically assert show_notes dropdown visibility and persistence (separate GitHub issue).

Other information

  • Not a breaking change + backward compatible (defaults to "never" if not specified)
  • No database migrations required
  • No security concerns

@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 simple functionality review of this PR. When I toggled "Show Category/Gradeable Configuration", the dropdown menus appeared on applicable gradables, as seen in the screenshot below:

Image

Then, when I downloaded the GUI customization files, the selections appeared as I submitted for requested gradables:

Image

I took at the code as well, and it looks good, with no obvious bugs as far as I can tell.

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Apr 7, 2026
@Eli-J-Schwartz

Copy link
Copy Markdown
Contributor

Just noticed that this solves the same issue as #12756. Only one should be merged.

@codecov

codecov Bot commented Apr 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.68%. Comparing base (749e6a4) to head (abc143f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #12757      +/-   ##
============================================
+ Coverage     21.66%   21.68%   +0.01%     
- Complexity     9754     9778      +24     
============================================
  Files           268      268              
  Lines         36457    36504      +47     
  Branches        487      487              
============================================
+ Hits           7900     7915      +15     
- Misses        28074    28106      +32     
  Partials        483      483              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.04% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.71% <33.33%> (+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.

@jndlansh

jndlansh commented Apr 7, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @Eli-J-Schwartz!
I have addressed the Linting issues.

@JManion32

Copy link
Copy Markdown
Contributor

@jndlansh Please review #12756, which is solving the same issue.

@bmcutler

bmcutler commented Apr 8, 2026

Copy link
Copy Markdown
Member

@jndlansh

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.

NOTE: I made the same comment on the other PR solving this issue. We can only merge one of these PRs, please work together to make the best software. Thanks.

@jndlansh

jndlansh commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

Thank you so much @bmcutler!
I have added the required toggle. Yes I and @GarvitKhandelwal31 shall work together, but since he has already helped me massively in other PRs, it would be great to continue working in this PR or as you and garvit like.

Screenshot 2026-04-08 083836 Screenshot 2026-04-08 083849 Screenshot 2026-04-08 083925 Screenshot 2026-04-08 083901

@GarvitKhandelwal31

GarvitKhandelwal31 commented Apr 8, 2026

Copy link
Copy Markdown
Contributor

Hey @jndlansh can we add Cypress test that verifies the show notes dropdowns are hidden until both Show Category/Gradeable Configuration (or in accordance with the latest changes in your branch) and that a changed value persists after refresh and is reflected in the downloaded GUI customization JSON.
I did not test the UI, but since @Eli-J-Schwartz have already tested it should be solid.

@jndlansh

jndlansh commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@GarvitKhandelwal31 I have extended the rainbow_grading.spec.js file to add the new test: "Show Notes options require both toggles and persist to GUI JSON". It passed my local testing. Since you and I are working together on this PR/Issue it is good to add the test directly to verify the new functionality and UI betterments introduced by this PR.

Screenshot 2026-04-08 232437 Screenshot 2026-04-08 232451 Screenshot 2026-04-08 232504

@GarvitKhandelwal31

Copy link
Copy Markdown
Contributor
Screen.Recording.2026-04-09.145125.mp4

New UI notes visibility check box state is not persisted. Controls always come back hidden after refresh even when custom values already exist.

Comment on lines +190 to +193
// Refresh and verify selected value persists.
cy.reload();
cy.get('#config-toggle').check({ force: true }).should('be.checked');
cy.get('#customize_show_notes_checkbox').check({ force: true }).should('be.checked');

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.

After the persistence check done here, ensure we reset the course state that was changed in lines 171-185.

@jndlansh

jndlansh commented Apr 9, 2026

Copy link
Copy Markdown
Contributor Author
Recording.2026-04-10.013913.mp4

Now notes visibility check box and Show Category/Gradeable Configuration state persists.
Also edited the cypress test for the same. Kindly give it a try and let me know if I need to refractor this further.

@bmcutler

Copy link
Copy Markdown
Member

@jndlansh There are some lint errors, please correct them.
Thanks for your work on this and @GarvitKhandelwal31 and all the reviewers as well.
looking forward to installing this so my instructor colleagues can use this feature.

@jndlansh

Copy link
Copy Markdown
Contributor Author

@jndlansh There are some lint errors, please correct them. Thanks for your work on this and @GarvitKhandelwal31 and all the reviewers as well. looking forward to installing this so my instructor colleagues can use this feature.

I have fixed the lint errors, thank you @bmcutler. Would love to work further together to improve the software.

@bmcutler
bmcutler merged commit c52d47a into Submitty:main Apr 14, 2026
68 of 71 checks passed
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