Skip to content

refactor: migrating groups.coffee to angular#486

Open
Sujay-Deakin wants to merge 1 commit into
thoth-tech:10.0.xfrom
Sujay-Deakin:migrate/unit-groups-state-clean
Open

refactor: migrating groups.coffee to angular#486
Sujay-Deakin wants to merge 1 commit into
thoth-tech:10.0.xfrom
Sujay-Deakin:migrate/unit-groups-state-clean

Conversation

@Sujay-Deakin
Copy link
Copy Markdown

@Sujay-Deakin Sujay-Deakin commented May 3, 2026

Note: This is a cleaned-up version of PR #482, containing only the
relevant files for the groups migration.

Description

Migrates units/states/groups from CoffeeScript/AngularJS to TypeScript/Angular
as part of the ongoing Angular migration effort.

Changes

  • Created groups.component.ts with @Input() bindings for unit and unitRole
  • Created groups.component.html replacing old groups.tpl.html:
    • Replaced ng-if/ng-hide with Angular @if/@else control flow
    • Replaced Font Awesome fa-users icon with Angular Material mat-icon
    • Replaced Bootstrap classes with Angular Material and Tailwind utilities
    • Replaced ui-sref with Angular [uiSref] binding
  • Created groups.component.scss (no custom styles needed)
  • Registered UnitGroupsStateComponent in doubtfire-angular.module.ts
  • Downgraded component in doubtfire-angularjs.module.ts for hybrid compatibility
  • Removed old AngularJS controller from groups.coffee
  • Deleted old groups.tpl.html

Testing

  • Navigated to units/1/students/groups as a Convenor
  • "No Groupwork Enabled" state renders correctly with Material icon,
    description text, and Unit Administration button

Screenshots

image

Copy link
Copy Markdown

@sakethsram8888 sakethsram8888 left a comment

Choose a reason for hiding this comment

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

Reviewed and tested this locally in my dev container, the groups page renders correctly, "No Groupwork Enabled" state loads up fine with the Material icon and Unit Administration button showing as expected. No errors or issues on my end.

The migration is clean and well-scoped. The Angular control flow (@if/@else), Material icon swap, Tailwind replacements, and the hybrid downgrade registration are all done correctly. The old AngularJS controller and groups.tpl.html cleanup is exactly what we want to see for this kind of migration.

One minor thing, might be worth dropping a quick comment in the empty groups.component.scss just to make it clear the lack of styles is intentional.

Overall code is clean and error-free. can be approved from my end

Copy link
Copy Markdown

@sheshankarvapally sheshankarvapally left a comment

Choose a reason for hiding this comment

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

Reviewed and tested locally on the review/pr-486 branch.

Verified that the migrated units/states/groups flow loads correctly and the Groups List page renders successfully with the expected empty state (No Group Work). Navigation, UI rendering, and styling all appear to work as expected with no visible issues or console errors during testing.

Changes also look clean and limited to the intended Angular migration scope for the groups state/components.

Image

@Sujay-Deakin Sujay-Deakin changed the title fix: re-add groups module registration to states.coffee and angularjs refactor: migrating groups.coffee to angular May 12, 2026
Copy link
Copy Markdown

@WaelAlahamdi WaelAlahamdi left a comment

Choose a reason for hiding this comment

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

Hi Sujay, thanks for your work.
Tested locally and the groups page loads correctly with no console issues. The migration scope looks clean and correct.
One small note: groups.component.scss is empty, please just confirm that no additional custom styling is required for this page.
Approved.

@Sujay-Deakin
Copy link
Copy Markdown
Author

Hi Wael, thanks for the review and approval!
Confirmed. No additional custom styling is required for this page. The layout is handled entirely through Angular Material components, so the SCSS file is intentionally empty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants