Skip to content

fix: re-add groups module registration to states.coffee and angularjs#486

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

fix: re-add groups module registration to states.coffee and angularjs#486
Sujay-Deakin wants to merge 1 commit intothoth-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

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.

2 participants