-
Notifications
You must be signed in to change notification settings - Fork 137
Refactor: migrate units index state from AngularJS to Angular #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 9.x
Are you sure you want to change the base?
Conversation
|
Hi Jeffy, I pulled this PR locally and ran it on my machine following the testing steps mentioned. The application starts correctly and the login flow works as expected. However, when navigating to a unit page, I’m consistently seeing a runtime error in the browser console. The error appears to originate from AngularJS, specifically related to attempting to read activeTasks from an undefined object (StateTaskResult.fromUiParams). This suggests that some AngularJS state or controller logic is still executing at runtime, and the data contract expected by the new Angular Units Index component is not being satisfied. Although the new Angular files are present, this indicates that the migration is not fully clean at runtime and contradicts the claim that unit pages are loading correctly. I would recommend resolving this integration issue before merging. I’m also observing a similar issue where tasks are not displayed at all. It looks like projects/index has been updated to use an empty , but ProjectsIndexStateCtrl still needs to execute to initialise $scope.project for child states. This causes downstream dashboard views to break. It may be necessary to either migrate ProjectsIndexStateCtrl into an Angular component or ensure it still initialises correctly under the new setup. Another option could be introducing a shared template that both units and projects can rely on, instead of removing the legacy implementation entirely. You can reproduce the issue by navigating to any project dashboard. |



Summary
This PR performs a strict migration of the Units Index state from AngularJS (CoffeeScript) to Angular.
The legacy AngularJS state and template have been fully removed and replaced with an Angular component and Angular-managed UI-Router state.
Changes
Removed legacy CoffeeScript state and template:
index.coffeeindex.tpl.htmlAdded Angular replacements:
index.component.tsindex.component.htmlindex.component.scssindex.state.tsNo CoffeeScript remains for units/index state.
Registered the new Angular state in
doubtfire.states.tsUpdated dependent AngularJS state to delegate rendering to Angular
Added a minimal AngularJS shim module (
index.ajs.module.ts) to preserve module dependency resolution (no logic, no state)Migration Notes
Testing
npm start/units/:unitId)