Skip to content

[Feature:Developer] Consolidate Manage Sections javascript#12633

Merged
bmcutler merged 41 commits into
mainfrom
remove-manage-sections-javascript
Apr 6, 2026
Merged

[Feature:Developer] Consolidate Manage Sections javascript#12633
bmcutler merged 41 commits into
mainfrom
remove-manage-sections-javascript

Conversation

@Rkoester47

@Rkoester47 Rkoester47 commented Mar 23, 2026

Copy link
Copy Markdown
Contributor

Why is this Change Important & Necessary?

Closes #12632

Currently, the RotatingSectionsForm.twig file, which governs the Manage Sections page, has accumulate a lot of inline javascript. After many new features and functionality tweaks, this has become too much.

What is the New Behavior?

Now, the Javascript functions that are used by the Manage Sections page exist in rotating-sections.js. They are safely accessed from here and all of the functionality of Manage Sections remains intact.

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

Sign in as instructor, navigate to Sample > Manage Sections, and test all of the functionality of the page.

  • Make sure you can add and remove sections (only sections with 0 students can be deleted).
  • Update course ID's for new and old sections.
  • Delete sections with and without course IDs
  • Make sure you cannot use Course IDs or Section IDs that are already in use
  • Test the Manage Rotating Sections part of the page below the main table

Automated Testing & Documentation

Other information

This is not a breaking change

Rkoester47 and others added 30 commits February 3, 2026 13:08
Copied style for icon from user-profile.css
- moved styling to server.css
- fixed indentation of button
- restored submit button
Also removed comment from server.css
@Rkoester47 Rkoester47 changed the title [Feature:Refactor] Consolidate Manage Sections javascript [Feature:Developer] Consolidate Manage Sections javascript Mar 23, 2026
@Rkoester47
Rkoester47 marked this pull request as ready for review March 26, 2026 16:48
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to Seeking Reviewer in Submitty Development Mar 26, 2026

@John-Roy123 John-Roy123 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.

Following the instructions in the PR, all behaviors are working as intended (Creating new section with and without course ID, deleting section, and editing course IDs for existing courses). I was unable to find any issues with your implementation. The code looks very readable and still works. Good stuff!

@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Awaiting Maintainer Review in Submitty Development Mar 27, 2026

@aconfo aconfo 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. I tried adding various section names, and course IDs. I couldn't find an obvious way to break the site. I tried comparing my testing with and without the changes and couldn't find any difference between the two. Besides that, I also tried interacting with manage rotating sections and again I couldn't find anything different with or without it. I also tried adding sections that already existed which it prevented. All and all it looks good and I couldn't find any problems.

Comment thread site/app/templates/admin/users/RotatingSectionsForm.twig Outdated
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Mar 29, 2026
@Rkoester47
Rkoester47 requested a review from JManion32 March 31, 2026 00:54
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Mar 31, 2026

@JManion32 JManion32 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.

Functionality is unchanged, code looks great. This abstraction separates concerns, opening the door for future changes such as migrating JS files to TS, Twig to Vue, etc. Nice work with this PR, and page as a whole!

@github-project-automation github-project-automation Bot moved this from In Review to Awaiting Maintainer Review in Submitty Development Mar 31, 2026

@Farhanxikram Farhanxikram left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything seems to be working completely fine. I walked through sample trying various things, and failed to find any issues.
OS: Windows
browser: Safari

@williamjallen williamjallen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rkoester47 One quick fix and then this should be good to go.

Comment thread site/app/templates/admin/users/RotatingSectionsForm.twig Outdated
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Work in Progress in Submitty Development Mar 31, 2026
@Rkoester47
Rkoester47 requested a review from williamjallen April 2, 2026 16:22
@automateprojectmangement automateprojectmangement Bot moved this from Work in Progress to In Review in Submitty Development Apr 2, 2026
@Rkoester47 Rkoester47 moved this from In Review to Awaiting Maintainer Review in Submitty Development Apr 6, 2026
@bmcutler
bmcutler merged commit c683a9b into main Apr 6, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Apr 6, 2026
@bmcutler
bmcutler deleted the remove-manage-sections-javascript branch April 6, 2026 19:30
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.

Remove inline Javascript from Manage Sections page

7 participants