From b54c6920b20277ff3dc90cfd5bc1df8bd00cbb99 Mon Sep 17 00:00:00 2001 From: Thirus224849242 Date: Sun, 29 Mar 2026 12:44:51 +1100 Subject: [PATCH 1/5] feat: create initial files for migration of root-controller --- .../root-controller/root-controller.component.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/app/config/root-controller/root-controller.component.ts diff --git a/src/app/config/root-controller/root-controller.component.ts b/src/app/config/root-controller/root-controller.component.ts new file mode 100644 index 0000000000..3b29103621 --- /dev/null +++ b/src/app/config/root-controller/root-controller.component.ts @@ -0,0 +1,10 @@ +import {Component} from '@angular/core'; +import {GlobalStateService} from '../../projects/states/index/global-state.service'; + +@Component({ + selector: 'f-root-controller', + template: '', +}) +export class RootControllerComponent { + constructor(private globalStateService: GlobalStateService) {} +} From 9ecd07703879caaea66a126721759d971673079b Mon Sep 17 00:00:00 2001 From: Thirus224849242 Date: Sun, 29 Mar 2026 15:47:15 +1100 Subject: [PATCH 2/5] feat: downgrade root-controller component for angularjs --- src/app/doubtfire-angularjs.module.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/doubtfire-angularjs.module.ts b/src/app/doubtfire-angularjs.module.ts index ca57426fd2..64e4517ffe 100644 --- a/src/app/doubtfire-angularjs.module.ts +++ b/src/app/doubtfire-angularjs.module.ts @@ -53,7 +53,6 @@ import 'build/src/app/tasks/task-ilo-alignment/task-ilo-alignment-viewer/task-il import 'build/src/app/config/privacy-policy/privacy-policy.js'; import 'build/src/app/config/runtime/runtime.js'; import 'build/src/app/config/config.js'; -import 'build/src/app/config/root-controller/root-controller.js'; import 'build/src/app/config/routing/routing.js'; import 'build/src/app/config/vendor-dependencies/vendor-dependencies.js'; import 'build/src/app/config/analytics/analytics.js'; @@ -241,6 +240,7 @@ import {TaskPlannerComponent} from './projects/states/plan/task-planner/task-pla import {TaskPlannerCardComponent} from './projects/states/dashboard/directives/progress-dashboard/task-planner-card/task-planner-card.component'; import {TaskOverseerReportComponent} from './projects/states/dashboard/directives/task-dashboard/directives/task-overseer-report/task-overseer-report.component'; import {TutorNotesComponent} from './projects/states/tutor-notes/tutor-notes.component'; +import {RootControllerComponent} from './config/root-controller/root-controller.component'; export const DoubtfireAngularJSModule = angular .module('doubtfire', [ @@ -349,6 +349,10 @@ DoubtfireAngularJSModule.directive( 'taskCommentComposer', downgradeComponent({component: TaskCommentComposerComponent}), ); +DoubtfireAngularJSModule.directive( + 'appCtrl', + downgradeComponent({component: RootControllerComponent}), +); DoubtfireAngularJSModule.directive( 'objectSelect', downgradeComponent({component: ObjectSelectComponent}), From a38835dae27ce48365f5dd4c4aaae6fe657d535b Mon Sep 17 00:00:00 2001 From: Thirus224849242 Date: Sun, 29 Mar 2026 16:15:10 +1100 Subject: [PATCH 3/5] feat: downgrade root-controller component for angularjs --- src/app/doubtfire-angularjs.module.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/doubtfire-angularjs.module.ts b/src/app/doubtfire-angularjs.module.ts index 64e4517ffe..39498d7f79 100644 --- a/src/app/doubtfire-angularjs.module.ts +++ b/src/app/doubtfire-angularjs.module.ts @@ -260,7 +260,11 @@ export const DoubtfireAngularJSModule = angular $locationProvider.html5Mode(true); }, ]); - +DoubtfireAngularJSModule.controller('AppCtrl', [ + function () { + // Root controller - intentionally empty, replaced by Angular + }, +]); // Downgrade angular modules that we need... // factory -> service DoubtfireAngularJSModule.factory('AboutDoubtfireModal', downgradeInjectable(AboutDoubtfireModal)); From 201bb0f3ae791363c8e615e9b3a37cfb2940930d Mon Sep 17 00:00:00 2001 From: Thirus224849242 Date: Sun, 29 Mar 2026 16:19:48 +1100 Subject: [PATCH 4/5] feat: remove root-controller from angularjs config --- src/app/config/config.coffee | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/config/config.coffee b/src/app/config/config.coffee index b7699efbf5..b82f27c9b9 100644 --- a/src/app/config/config.coffee +++ b/src/app/config/config.coffee @@ -10,7 +10,6 @@ angular.module('doubtfire.config', [ 'doubtfire.config.routing' 'doubtfire.config.analytics' 'doubtfire.config.runtime' - 'doubtfire.config.root-controller' 'doubtfire.config.debug' 'doubtfire.config.privacy-policy' ]) From 00622c8034b0db721dfbf1966ac25e9c706cca5c Mon Sep 17 00:00:00 2001 From: Thirus224849242 Date: Sun, 29 Mar 2026 16:23:09 +1100 Subject: [PATCH 5/5] feat: remove old root-controller coffeescript file and clean up --- src/app/config/root-controller/root-controller.coffee | 8 -------- src/app/doubtfire-angular.module.ts | 2 ++ 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 src/app/config/root-controller/root-controller.coffee diff --git a/src/app/config/root-controller/root-controller.coffee b/src/app/config/root-controller/root-controller.coffee deleted file mode 100644 index 4a9854fc0e..0000000000 --- a/src/app/config/root-controller/root-controller.coffee +++ /dev/null @@ -1,8 +0,0 @@ -angular.module('doubtfire.config.root-controller', []) - -# -# The Doubtfire root application controller -# -.controller("AppCtrl", (GlobalStateService) -> - -) diff --git a/src/app/doubtfire-angular.module.ts b/src/app/doubtfire-angular.module.ts index 43ae68e4b8..efc72f2d3a 100644 --- a/src/app/doubtfire-angular.module.ts +++ b/src/app/doubtfire-angular.module.ts @@ -62,6 +62,7 @@ import { import {DoubtfireConstants} from 'src/app/config/constants/doubtfire-constants'; import {FTaskBadgeComponent} from 'src/app/common/task-badge/task-badge.component'; import {DoubtfireAngularJSModule} from 'src/app/doubtfire-angularjs.module'; +import {RootControllerComponent} from './config/root-controller/root-controller.component'; import {HttpAuthenticationInterceptor} from './common/services/http-authentication.interceptor'; import { visualisationsProvider, @@ -517,6 +518,7 @@ const GANTT_CHART_CONFIG = { FeedbackAppealModalComponent, ConfirmModerationModalComponent, TaskClaimComponent, + RootControllerComponent, ], providers: [ // Services we provide