From 7e03d9554b0a2e5dee54c9a9e62b7366e385c201 Mon Sep 17 00:00:00 2001 From: Aaron Detre Date: Wed, 26 Aug 2026 15:00:41 -0700 Subject: [PATCH 1/6] Show contact page link when unit doesn't load in authoring tool --- .../contact-form/contact-form.component.ts | 10 +++++ .../project-list/project-list.component.html | 6 ++- .../project-list/project-list.component.ts | 44 ++++++++++++++++--- .../dialog-with-close.component.html | 16 ++++--- 4 files changed, 62 insertions(+), 14 deletions(-) diff --git a/src/app/contact/contact-form/contact-form.component.ts b/src/app/contact/contact-form/contact-form.component.ts index 285f0064901..8f37320e0dc 100644 --- a/src/app/contact/contact-form/contact-form.component.ts +++ b/src/app/contact/contact-form/contact-form.component.ts @@ -94,6 +94,7 @@ export class ContactFormComponent implements OnInit { this.setDefaultPublishSummary(); this.setIsPublish(); this.setIssueTypeIfNecessary(); + this.setAuthoringFailedDefaultsIfNecessary(); } private obtainRunIdOrProjectIdIfNecessary(): void { @@ -202,6 +203,15 @@ export class ContactFormComponent implements OnInit { }); } + private setAuthoringFailedDefaultsIfNecessary(): void { + this.route.queryParams.subscribe((params) => { + if (params['authoringFailed']) { + this.setControlFieldValue('issueType', 'PROJECT_PROBLEMS'); + this.setControlFieldValue('summary', $localize`Unit failed to load in the Authoring Tool`); + } + }); + } + async submit(): Promise { this.isError = false; const recaptchaResponse = await this.getRecaptchaResponse(); diff --git a/src/assets/wise5/authoringTool/project-list/project-list.component.html b/src/assets/wise5/authoringTool/project-list/project-list.component.html index 77ba26ef8f8..3cc6b823475 100644 --- a/src/assets/wise5/authoringTool/project-list/project-list.component.html +++ b/src/assets/wise5/authoringTool/project-list/project-list.component.html @@ -11,7 +11,11 @@ - From a2bb73ba74463a03f4183a4deb8d815df51f3df2 Mon Sep 17 00:00:00 2001 From: Aaron Detre Date: Wed, 26 Aug 2026 15:14:50 -0700 Subject: [PATCH 2/6] Fixed bug where contact page link dialog would show after navigating to unit because interval was not cleared --- .../project-list/project-list.component.ts | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/assets/wise5/authoringTool/project-list/project-list.component.ts b/src/assets/wise5/authoringTool/project-list/project-list.component.ts index ff93c863432..a635c90900c 100644 --- a/src/assets/wise5/authoringTool/project-list/project-list.component.ts +++ b/src/assets/wise5/authoringTool/project-list/project-list.component.ts @@ -108,9 +108,14 @@ export class ProjectListComponent implements OnInit, OnDestroy { protected openProject(projectId: number, runId?: number): void { this.showMessageInModalDialog($localize`Loading Unit...`); - this.router.navigate([`/teacher/edit/unit/${projectId}`]); const contactPageLink = this.getContactPageLink(projectId, runId); - this.startTimer(contactPageLink); + const timer = this.startTimer(contactPageLink); + this.router.navigate([`/teacher/edit/unit/${projectId}`]).then((navigated) => { + if (navigated) { + clearInterval(timer); + this.dialog.closeAll(); + } + }); } private getContactPageLink(projectId: number, runId?: number): string { @@ -122,12 +127,11 @@ export class ProjectListComponent implements OnInit, OnDestroy { return link; } - private startTimer(link: string): void { + private startTimer(link: string): NodeJS.Timeout { let seconds = 10; - const timer = setInterval(() => { + return setInterval(() => { seconds--; - if (seconds <= 0) { - clearInterval(timer); + if (seconds === 0) { this.dialog.closeAll(); this.openContactPageLinkDialog(link); } From 6d1b559b3d9ae732e3f069393361b09495e5c356 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 26 Aug 2026 22:25:10 +0000 Subject: [PATCH 3/6] Updated messages --- src/messages.xlf | 68 +++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/src/messages.xlf b/src/messages.xlf index 2ec1ae93178..8523ed311bb 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -339,7 +339,7 @@ src/assets/wise5/directives/dialog-with-close/dialog-with-close.component.html - 11,13 + 13,15 src/assets/wise5/directives/dialog-with-open-in-new-window/dialog-with-open-in-new-window.component.html @@ -1739,7 +1739,7 @@ src/assets/wise5/authoringTool/project-list/project-list.component.html - 46,48 + 50,52 @@ -2509,55 +2509,55 @@ Trouble Signing In src/app/contact/contact-form/contact-form.component.ts - 162 + 163 src/app/contact/contact-form/contact-form.component.ts - 170 + 171 Need Help Using WISE src/app/contact/contact-form/contact-form.component.ts - 163 + 164 src/app/contact/contact-form/contact-form.component.ts - 171 + 172 Problems with a WISE Unit src/app/contact/contact-form/contact-form.component.ts - 164 + 165 src/app/contact/contact-form/contact-form.component.ts - 172 + 173 Feedback to WISE src/app/contact/contact-form/contact-form.component.ts - 165 + 166 src/app/contact/contact-form/contact-form.component.ts - 176 + 177 Other src/app/contact/contact-form/contact-form.component.ts - 166 + 167 src/app/contact/contact-form/contact-form.component.ts - 177 + 178 src/app/domain/profile.constants.ts @@ -2568,7 +2568,7 @@ Student Management src/app/contact/contact-form/contact-form.component.ts - 173 + 174 src/app/help/faq/teacher-faq/teacher-faq.component.html @@ -2583,21 +2583,28 @@ Need Help with Authoring src/app/contact/contact-form/contact-form.component.ts - 174 + 175 Publish Unit src/app/contact/contact-form/contact-form.component.ts - 175 + 176 Publish my unit to the WISE Community Built library src/app/contact/contact-form/contact-form.component.ts - 186 + 187 + + + + Unit failed to load in the Authoring Tool + + src/app/contact/contact-form/contact-form.component.ts + 210 @@ -6096,7 +6103,7 @@ src/assets/wise5/authoringTool/project-list/project-list.component.html - 27,28 + 31,32 src/assets/wise5/themes/default/notebook/edit-notebook-item-dialog/edit-notebook-item-dialog.component.html @@ -6402,7 +6409,7 @@ src/assets/wise5/authoringTool/project-list/project-list.component.html - 36,37 + 40,41 src/assets/wise5/classroomMonitor/dataExport/export-item/export-item.component.html @@ -9143,7 +9150,7 @@ src/assets/wise5/authoringTool/project-list/project-list.component.html - 19,20 + 23,24 @@ -13910,42 +13917,42 @@ The branches will be removed but the steps will remain in the unit. You have no units src/assets/wise5/authoringTool/project-list/project-list.component.html - 48,51 + 52,55 Shared Units src/assets/wise5/authoringTool/project-list/project-list.component.html - 60,62 + 64,66 You have no shared units src/assets/wise5/authoringTool/project-list/project-list.component.html - 62,65 + 66,69 Copying Unit... src/assets/wise5/authoringTool/project-list/project-list.component.ts - 62 + 63 There was an error copying this unit. Please contact WISE staff. src/assets/wise5/authoringTool/project-list/project-list.component.ts - 69 + 70 (Run ID: ) src/assets/wise5/authoringTool/project-list/project-list.component.ts - 84 + 85 @@ -13954,14 +13961,21 @@ The branches will be removed but the steps will remain in the unit. src/assets/wise5/authoringTool/project-list/project-list.component.ts - 86 + 87 Loading Unit... src/assets/wise5/authoringTool/project-list/project-list.component.ts - 109 + 110 + + + + Having trouble loading unit? Contact WISE staff. + + src/assets/wise5/authoringTool/project-list/project-list.component.ts + 144 From 4b5342b8c6d530a9fd897a7051a0d3f273ac8ef9 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 28 Aug 2026 17:26:17 -0700 Subject: [PATCH 4/6] Improve control flow --- .../dialog-with-close/dialog-with-close.component.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/assets/wise5/directives/dialog-with-close/dialog-with-close.component.html b/src/assets/wise5/directives/dialog-with-close/dialog-with-close.component.html index d1c88803b53..2b0d6a2aa9f 100644 --- a/src/assets/wise5/directives/dialog-with-close/dialog-with-close.component.html +++ b/src/assets/wise5/directives/dialog-with-close/dialog-with-close.component.html @@ -2,8 +2,7 @@

@if (dialogData.content) { @if (dialogData.scroll) {
- } - @if (!dialogData.scroll) { + } @else {
From 711173035d5bc94798fb9b64f657ca8ebec2afc0 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 28 Aug 2026 17:27:12 -0700 Subject: [PATCH 5/6] Split message into title and content, make content a bit more descriptive. Minor code improvement. --- .../authoringTool/project-list/project-list.component.ts | 6 +++--- src/messages.xlf | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/assets/wise5/authoringTool/project-list/project-list.component.ts b/src/assets/wise5/authoringTool/project-list/project-list.component.ts index a635c90900c..b5fec0f06c8 100644 --- a/src/assets/wise5/authoringTool/project-list/project-list.component.ts +++ b/src/assets/wise5/authoringTool/project-list/project-list.component.ts @@ -119,8 +119,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { } private getContactPageLink(projectId: number, runId?: number): string { - let link = this.configService.getWISEBaseURL(); - link += `/contact?authoringFailed=true&projectId=${projectId}`; + let link = `${this.configService.getWISEBaseURL()}/contact?authoringFailed=true&projectId=${projectId}`; if (runId) { link += `&runId=${runId}`; } @@ -141,7 +140,8 @@ export class ProjectListComponent implements OnInit, OnDestroy { private openContactPageLinkDialog(link: string): void { this.dialog.open(DialogWithCloseComponent, { data: { - title: `${$localize`Having trouble loading unit? Contact WISE staff.`}` + title: $localize`Trouble Loading Unit`, + content: `

${$localize`The unit is taking longer than expected to load.`}

${$localize`Click here to contact WISE staff.`}

` } }); } diff --git a/src/messages.xlf b/src/messages.xlf index 8523ed311bb..ba54038889e 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -339,7 +339,7 @@ src/assets/wise5/directives/dialog-with-close/dialog-with-close.component.html - 13,15 + 12,14 src/assets/wise5/directives/dialog-with-open-in-new-window/dialog-with-open-in-new-window.component.html @@ -13971,11 +13971,11 @@ The branches will be removed but the steps will remain in the unit. 110
- - Having trouble loading unit? Contact WISE staff. + + Having trouble loading the unit? Click here to contact WISE staff. src/assets/wise5/authoringTool/project-list/project-list.component.ts - 144 + 143 From 2b320e2440d1d0baf43444057e947c855a8e6232 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 28 Aug 2026 17:44:11 -0700 Subject: [PATCH 6/6] Refactor openProject method to improve loading timer logic readability --- .../project-list/project-list.component.ts | 28 +++++++++---------- src/messages.xlf | 20 +++++++++++-- 2 files changed, 31 insertions(+), 17 deletions(-) diff --git a/src/assets/wise5/authoringTool/project-list/project-list.component.ts b/src/assets/wise5/authoringTool/project-list/project-list.component.ts index b5fec0f06c8..2d67059beeb 100644 --- a/src/assets/wise5/authoringTool/project-list/project-list.component.ts +++ b/src/assets/wise5/authoringTool/project-list/project-list.component.ts @@ -108,8 +108,7 @@ export class ProjectListComponent implements OnInit, OnDestroy { protected openProject(projectId: number, runId?: number): void { this.showMessageInModalDialog($localize`Loading Unit...`); - const contactPageLink = this.getContactPageLink(projectId, runId); - const timer = this.startTimer(contactPageLink); + const timer = this.startLoadUnitTimer(projectId, runId); this.router.navigate([`/teacher/edit/unit/${projectId}`]).then((navigated) => { if (navigated) { clearInterval(timer); @@ -118,34 +117,35 @@ export class ProjectListComponent implements OnInit, OnDestroy { }); } - private getContactPageLink(projectId: number, runId?: number): string { - let link = `${this.configService.getWISEBaseURL()}/contact?authoringFailed=true&projectId=${projectId}`; - if (runId) { - link += `&runId=${runId}`; - } - return link; - } - - private startTimer(link: string): NodeJS.Timeout { + private startLoadUnitTimer(projectId: number, runId?: number): NodeJS.Timeout { let seconds = 10; return setInterval(() => { seconds--; if (seconds === 0) { this.dialog.closeAll(); - this.openContactPageLinkDialog(link); + this.openContactPageDialog(projectId, runId); } }, 1000); } - private openContactPageLinkDialog(link: string): void { + private openContactPageDialog(projectId: number, runId?: number): void { this.dialog.open(DialogWithCloseComponent, { data: { title: $localize`Trouble Loading Unit`, - content: `

${$localize`The unit is taking longer than expected to load.`}

${$localize`Click here to contact WISE staff.`}

` + content: `

${$localize`The unit is taking longer than expected to load.`}

+

${$localize`Click here to contact WISE staff.`}

` } }); } + private getContactPageLink(projectId: number, runId?: number): string { + let link = `${this.configService.getWISEBaseURL()}/contact?authoringFailed=true&projectId=${projectId}`; + if (runId) { + link += `&runId=${runId}`; + } + return link; + } + protected previewProject(projectId: number): void { window.open(`${this.configService.getWISEBaseURL()}/preview/unit/${projectId}`); } diff --git a/src/messages.xlf b/src/messages.xlf index ba54038889e..694047e0c01 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -13971,11 +13971,25 @@ The branches will be removed but the steps will remain in the unit. 110
- - Having trouble loading the unit? Click here to contact WISE staff. + + Trouble Loading Unit src/assets/wise5/authoringTool/project-list/project-list.component.ts - 143 + 134 + + + + The unit is taking longer than expected to load. + + src/assets/wise5/authoringTool/project-list/project-list.component.ts + 135 + + + + Click here to contact WISE staff. + + src/assets/wise5/authoringTool/project-list/project-list.component.ts + 136