-
Notifications
You must be signed in to change notification settings - Fork 72
docs: add projects/index migration investigation and plan #165
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
Open
JeffySam
wants to merge
22
commits into
thoth-tech:main
Choose a base branch
from
JeffySam:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
d93277a
Add files via upload
JeffySam 5d7dfba
Add files via upload
JeffySam 3270080
Delete PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam 08f02da
Delete PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam e73f5ad
docs: move projects index migration plan under OnTrack migration
JeffySam 1e3e346
docs: move projects index migration investigation under OnTrack migra…
JeffySam edc868e
Update PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam 96f0944
style: constrain markdown table width
JeffySam a8eded6
Update PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam 90d850b
Add files via upload
JeffySam 2e1b461
docs: remove mistakenly added units migration docs
JeffySam 064620b
docs: remove mistakenly added units migration docs
JeffySam 007554e
Update PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam 82befbe
Update PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam a023a6b
Update2 PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam 6f7a79b
Update3 PROJECTS_INDEX_MIGRATION_PLAN.md
JeffySam b8d30c5
Update3 PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
JeffySam 233b72a
Merge branch 'thoth-tech:main' into main
JeffySam 68c12d5
Fix prettier formatting
JeffySam 226bb89
Resolve merge
JeffySam 41d2c94
Fix prettier formatting
JeffySam e66b39a
Merge branch 'thoth-tech:main' into main
JeffySam File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
107 changes: 107 additions & 0 deletions
107
...ntation/Front End Migration/Migration/PROJECTS_INDEX_MIGRATION_INVESTIGATION.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| --- | ||
| title: Projects Index Migration Investigation | ||
| description: Investigation of the projects/index parent state migration from AngularJS to Angular | ||
| --- | ||
|
|
||
| # Projects Index Migration Investigation | ||
|
|
||
| Date: January 27, 2026 | ||
| Author: Jeffy Sam | ||
| Area: Projects module – index (parent) state | ||
|
|
||
| ## Purpose | ||
|
|
||
| This document investigates the current state of the `projects/index` parent state | ||
| migration from AngularJS to Angular. The goal is to confirm what has already been | ||
| migrated, identify what remains incomplete, and assess whether the state is safe | ||
| to finalise without breaking dependent child states. | ||
|
|
||
| ## Current State of the Migration | ||
|
|
||
| The Angular implementation of the `projects/index` parent state already exists | ||
| and is functionally complete. The following Angular files are present and active: | ||
|
|
||
| - `index.component.ts` | ||
| - `index.component.html` | ||
| - `index.component.scss` | ||
| - `index.state.ts` | ||
| - `index.module.ts` | ||
|
|
||
| The Angular parent state handles route parameter extraction, project loading, | ||
| unit resolution, user role resolution, global view state configuration, and | ||
| explicit lifecycle cleanup. No runtime or console errors are observed when the | ||
| Angular implementation is active. | ||
|
|
||
| The legacy AngularJS implementation still exists in the repository and includes | ||
| the following files: | ||
|
|
||
| - `index.coffee` | ||
| - `index.tpl.html` (if present) | ||
|
|
||
| As long as these legacy files remain, both AngularJS and Angular implementations | ||
| may coexist. | ||
|
|
||
| ## Responsibilities of the Parent State | ||
|
|
||
| The `projects/index` parent state provides shared context for all project-related | ||
| child states. Its responsibilities include loading the project using the route | ||
| `projectId`, resolving the associated unit, resolving the current user’s role, | ||
| setting the global application view context to `PROJECT`, and exposing `project`, | ||
| `unit`, and `unitRole` to child states. | ||
|
|
||
| These responsibilities are fully implemented in the Angular version and mirror | ||
| the legacy behaviour. | ||
|
|
||
| ## AngularJS vs Angular Behaviour | ||
|
|
||
| The Angular implementation preserves all functional behaviour while introducing | ||
| explicit lifecycle management, explicit subscription cleanup, strong typing via | ||
| TypeScript, observable-based route parameter handling, and reduced reliance on | ||
| implicit scope inheritance. No functional differences have been identified. | ||
|
|
||
| ## Dependent Child States | ||
|
|
||
| The following child states depend on the `projects/index` parent state for shared | ||
| context: | ||
|
|
||
| - `projects/dashboard` | ||
| - `projects/tutorials` | ||
| - `projects/portfolio` | ||
| - `projects/groups` | ||
| - `projects/outcomes` | ||
|
|
||
| Any issues in the parent state will directly affect these routes. | ||
|
|
||
| ## Verification Required Before Cleanup | ||
|
|
||
| Before legacy files can be safely removed, the following must be verified: | ||
|
|
||
| - Project loading works for valid and invalid project IDs | ||
| - Unit and user role resolve correctly | ||
| - Global view state is set to `PROJECT` | ||
| - Navigation to all child states works correctly | ||
| - Page refresh and deep linking behave correctly | ||
| - No routing or console errors occur | ||
| - No memory leaks from subscriptions | ||
|
|
||
| ## Files in Scope | ||
|
|
||
| Angular files currently in use: | ||
|
|
||
| - `index.component.ts` | ||
| - `index.component.html` | ||
| - `index.component.scss` | ||
| - `index.state.ts` | ||
| - `index.module.ts` | ||
|
|
||
| Legacy files pending removal: | ||
|
|
||
| - `index.coffee` | ||
| - `index.tpl.html` | ||
|
|
||
| ## Conclusion | ||
|
|
||
| The Angular implementation of the `projects/index` parent state is functionally | ||
| complete. The migration is currently pending verification and cleanup. Once | ||
| verified, the legacy AngularJS files can be removed and the parent state can be | ||
| considered fully migrated. |
93 changes: 93 additions & 0 deletions
93
...ck/Documentation/Front End Migration/Migration/PROJECTS_INDEX_MIGRATION_PLAN.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,93 @@ | ||
| --- | ||
| title: Projects Index Migration Plan | ||
| description: Plan to finalise the projects/index parent state migration to Angular | ||
| --- | ||
|
|
||
| # Projects Index Migration Plan | ||
|
|
||
| Date: January 27, 2026 | ||
| Author: Jeffy Sam | ||
| Area: Projects module – index (parent) state | ||
|
|
||
| ## Objective | ||
|
|
||
| Finalise the migration of the `projects/index` parent state by validating the | ||
| existing Angular implementation and safely removing legacy AngularJS files. This | ||
| plan applies only to the parent state. Child state migrations are out of scope. | ||
|
|
||
| ## Current Status | ||
|
|
||
| Completed work includes creation of the Angular component, Angular UI-Router | ||
| state definition, module configuration, migration of legacy controller logic, | ||
| and implementation of explicit lifecycle and subscription management. | ||
|
|
||
| Outstanding work includes formal verification, removal of legacy AngularJS | ||
| files, confirmation of child state stability, and documentation updates. | ||
|
|
||
| ## Migration Steps | ||
|
|
||
| ### Step 1: Verification | ||
|
|
||
| Validate the Angular parent state by confirming that project loading works for | ||
| valid and invalid IDs, unit and user role resolution behave correctly, the | ||
| global view context is set to `PROJECT`, navigation to all child states works, | ||
| deep linking and page refresh behave correctly, and no console or routing errors | ||
| occur. | ||
|
|
||
| ### Step 2: Legacy Cleanup | ||
|
|
||
| After successful verification, remove the following legacy files: | ||
|
|
||
| - `src/app/projects/states/index/index.coffee` | ||
| - `src/app/projects/states/index/index.tpl.html` | ||
|
|
||
| Confirm that the application builds successfully, no missing references remain, | ||
| and no routing conflicts occur. | ||
|
|
||
| ### Step 3: Final Validation | ||
|
|
||
| Re-test all child routes, confirm there are no duplicate route registrations, | ||
| verify that subscriptions are cleaned up correctly, and confirm that behaviour | ||
| matches the legacy implementation. | ||
|
|
||
|
|
||
|
|
||
| ## Child State Verification Checklist | ||
|
|
||
| - [x] **dashboard** — Project: Yes, Unit: Yes, Role: Yes | ||
| - [x] **tutorials** — Project: Yes, Unit: Yes, Role: Yes | ||
| - [x] **portfolio** — Project: Yes, Unit: Yes, Role: Yes | ||
| - [x] **groups** — Project: Yes, Unit: Yes, Role: Yes | ||
| - [x] **outcomes** — Project: Yes, Unit: Yes, Role: Yes | ||
|
|
||
|
|
||
| ## Testing Checklist | ||
|
|
||
| Routing: | ||
| - Valid project loads | ||
| - Invalid project redirects safely | ||
| - Deep linking works | ||
| - Page refresh works | ||
|
|
||
| Context: | ||
| - `project` available to child states | ||
| - `unit` available to child states | ||
| - `unitRole` available to child states | ||
| - Global view context set correctly | ||
|
|
||
| Stability: | ||
| - No console errors | ||
| - No routing conflicts | ||
| - No memory leaks | ||
| - Cached behaviour preserved | ||
|
|
||
| ## Success Criteria | ||
|
|
||
| The migration is complete when the Angular parent state is the only active | ||
| implementation, legacy AngularJS files are removed, all child states load | ||
| correctly, and no routing or console errors are present. | ||
|
|
||
| ## Outcome | ||
|
|
||
| Completing this plan finalises the `projects/index` migration and provides a | ||
| stable foundation for future project child state migrations. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.