From a01a7569602bd54bc08d92f97b92e1a20ae1ff66 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Tue, 29 Apr 2025 14:03:07 -0700 Subject: [PATCH 01/19] feat(Site): Remove unit library from teacher home - Redirect /teacher/home/schedule to /teacher/home - Redirect /teacher/home/library/* to /curriculum - Always show site header links when logged in as teacher --- src/app/curriculum/curriculum.component.html | 2 +- .../header-links/header-links.component.html | 16 +- .../header-links.component.spec.ts | 12 +- .../header-links/header-links.component.ts | 8 +- .../community-library.component.html | 34 --- .../community-library.component.scss | 0 .../community-library.component.spec.ts | 43 --- .../community-library.component.ts | 58 ---- src/app/modules/library/library.module.ts | 15 +- .../library/library/library.component.ts | 9 - .../official-library.component.html | 76 ++--- .../official-library.component.ts | 20 -- .../public-library.component.ts | 4 - .../community-library-details.html | 0 .../official-library-details.html | 0 .../public-unit-type-selector.component.ts | 4 +- .../teacher-project-library.component.html | 22 -- .../teacher-project-library.component.scss | 44 --- .../teacher-project-library.component.spec.ts | 50 ---- .../teacher-project-library.component.ts | 59 ---- .../edit-run-warning-dialog.component.html | 4 +- .../teacher-home/teacher-home.component.html | 41 ++- .../teacher-home/teacher-home.component.scss | 20 +- src/app/teacher/teacher-routing.module.ts | 19 +- .../teacher-run-list.component.html | 7 +- .../teacher-run-list.component.ts | 8 +- src/messages.xlf | 271 +++++++----------- 27 files changed, 186 insertions(+), 660 deletions(-) delete mode 100644 src/app/modules/library/community-library/community-library.component.html delete mode 100644 src/app/modules/library/community-library/community-library.component.scss delete mode 100644 src/app/modules/library/community-library/community-library.component.spec.ts delete mode 100644 src/app/modules/library/community-library/community-library.component.ts rename src/app/modules/library/{community-library => public-unit-type-selector}/community-library-details.html (100%) rename src/app/modules/library/{official-library => public-unit-type-selector}/official-library-details.html (100%) delete mode 100644 src/app/modules/library/teacher-project-library/teacher-project-library.component.html delete mode 100644 src/app/modules/library/teacher-project-library/teacher-project-library.component.scss delete mode 100644 src/app/modules/library/teacher-project-library/teacher-project-library.component.spec.ts delete mode 100644 src/app/modules/library/teacher-project-library/teacher-project-library.component.ts diff --git a/src/app/curriculum/curriculum.component.html b/src/app/curriculum/curriculum.component.html index 5be0aa9fd2e..9e04e189434 100644 --- a/src/app/curriculum/curriculum.component.html +++ b/src/app/curriculum/curriculum.component.html @@ -8,7 +8,7 @@

@if (showMyUnits) { - - Welcome {{ user.firstName }}! - Welcome {{ user.firstName }}! - - + diff --git a/src/app/modules/header/header-links/header-links.component.spec.ts b/src/app/modules/header/header-links/header-links.component.spec.ts index 0f3b01e9333..d8aa3be6406 100644 --- a/src/app/modules/header/header-links/header-links.component.spec.ts +++ b/src/app/modules/header/header-links/header-links.component.spec.ts @@ -14,14 +14,6 @@ describe('HeaderLinksComponent', () => { }); fixture = TestBed.createComponent(HeaderLinksComponent); component = fixture.componentInstance; - const user: User = new User(); - user.id = 1; - user.firstName = 'Amanda'; - user.lastName = 'Panda'; - user.roles = ['student']; - user.username = 'AmandaP0101'; - component.user = user; - component.location = 'student'; fixture.detectChanges(); }); @@ -29,8 +21,8 @@ describe('HeaderLinksComponent', () => { expect(component).toBeTruthy(); }); - it('should show user welcome message', () => { + it('should show header sign in if no user is logged in', () => { const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('.header__links').textContent).toContain('Welcome Amanda!'); + expect(compiled.querySelectorAll('app-header-signin').length).toBe(1); }); }); diff --git a/src/app/modules/header/header-links/header-links.component.ts b/src/app/modules/header/header-links/header-links.component.ts index 00099c490a6..46ac26ab644 100644 --- a/src/app/modules/header/header-links/header-links.component.ts +++ b/src/app/modules/header/header-links/header-links.component.ts @@ -7,10 +7,10 @@ import { FlexLayoutModule } from '@angular/flex-layout'; import { RouterModule } from '@angular/router'; @Component({ - selector: 'app-header-links', - imports: [CommonModule, FlexLayoutModule, HeaderSigninComponent, MatButtonModule, RouterModule], - templateUrl: './header-links.component.html', - styleUrl: './header-links.component.scss' + selector: 'app-header-links', + imports: [CommonModule, FlexLayoutModule, HeaderSigninComponent, MatButtonModule, RouterModule], + templateUrl: './header-links.component.html', + styleUrl: './header-links.component.scss' }) export class HeaderLinksComponent { @Input() location: string; diff --git a/src/app/modules/library/community-library/community-library.component.html b/src/app/modules/library/community-library/community-library.component.html deleted file mode 100644 index 5ebdf98e82e..00000000000 --- a/src/app/modules/library/community-library/community-library.component.html +++ /dev/null @@ -1,34 +0,0 @@ -
- - -
- - - -
- No community designed units found. -
-
- - - -
diff --git a/src/app/modules/library/community-library/community-library.component.scss b/src/app/modules/library/community-library/community-library.component.scss deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/src/app/modules/library/community-library/community-library.component.spec.ts b/src/app/modules/library/community-library/community-library.component.spec.ts deleted file mode 100644 index e9c3da61dce..00000000000 --- a/src/app/modules/library/community-library/community-library.component.spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { CommunityLibraryComponent } from './community-library.component'; -import { fakeAsyncResponse } from '../../../student/student-run-list/student-run-list.component.spec'; -import { LibraryService } from '../../../services/library.service'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { MatDialogModule } from '@angular/material/dialog'; -import { BehaviorSubject, of } from 'rxjs'; -import { OverlayModule } from '@angular/cdk/overlay'; -import { ProjectFilterValues } from '../../../domain/projectFilterValues'; - -export class MockLibraryService { - implementationModelOptions = []; - communityLibraryProjectsSource$ = fakeAsyncResponse([]); - filterValuesUpdated$ = of(); - numberOfPublicProjectsVisible = new BehaviorSubject(0); - getFilterValues() { - return new ProjectFilterValues(); - } -} - -describe('CommunityLibraryComponent', () => { - let component: CommunityLibraryComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - imports: [OverlayModule, MatDialogModule], - declarations: [CommunityLibraryComponent], - providers: [{ provide: LibraryService, useClass: MockLibraryService }], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(CommunityLibraryComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/modules/library/community-library/community-library.component.ts b/src/app/modules/library/community-library/community-library.component.ts deleted file mode 100644 index ab2c68e5ba9..00000000000 --- a/src/app/modules/library/community-library/community-library.component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { BehaviorSubject } from 'rxjs'; -import { Component, Inject } from '@angular/core'; -import { LibraryService } from '../../../services/library.service'; -import { LibraryProject } from '../libraryProject'; -import { LibraryComponent } from '../library/library.component'; -import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'; - -@Component({ - selector: 'app-community-library', - templateUrl: './community-library.component.html', - styleUrls: ['./community-library.component.scss'], - standalone: false -}) -export class CommunityLibraryComponent extends LibraryComponent { - projects: LibraryProject[] = []; - filteredProjects: LibraryProject[] = []; - - constructor( - protected dialog: MatDialog, - protected libraryService: LibraryService - ) { - super(dialog, libraryService); - } - - ngOnInit() { - super.ngOnInit(); - this.subscriptions.add( - this.libraryService.communityLibraryProjectsSource$.subscribe((communityProjects) => { - this.projects = communityProjects; - this.filterUpdated(); - }) - ); - } - - protected getNumVisiblePersonalOrPublicProjects(): BehaviorSubject { - return this.libraryService.numberOfPublicProjectsVisible; - } - - protected getDetailsComponent(): any { - return CommunityLibraryDetailsComponent; - } -} - -@Component({ - selector: 'community-library-details', - templateUrl: 'community-library-details.html', - standalone: false -}) -export class CommunityLibraryDetailsComponent { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} - - close(): void { - this.dialogRef.close(); - } -} diff --git a/src/app/modules/library/library.module.ts b/src/app/modules/library/library.module.ts index 3ac53e232fc..53eac36c7fa 100644 --- a/src/app/modules/library/library.module.ts +++ b/src/app/modules/library/library.module.ts @@ -29,15 +29,7 @@ import { MatTooltipModule } from '@angular/material/tooltip'; import { TimelineModule } from '../timeline/timeline.module'; import { LibraryFiltersComponent } from './library-filters/library-filters.component'; import { HomePageProjectLibraryComponent } from './home-page-project-library/home-page-project-library.component'; -import { TeacherProjectLibraryComponent } from './teacher-project-library/teacher-project-library.component'; -import { - OfficialLibraryComponent, - OfficialLibraryDetailsComponent -} from './official-library/official-library.component'; -import { - CommunityLibraryComponent, - CommunityLibraryDetailsComponent -} from './community-library/community-library.component'; +import { OfficialLibraryComponent } from './official-library/official-library.component'; import { PersonalLibraryComponent, PersonalLibraryDetailsComponent @@ -107,11 +99,7 @@ const materialModules = [ declarations: [ LibraryGroupThumbsComponent, HomePageProjectLibraryComponent, - TeacherProjectLibraryComponent, OfficialLibraryComponent, - OfficialLibraryDetailsComponent, - CommunityLibraryComponent, - CommunityLibraryDetailsComponent, PersonalLibraryDetailsComponent, ShareProjectDialogComponent, CopyProjectDialogComponent @@ -121,7 +109,6 @@ const materialModules = [ HomePageProjectLibraryComponent, PersonalLibraryComponent, ReactiveFormsModule, - TeacherProjectLibraryComponent, UnitTagsComponent, materialModules ], diff --git a/src/app/modules/library/library/library.component.ts b/src/app/modules/library/library/library.component.ts index 1ef4a1ad608..ebf6962f4ee 100644 --- a/src/app/modules/library/library/library.component.ts +++ b/src/app/modules/library/library/library.component.ts @@ -88,13 +88,4 @@ export abstract class LibraryComponent implements OnInit { protected countVisibleProjects(projects: LibraryProject[]): number { return projects.filter((project) => project.visible).length; } - - protected showInfo(event: Event): void { - event.preventDefault(); - this.dialog.open(this.getDetailsComponent(), { - panelClass: 'dialog-sm' - }); - } - - protected abstract getDetailsComponent(): any; } diff --git a/src/app/modules/library/official-library/official-library.component.html b/src/app/modules/library/official-library/official-library.component.html index 8c3d98f75fc..c26ca931b36 100644 --- a/src/app/modules/library/official-library/official-library.component.html +++ b/src/app/modules/library/official-library/official-library.component.html @@ -1,50 +1,30 @@ - - - - - -
-
{{ group.name }}
-
- {{ countVisibleProjects(group.children) }} unit(s) -
+ + + + +
+
{{ group.name }}
+
+ {{ countVisibleProjects(group.children) }} unit(s)
- - - -
- -
- -
-
- - - - - - - -
- -
+ + + +
+ +
+ +
+
+
+ + + diff --git a/src/app/modules/library/official-library/official-library.component.ts b/src/app/modules/library/official-library/official-library.component.ts index 99ddaae11da..da908298400 100644 --- a/src/app/modules/library/official-library/official-library.component.ts +++ b/src/app/modules/library/official-library/official-library.component.ts @@ -45,24 +45,4 @@ export class OfficialLibraryComponent extends LibraryComponent { protected getNumVisiblePersonalOrPublicProjects(): BehaviorSubject { return this.libraryService.numberOfPublicProjectsVisible; } - - protected getDetailsComponent(): any { - return OfficialLibraryDetailsComponent; - } -} - -@Component({ - selector: 'official-library-details', - templateUrl: 'official-library-details.html', - standalone: false -}) -export class OfficialLibraryDetailsComponent { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} - - close(): void { - this.dialogRef.close(); - } } diff --git a/src/app/modules/library/public-library/public-library.component.ts b/src/app/modules/library/public-library/public-library.component.ts index a1e537048ca..9bf677ec102 100644 --- a/src/app/modules/library/public-library/public-library.component.ts +++ b/src/app/modules/library/public-library/public-library.component.ts @@ -72,8 +72,4 @@ export class PublicLibraryComponent extends LibraryComponent { protected getNumVisiblePersonalOrPublicProjects(): BehaviorSubject { return this.libraryService.numberOfPublicProjectsVisible; } - - protected getDetailsComponent(): any { - return null; - } } diff --git a/src/app/modules/library/community-library/community-library-details.html b/src/app/modules/library/public-unit-type-selector/community-library-details.html similarity index 100% rename from src/app/modules/library/community-library/community-library-details.html rename to src/app/modules/library/public-unit-type-selector/community-library-details.html diff --git a/src/app/modules/library/official-library/official-library-details.html b/src/app/modules/library/public-unit-type-selector/official-library-details.html similarity index 100% rename from src/app/modules/library/official-library/official-library-details.html rename to src/app/modules/library/public-unit-type-selector/official-library-details.html diff --git a/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts b/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts index 67771cd474b..6e940f778dc 100644 --- a/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts +++ b/src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.ts @@ -71,12 +71,12 @@ abstract class DetailsComponent { @Component({ imports: [MatButtonModule, MatDialogTitle, MatDialogContent, MatDialogActions, RouterLink], - templateUrl: '../official-library/official-library-details.html' + templateUrl: './official-library-details.html' }) class OfficialDetailsComponent extends DetailsComponent {} @Component({ imports: [MatButtonModule, MatDialogTitle, MatDialogContent, MatDialogActions, RouterLink], - templateUrl: '../community-library/community-library-details.html' + templateUrl: './community-library-details.html' }) class CommunityDetailsComponent extends DetailsComponent {} diff --git a/src/app/modules/library/teacher-project-library/teacher-project-library.component.html b/src/app/modules/library/teacher-project-library/teacher-project-library.component.html deleted file mode 100644 index 7a9b24fdf64..00000000000 --- a/src/app/modules/library/teacher-project-library/teacher-project-library.component.html +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/src/app/modules/library/teacher-project-library/teacher-project-library.component.scss b/src/app/modules/library/teacher-project-library/teacher-project-library.component.scss deleted file mode 100644 index 9f68504ab1a..00000000000 --- a/src/app/modules/library/teacher-project-library/teacher-project-library.component.scss +++ /dev/null @@ -1,44 +0,0 @@ -@use '@angular/material' as mat; -@import - 'style/abstracts/variables', - 'style/abstracts/mixins', - 'style/abstracts/functions'; - -.library-teacher { - margin-top: 24px; - - .mat-mdc-tab-link { - flex-grow: 1; - } -} - -.filters { - padding: 16px; - border-bottom-left-radius: 0; - border-bottom-right-radius: 0; -} - -.library-teacher__header { - h3 { - font-weight: 500; - } -} - -.library-teacher__paginate { - padding-bottom: 0; - - @media (min-width: breakpoint('sm.min')) { - padding-top: 0; - } -} - -.library-teacher__official { - @media (min-width: breakpoint('sm.min')) { - padding-top: 20px; - } -} - -.mat-mdc-tab-links { - background-color: white; - margin: 0 1px; -} diff --git a/src/app/modules/library/teacher-project-library/teacher-project-library.component.spec.ts b/src/app/modules/library/teacher-project-library/teacher-project-library.component.spec.ts deleted file mode 100644 index bc5fb680af1..00000000000 --- a/src/app/modules/library/teacher-project-library/teacher-project-library.component.spec.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { TeacherProjectLibraryComponent } from './teacher-project-library.component'; -import { MatMenuModule } from '@angular/material/menu'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { RouterTestingModule } from '@angular/router/testing'; -import { LibraryService } from '../../../services/library.service'; -import { defer } from 'rxjs'; -import { ProjectFilterValues } from '../../../domain/projectFilterValues'; - -export function fakeAsyncResponse(data: T) { - return defer(() => Promise.resolve(data)); -} - -export class MockLibraryService { - numberOfPublicProjectsVisible$ = fakeAsyncResponse(0); - numberOfPersonalProjectsVisible$ = fakeAsyncResponse(0); - newProjectSource$ = fakeAsyncResponse(0); - getOfficialLibraryProjects() {} - getCommunityLibraryProjects() {} - getPersonalLibraryProjects() {} - getSharedLibraryProjects() {} - getFilterValues() { - return new ProjectFilterValues(); - } - initFilterValues() {} -} - -describe('TeacherProjectLibraryComponent', () => { - let component: TeacherProjectLibraryComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - imports: [MatMenuModule, RouterTestingModule], - declarations: [TeacherProjectLibraryComponent], - providers: [{ provide: LibraryService, useClass: MockLibraryService }], - schemas: [NO_ERRORS_SCHEMA] - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(TeacherProjectLibraryComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/src/app/modules/library/teacher-project-library/teacher-project-library.component.ts b/src/app/modules/library/teacher-project-library/teacher-project-library.component.ts deleted file mode 100644 index 5f993ba3978..00000000000 --- a/src/app/modules/library/teacher-project-library/teacher-project-library.component.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Component, ViewEncapsulation, OnInit } from '@angular/core'; -import { LibraryProject } from '../libraryProject'; -import { LibraryService } from '../../../services/library.service'; -import { Router } from '@angular/router'; - -@Component({ - selector: 'app-teacher-project-library', - templateUrl: './teacher-project-library.component.html', - styleUrls: ['./teacher-project-library.component.scss', '../library/library.component.scss'], - encapsulation: ViewEncapsulation.None, - standalone: false -}) -export class TeacherProjectLibraryComponent implements OnInit { - projects: LibraryProject[] = []; - numberOfPublicProjectsVisible: number = 0; - numberOfPersonalProjectsVisible: number = 0; - route: String; - tabs: any[] = [ - { path: 'tested', label: $localize`WISE Tested`, numVisible: 0 }, - { path: 'community', label: $localize`Community Built`, numVisible: 0 }, - { path: 'personal', label: $localize`My Units`, numVisible: 0 } - ]; - - constructor( - private libraryService: LibraryService, - private router: Router - ) {} - - ngOnInit() { - this.libraryService.initFilterValues(); - this.libraryService.numberOfPublicProjectsVisible$.subscribe((num) => { - this.tabs[0].numVisible = num; - }); - this.libraryService.numberOfPersonalProjectsVisible$.subscribe((num) => { - this.tabs[2].numVisible = num; - }); - this.libraryService.getCommunityLibraryProjects(); - this.libraryService.getOfficialLibraryProjects(); - this.libraryService.getPersonalLibraryProjects(); - this.libraryService.getSharedLibraryProjects(); - this.libraryService.newProjectSource$.subscribe((project) => { - if (project) { - document.querySelector('.library').scrollIntoView(); - } - }); - } - - isOfficialRoute(): boolean { - return this.router.url === '/teacher/home/library/tested'; - } - - isCommunityRoute(): boolean { - return this.router.url === '/teacher/home/library/community'; - } - - isPersonalRoute(): boolean { - return this.router.url === '/teacher/home/library/personal'; - } -} diff --git a/src/app/teacher/edit-run-warning-dialog/edit-run-warning-dialog.component.html b/src/app/teacher/edit-run-warning-dialog/edit-run-warning-dialog.component.html index 848a7e938db..4512a0bd2f4 100644 --- a/src/app/teacher/edit-run-warning-dialog/edit-run-warning-dialog.component.html +++ b/src/app/teacher/edit-run-warning-dialog/edit-run-warning-dialog.component.html @@ -1,6 +1,6 @@ -

+

Edit Classroom Unit - + warning

diff --git a/src/app/teacher/teacher-home/teacher-home.component.html b/src/app/teacher/teacher-home/teacher-home.component.html index 40beef4b226..2b428327bab 100644 --- a/src/app/teacher/teacher-home/teacher-home.component.html +++ b/src/app/teacher/teacher-home/teacher-home.component.html @@ -1,34 +1,27 @@ -
-

- homeTeacher Home -

+
+
+
+

+ homeTeacher Home +

+
Welcome {{ user.firstName }}!
+
+ +
- - - - +
diff --git a/src/app/teacher/teacher-home/teacher-home.component.scss b/src/app/teacher/teacher-home/teacher-home.component.scss index f3cce168112..411be85ad31 100644 --- a/src/app/teacher/teacher-home/teacher-home.component.scss +++ b/src/app/teacher/teacher-home/teacher-home.component.scss @@ -7,15 +7,19 @@ margin-top: 24px; } +.mat-headline-4, .mat-subtitle-1 { + margin-bottom: 0; +} + discourse-recent-activity { - margin-bottom: 16px; - margin-top: 8px; + // margin-bottom: 16px; + // margin-top: 8px; - @media (min-width: breakpoint('sm.min')) { - margin-top: -8px; - } + // @media (min-width: breakpoint('sm.min')) { + // margin-top: -8px; + // } - @media (min-width: breakpoint('md.min')) { - margin-top: -36px; - } + // @media (min-width: breakpoint('md.min')) { + // margin-top: -36px; + // } } diff --git a/src/app/teacher/teacher-routing.module.ts b/src/app/teacher/teacher-routing.module.ts index 33c66e8b89a..d07b5236bec 100644 --- a/src/app/teacher/teacher-routing.module.ts +++ b/src/app/teacher/teacher-routing.module.ts @@ -5,11 +5,6 @@ import { AuthGuard } from './auth.guard'; import { TeacherComponent } from './teacher.component'; import { TeacherHomeComponent } from './teacher-home/teacher-home.component'; import { EditComponent } from './account/edit/edit.component'; -import { TeacherProjectLibraryComponent } from '../modules/library/teacher-project-library/teacher-project-library.component'; -import { TeacherRunListComponent } from './teacher-run-list/teacher-run-list.component'; -import { OfficialLibraryComponent } from '../modules/library/official-library/official-library.component'; -import { CommunityLibraryComponent } from '../modules/library/community-library/community-library.component'; -import { PersonalLibraryComponent } from '../modules/library/personal-library/personal-library.component'; const teacherRoutes: Routes = [ { @@ -24,19 +19,11 @@ const teacherRoutes: Routes = [ path: 'home', component: TeacherHomeComponent, children: [ - { path: '', redirectTo: 'schedule', pathMatch: 'full' }, - { path: 'schedule', component: TeacherRunListComponent }, { path: 'library', - component: TeacherProjectLibraryComponent, - children: [ - { path: '', redirectTo: 'tested', pathMatch: 'full' }, - { path: 'tested', component: OfficialLibraryComponent }, - { path: 'community', component: CommunityLibraryComponent }, - { path: 'personal', component: PersonalLibraryComponent }, - { path: '**', redirectTo: 'tested' } - ] - } + redirectTo: '/curriculum' + }, + { path: 'schedule', redirectTo: '' } ] }, { diff --git a/src/app/teacher/teacher-run-list/teacher-run-list.component.html b/src/app/teacher/teacher-run-list/teacher-run-list.component.html index 7603d64b641..a1dbb42f933 100644 --- a/src/app/teacher/teacher-run-list/teacher-run-list.component.html +++ b/src/app/teacher/teacher-run-list/teacher-run-list.component.html @@ -1,15 +1,16 @@
+

Class Schedule

+ -
View diff --git a/src/app/teacher/teacher-run-list/teacher-run-list.component.ts b/src/app/teacher/teacher-run-list/teacher-run-list.component.ts index 90ecd23087a..86d2a1a1e82 100644 --- a/src/app/teacher/teacher-run-list/teacher-run-list.component.ts +++ b/src/app/teacher/teacher-run-list/teacher-run-list.component.ts @@ -14,10 +14,10 @@ import { Project } from '../../domain/project'; import { Tag } from '../../domain/tag'; @Component({ - selector: 'app-teacher-run-list', - styleUrl: './teacher-run-list.component.scss', - templateUrl: './teacher-run-list.component.html', - standalone: false + selector: 'app-teacher-run-list', + styleUrl: './teacher-run-list.component.scss', + templateUrl: './teacher-run-list.component.html', + standalone: false }) export class TeacherRunListComponent implements OnInit { private MAX_RECENT_RUNS = 10; diff --git a/src/messages.xlf b/src/messages.xlf index 0e5f86826e4..9c0fe571220 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -14,7 +14,7 @@ src/app/modules/header/header-links/header-links.component.html - 21,26 + 19,24 src/app/modules/mobile-menu/mobile-menu.component.html @@ -281,29 +281,21 @@ src/app/classroom-monitor/show-node-info-dialog/show-node-info-dialog.component.html 7,9 - - src/app/modules/library/community-library/community-library-details.html - 17,19 - - - src/app/modules/library/community-library/community-library-details.html - 17,19 - src/app/modules/library/library-project-details/library-project-details.component.html 198,202 - src/app/modules/library/official-library/official-library-details.html - 19,21 + src/app/modules/library/personal-library/personal-library-details.html + 15,17 - src/app/modules/library/official-library/official-library-details.html - 19,21 + src/app/modules/library/public-unit-type-selector/community-library-details.html + 17,19 - src/app/modules/library/personal-library/personal-library-details.html - 15,17 + src/app/modules/library/public-unit-type-selector/official-library-details.html + 19,21 src/app/teacher/manage-tags-dialog/manage-tags-dialog.component.html @@ -1699,10 +1691,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/app/modules/library/personal-library/personal-library-details.html 1,5 - - src/app/modules/library/teacher-project-library/teacher-project-library.component.ts - 21 - src/assets/wise5/authoringTool/project-list/project-list.component.html 55,57 @@ -2330,6 +2318,10 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/app/curriculum/curriculum.component.html 7,11 + + src/app/teacher/teacher-home/teacher-home.component.html + 12,13 + src/app/teacher/teacher-home/teacher-home.component.ts 23 @@ -2343,7 +2335,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-home/teacher-home.component.html - 27,28 + 13,17 src/assets/wise5/authoringTool/authoring-tool.component.ts @@ -3313,7 +3305,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 8,10 + 10,12 src/assets/wise5/authoringTool/addNode/choose-simulation/choose-simulation.component.html @@ -5209,7 +5201,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/modules/header/header-links/header-links.component.html - 31,32 + 29,30 src/app/modules/mobile-menu/mobile-menu.component.html @@ -5471,7 +5463,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/modules/header/header-links/header-links.component.html - 13,18 + 11,16 src/app/modules/library/library-filters/library-filters.component.html @@ -5490,7 +5482,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/modules/header/header-links/header-links.component.html - 29,31 + 27,29 src/app/modules/mobile-menu/mobile-menu.component.html @@ -5604,7 +5596,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-home/teacher-home.component.html - 3,7 + 7,9 @@ -5654,15 +5646,15 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.3,4 - src/app/modules/header/header-links/header-links.component.html - 4,5 + src/app/teacher/teacher-home/teacher-home.component.html + 9,10 Research src/app/modules/header/header-links/header-links.component.html - 32,34 + 30,33 src/app/modules/mobile-menu/mobile-menu.component.html @@ -5690,61 +5682,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.27,30 - - Community Built - - src/app/modules/library/community-library/community-library-details.html - 1,5 - - - src/app/modules/library/community-library/community-library-details.html - 1,5 - - - src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.html - 12,14 - - - src/app/modules/library/teacher-project-library/teacher-project-library.component.ts - 20 - - - - "Community Built" units are designed and contributed by WISE community members. Want to publicly share your custom unit? Contact Us! - - src/app/modules/library/community-library/community-library-details.html - 5,9 - - - src/app/modules/library/community-library/community-library-details.html - 5,9 - - - - *Please note: While WISE staff have reviewed these units, we cannot specifically vouch for their effectiveness or quality. Please examine the units carefully before using in your classrooms. Thanks! - - src/app/modules/library/community-library/community-library-details.html - 10,16 - - - src/app/modules/library/community-library/community-library-details.html - 10,16 - - - - What is Community Built? - - src/app/modules/library/community-library/community-library.component.html - 3,6 - - - - No community designed units found. - - src/app/modules/library/community-library/community-library.component.html - 23,28 - - Copy Unit @@ -6218,73 +6155,11 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.17 - - WISE Tested - - src/app/modules/library/official-library/official-library-details.html - 1,4 - - - src/app/modules/library/official-library/official-library-details.html - 1,4 - - - src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.html - 4,6 - - - src/app/modules/library/teacher-project-library/teacher-project-library.component.ts - 19 - - - - "WISE Tested" units are curricula developed by the WISE team. - - src/app/modules/library/official-library/official-library-details.html - 4,6 - - - src/app/modules/library/official-library/official-library-details.html - 4,6 - - - - Each of the units in this collection has been designed and iteratively refined through a partnership of university-based education researchers and science teachers. They have all been implemeneted and tested in real classrooms and have shown proven learning gains. - - src/app/modules/library/official-library/official-library-details.html - 6,11 - - - src/app/modules/library/official-library/official-library-details.html - 6,11 - - - - Learn more about our design process and check out our research and publications. - - src/app/modules/library/official-library/official-library-details.html - 11,16 - - - src/app/modules/library/official-library/official-library-details.html - 11,16 - - unit(s) src/app/modules/library/official-library/official-library.component.html - 16,19 - - - - What is WISE Tested? - - src/app/modules/library/official-library/official-library.component.html - 43,46 + 15,18 @@ -6309,7 +6184,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 17,18 + 18,19 @@ -6320,7 +6195,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 18,23 + 19,24 @@ -6348,6 +6223,66 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.55 + + Community Built + + src/app/modules/library/public-unit-type-selector/community-library-details.html + 1,5 + + + src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.html + 12,14 + + + + "Community Built" units are designed and contributed by WISE community members. Want to publicly share your custom unit? Contact Us! + + src/app/modules/library/public-unit-type-selector/community-library-details.html + 5,9 + + + + *Please note: While WISE staff have reviewed these units, we cannot specifically vouch for their effectiveness or quality. Please examine the units carefully before using in your classrooms. Thanks! + + src/app/modules/library/public-unit-type-selector/community-library-details.html + 10,16 + + + + WISE Tested + + src/app/modules/library/public-unit-type-selector/official-library-details.html + 1,4 + + + src/app/modules/library/public-unit-type-selector/public-unit-type-selector.component.html + 4,6 + + + + "WISE Tested" units are curricula developed by the WISE team. + + src/app/modules/library/public-unit-type-selector/official-library-details.html + 4,6 + + + + Each of the units in this collection has been designed and iteratively refined through a partnership of university-based education researchers and science teachers. They have all been implemeneted and tested in real classrooms and have shown proven learning gains. + + src/app/modules/library/public-unit-type-selector/official-library-details.html + 6,11 + + + + Learn more about our design process and check out our research and publications. + + src/app/modules/library/public-unit-type-selector/official-library-details.html + 11,16 + + WISE Tested explanation @@ -6523,13 +6458,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.163,165 - - Teacher unit library navigation - - src/app/modules/library/teacher-project-library/teacher-project-library.component.html - 6,9 - - Close menu @@ -6726,7 +6654,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 106,110 + 107,111 @@ -8228,7 +8156,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 29,30 + 30,31 @@ -8246,7 +8174,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 44 + 45 @@ -9578,19 +9506,16 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.9,12 - - Teacher home navigation - - src/app/teacher/teacher-home/teacher-home.component.html - 15,18 - - Class Schedule src/app/teacher/teacher-home/teacher-home.component.ts 22 + + src/app/teacher/teacher-run-list/teacher-run-list.component.html + 4,6 + periods @@ -9686,56 +9611,56 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Archived classroom units: src/app/teacher/teacher-run-list/teacher-run-list.component.html - 32,33 + 33,34 Active classroom units: src/app/teacher/teacher-run-list/teacher-run-list.component.html - 33,35 + 34,36 completed src/app/teacher/teacher-run-list/teacher-run-list.component.html - 38,39 + 39,40 running src/app/teacher/teacher-run-list/teacher-run-list.component.html - 41 + 42 Clear filters src/app/teacher/teacher-run-list/teacher-run-list.component.html - 55,61 + 56,62 Hey there! Looks like you don't have any active classroom units. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 63,64 + 64,65 Browse the "Unit Library" to find titles to use with your students. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 64,66 + 65,67 Looks like you don't have any archived classroom units. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 67,70 + 68,71 From f22fb64ca9f2d5df63c0c9102eba0c113f090651 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Tue, 29 Apr 2025 14:14:37 -0700 Subject: [PATCH 02/19] Redirect to /curriculum after copying a unit In future, we should add /curriculum/personal route and redirect there. --- src/app/services/library.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/services/library.service.ts b/src/app/services/library.service.ts index 19b25db62e8..03a2771f873 100644 --- a/src/app/services/library.service.ts +++ b/src/app/services/library.service.ts @@ -137,7 +137,7 @@ export class LibraryService { addPersonalLibraryProject(project: LibraryProject) { this.newProjectSource.next(project); - this.router.navigate(['/teacher/home/library/personal']); + this.router.navigate(['/curriculum']); } getProjectInfo(projectId): Observable { From 6062f9eec6847a586e5bba6ee2a8081f165da2ff Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Tue, 29 Apr 2025 14:17:54 -0700 Subject: [PATCH 03/19] Removed unused css --- .../teacher-home/teacher-home.component.scss | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/app/teacher/teacher-home/teacher-home.component.scss b/src/app/teacher/teacher-home/teacher-home.component.scss index 411be85ad31..e24637095e2 100644 --- a/src/app/teacher/teacher-home/teacher-home.component.scss +++ b/src/app/teacher/teacher-home/teacher-home.component.scss @@ -10,16 +10,3 @@ .mat-headline-4, .mat-subtitle-1 { margin-bottom: 0; } - -discourse-recent-activity { - // margin-bottom: 16px; - // margin-top: 8px; - - // @media (min-width: breakpoint('sm.min')) { - // margin-top: -8px; - // } - - // @media (min-width: breakpoint('md.min')) { - // margin-top: -36px; - // } -} From 6a33dee2081b5f1e316f3b11e2b3d47e0bcaf91a Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Tue, 29 Apr 2025 14:27:29 -0700 Subject: [PATCH 04/19] Fix authoring tool link path Remove unnecessary SASS imports. --- src/app/teacher/teacher-home/teacher-home.component.html | 2 +- src/app/teacher/teacher-home/teacher-home.component.scss | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/app/teacher/teacher-home/teacher-home.component.html b/src/app/teacher/teacher-home/teacher-home.component.html index 2b428327bab..e1f3f621651 100644 --- a/src/app/teacher/teacher-home/teacher-home.component.html +++ b/src/app/teacher/teacher-home/teacher-home.component.html @@ -10,7 +10,7 @@

Date: Tue, 29 Apr 2025 14:40:12 -0700 Subject: [PATCH 05/19] Add icons to Unit Library and Authoring Tool buttons - Add icon to Class Schedule. - Increase font-weight of teacher home welcome message. --- src/app/curriculum/curriculum.component.html | 3 +-- .../teacher/teacher-home/teacher-home.component.html | 10 +++++++--- .../teacher-run-list/teacher-run-list.component.html | 4 +++- .../teacher-run-list/teacher-run-list.component.scss | 4 ++++ 4 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/app/curriculum/curriculum.component.html b/src/app/curriculum/curriculum.component.html index 9e04e189434..7d14dbf24ef 100644 --- a/src/app/curriculum/curriculum.component.html +++ b/src/app/curriculum/curriculum.component.html @@ -12,8 +12,7 @@

color="primary" class="self-start" href="{{ configService.getAuthoringToolLink() }}" - i18n - >Authoring Tooledit_square Authoring Tool }

diff --git a/src/app/teacher/teacher-home/teacher-home.component.html b/src/app/teacher/teacher-home/teacher-home.component.html index e1f3f621651..73eb0507213 100644 --- a/src/app/teacher/teacher-home/teacher-home.component.html +++ b/src/app/teacher/teacher-home/teacher-home.component.html @@ -6,11 +6,15 @@

homeTeacher Home

-
Welcome {{ user.firstName }}!
+
Welcome {{ user.firstName }}!
-

Class Schedule

+

+ calendar_monthClass Schedule +

Date: Tue, 29 Apr 2025 21:42:30 +0000 Subject: [PATCH 06/19] Updated messages --- src/messages.xlf | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/messages.xlf b/src/messages.xlf index 9c0fe571220..ee22a958d2e 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -2320,7 +2320,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-home/teacher-home.component.html - 12,13 + 13,15 src/app/teacher/teacher-home/teacher-home.component.ts @@ -2331,11 +2331,11 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Authoring Tool src/app/curriculum/curriculum.component.html - 16,21 + 15,20 src/app/teacher/teacher-home/teacher-home.component.html - 13,17 + 16,21 src/assets/wise5/authoringTool/authoring-tool.component.ts @@ -2354,7 +2354,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. Explore our curriculum library to find units and resources to use with your classes! src/app/curriculum/curriculum.component.html - 21,24 + 20,23 @@ -3305,7 +3305,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 10,12 + 12,14 src/assets/wise5/authoringTool/addNode/choose-simulation/choose-simulation.component.html @@ -6184,7 +6184,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 18,19 + 20,21 @@ -6195,7 +6195,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 19,24 + 21,26 @@ -6654,7 +6654,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 107,111 + 109,113 @@ -8156,7 +8156,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 30,31 + 32,33 @@ -8174,7 +8174,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 45 + 47 @@ -9514,7 +9514,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 4,6 + 5,8 @@ -9611,56 +9611,56 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Archived classroom units: src/app/teacher/teacher-run-list/teacher-run-list.component.html - 33,34 + 35,36 Active classroom units: src/app/teacher/teacher-run-list/teacher-run-list.component.html - 34,36 + 36,38 completed src/app/teacher/teacher-run-list/teacher-run-list.component.html - 39,40 + 41,42 running src/app/teacher/teacher-run-list/teacher-run-list.component.html - 42 + 44 Clear filters src/app/teacher/teacher-run-list/teacher-run-list.component.html - 56,62 + 58,64 Hey there! Looks like you don't have any active classroom units. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 64,65 + 66,67 Browse the "Unit Library" to find titles to use with your students. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 65,67 + 67,69 Looks like you don't have any archived classroom units. src/app/teacher/teacher-run-list/teacher-run-list.component.html - 68,71 + 70,73 From 78c425201a2af88d451be42cf5c35c906d826054 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Thu, 1 May 2025 14:52:23 -0700 Subject: [PATCH 07/19] Add /public and /personal routes to curriculum Switch to mat-tab-nav-bar for toggling between public and personal library. --- src/app/app-routing.module.ts | 10 +++++++- src/app/curriculum/curriculum.component.html | 27 +++++++++++++------- src/app/curriculum/curriculum.component.scss | 4 +++ src/app/curriculum/curriculum.component.ts | 15 +++++++++-- src/app/services/library.service.ts | 2 +- src/app/teacher/teacher-routing.module.ts | 7 ++--- 6 files changed, 47 insertions(+), 18 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 45d6d8679cc..7646f44884c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,6 +2,8 @@ import { HTTP_INTERCEPTORS, HttpRequest, HttpHandler, HttpInterceptor } from '@a import { Injectable, NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { FormsModule } from '@angular/forms'; +import { PublicLibraryComponent } from './modules/library/public-library/public-library.component'; +import { PersonalLibraryComponent } from './modules/library/personal-library/personal-library.component'; const routes: Routes = [ { path: '', loadChildren: () => import('./home/home.module').then((m) => m.HomeModule) }, @@ -16,7 +18,13 @@ const routes: Routes = [ { path: 'curriculum', loadComponent: () => - import('./curriculum/curriculum.component').then((m) => m.CurriculumComponent) + import('./curriculum/curriculum.component').then((m) => m.CurriculumComponent), + children: [ + { path: '', redirectTo: 'public', pathMatch: 'full' }, + { path: 'public', component: PublicLibraryComponent }, + { path: 'personal', component: PersonalLibraryComponent }, + { path: '**', redirectTo: 'public' } + ] }, { path: 'features', diff --git a/src/app/curriculum/curriculum.component.html b/src/app/curriculum/curriculum.component.html index 7d14dbf24ef..2411ca84a96 100644 --- a/src/app/curriculum/curriculum.component.html +++ b/src/app/curriculum/curriculum.component.html @@ -27,16 +27,25 @@

@if (showMyUnits) { - - - - - - - - + + + + + } @else { - + }
diff --git a/src/app/curriculum/curriculum.component.scss b/src/app/curriculum/curriculum.component.scss index 7d88b8df3a6..04bc86bef56 100644 --- a/src/app/curriculum/curriculum.component.scss +++ b/src/app/curriculum/curriculum.component.scss @@ -5,3 +5,7 @@ @apply md:rounded-md md:rounded-se-none md:rounded-ee-none; } + +.mat-headline-4 { + margin-bottom: 0; +} diff --git a/src/app/curriculum/curriculum.component.ts b/src/app/curriculum/curriculum.component.ts index a70a147d7b5..03f41e9f68f 100644 --- a/src/app/curriculum/curriculum.component.ts +++ b/src/app/curriculum/curriculum.component.ts @@ -10,6 +10,7 @@ import { PublicLibraryComponent } from '../modules/library/public-library/public import { Subscription } from 'rxjs'; import { UserService } from '../services/user.service'; import { MatButtonModule } from '@angular/material/button'; +import { Router, RouterModule } from '@angular/router'; @Component({ imports: [ @@ -19,7 +20,8 @@ import { MatButtonModule } from '@angular/material/button'; MatIconModule, MatTabsModule, PersonalLibraryComponent, - PublicLibraryComponent + PublicLibraryComponent, + RouterModule ], styleUrl: './curriculum.component.scss', templateUrl: './curriculum.component.html' @@ -33,7 +35,8 @@ export class CurriculumComponent { constructor( protected configService: ConfigService, private libraryService: LibraryService, - private userService: UserService + private userService: UserService, + private router: Router ) {} ngOnInit(): void { @@ -76,4 +79,12 @@ export class CurriculumComponent { protected getMyUnitsTabLabel(): string { return $localize`My Units (${this.numMyUnitsVisible})`; } + + protected isPublicRoute(): boolean { + return this.router.url === '/curriculum/public'; + } + + protected isPersonalRoute(): boolean { + return this.router.url === '/curriculum/personal'; + } } diff --git a/src/app/services/library.service.ts b/src/app/services/library.service.ts index 3c1553da976..808bd09335c 100644 --- a/src/app/services/library.service.ts +++ b/src/app/services/library.service.ts @@ -135,7 +135,7 @@ export class LibraryService { addPersonalLibraryProject(project: LibraryProject) { this.newProjectSource.next(project); - this.router.navigate(['/curriculum']); + this.router.navigate(['/curriculum/personal']); } getProjectInfo(projectId): Observable { diff --git a/src/app/teacher/teacher-routing.module.ts b/src/app/teacher/teacher-routing.module.ts index d07b5236bec..ffd5de6be8d 100644 --- a/src/app/teacher/teacher-routing.module.ts +++ b/src/app/teacher/teacher-routing.module.ts @@ -1,6 +1,5 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; - import { AuthGuard } from './auth.guard'; import { TeacherComponent } from './teacher.component'; import { TeacherHomeComponent } from './teacher-home/teacher-home.component'; @@ -19,10 +18,8 @@ const teacherRoutes: Routes = [ path: 'home', component: TeacherHomeComponent, children: [ - { - path: 'library', - redirectTo: '/curriculum' - }, + { path: 'library/personal', redirectTo: '/curriculum/personal' }, + { path: 'library', redirectTo: '/curriculum' }, { path: 'schedule', redirectTo: '' } ] }, From 1d5554074cd277193051a1743bd185cef094c3d1 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Thu, 1 May 2025 14:53:12 -0700 Subject: [PATCH 08/19] Make /curriculum header link active when viewing curriculum paths --- .../header/header-links/header-links.component.html | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/app/modules/header/header-links/header-links.component.html b/src/app/modules/header/header-links/header-links.component.html index b3b25171e50..c88a980c7dd 100644 --- a/src/app/modules/header/header-links/header-links.component.html +++ b/src/app/modules/header/header-links/header-links.component.html @@ -18,14 +18,7 @@ i18n >About Us - Curriculum + Curriculum Community Research } From 84199748ff4427523cdc3ae8732eeec305a392b8 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Thu, 1 May 2025 14:54:18 -0700 Subject: [PATCH 09/19] Add link to class scheulde on /curriculum when signed in --- src/app/curriculum/curriculum.component.html | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/app/curriculum/curriculum.component.html b/src/app/curriculum/curriculum.component.html index 2411ca84a96..7b32d50c9eb 100644 --- a/src/app/curriculum/curriculum.component.html +++ b/src/app/curriculum/curriculum.component.html @@ -1,19 +1,20 @@
-
+

menu_book Unit Library

@if (showMyUnits) { - edit_square Authoring Tool + }

From 6eb17cfff584635000ffe3af6bcc965267ed4ea7 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Thu, 1 May 2025 15:25:15 -0700 Subject: [PATCH 10/19] Fix tests --- .../curriculum/curriculum.component.spec.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/curriculum/curriculum.component.spec.ts b/src/app/curriculum/curriculum.component.spec.ts index 78372dd2a0c..6593c020dc7 100644 --- a/src/app/curriculum/curriculum.component.spec.ts +++ b/src/app/curriculum/curriculum.component.spec.ts @@ -8,6 +8,7 @@ import { MockComponents, MockProvider, MockProviders } from 'ng-mocks'; import { PersonalLibraryComponent } from '../modules/library/personal-library/personal-library.component'; import { PublicLibraryComponent } from '../modules/library/public-library/public-library.component'; import { UserService } from '../services/user.service'; +import { provideRouter } from '@angular/router'; describe('CurriculumComponent', () => { let component: CurriculumComponent; @@ -26,7 +27,8 @@ describe('CurriculumComponent', () => { communityLibraryProjectsSource$: of([]), numberOfPublicProjectsVisible$: of(3), numberOfPersonalProjectsVisible$: of(2) - }) + }), + provideRouter([]) ] }).compileComponents(); spyOn(TestBed.inject(ConfigService), 'getAuthoringToolLink').and.returnValue(''); @@ -41,23 +43,23 @@ describe('CurriculumComponent', () => { component.ngOnInit(); fixture.detectChanges(); expect(numAuthoringToolButtonElements(fixture)).toEqual(0); - expect(numTabGroupElements(fixture)).toEqual(0); + expect(numTabNavBarElements(fixture)).toEqual(0); }); - it('should show My Units tab and authoring tool link when logged in as teacher', () => { + it('should show My Units tab and teacher home and authoring tool links when logged in as teacher', () => { spyOn(TestBed.inject(UserService), 'isTeacher').and.returnValue(true); component.ngOnInit(); fixture.detectChanges(); - expect(numAuthoringToolButtonElements(fixture)).toEqual(1); - expect(numTabGroupElements(fixture)).toEqual(1); + expect(numAuthoringToolButtonElements(fixture)).toEqual(2); + expect(numTabNavBarElements(fixture)).toEqual(1); expect(component['showMyUnits']).toBeTruthy(); }); }); function numAuthoringToolButtonElements(fixture: ComponentFixture) { - return fixture.debugElement.nativeElement.querySelectorAll('a').length; + return fixture.debugElement.nativeElement.querySelectorAll('header * a').length; } -function numTabGroupElements(fixture: ComponentFixture) { - return fixture.debugElement.nativeElement.querySelectorAll('mat-tab-group').length; +function numTabNavBarElements(fixture: ComponentFixture) { + return fixture.debugElement.nativeElement.querySelectorAll('nav').length; } From e53b3148435d5ea1de7f0df25fccdde6afc4768f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 1 May 2025 22:30:24 +0000 Subject: [PATCH 11/19] Updated messages --- src/messages.xlf | 49 +++++++++++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 19 deletions(-) diff --git a/src/messages.xlf b/src/messages.xlf index a6fa069eb0a..8f2caa0aeed 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -14,7 +14,7 @@ src/app/modules/header/header-links/header-links.component.html - 19,24 + 19,21 src/app/modules/mobile-menu/mobile-menu.component.html @@ -2328,7 +2328,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Unit Library src/app/curriculum/curriculum.component.html - 7,11 + 7,10 src/app/teacher/teacher-home/teacher-home.component.html @@ -2339,6 +2339,21 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.23 + + Class Schedule + + src/app/curriculum/curriculum.component.html + 12,14 + + + src/app/teacher/teacher-home/teacher-home.component.ts + 22 + + + src/app/teacher/teacher-run-list/teacher-run-list.component.html + 5,8 + + Authoring Tool @@ -2366,21 +2381,28 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. Explore our curriculum library to find units and resources to use with your classes! src/app/curriculum/curriculum.component.html - 20,23 + 21,24 + + + + Unit library navigation + + src/app/curriculum/curriculum.component.html + 34,37 Public () src/app/curriculum/curriculum.component.ts - 73 + 76 My Units () src/app/curriculum/curriculum.component.ts - 77 + 80 @@ -5213,7 +5235,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/modules/header/header-links/header-links.component.html - 29,30 + 22,23 src/app/modules/mobile-menu/mobile-menu.component.html @@ -5494,7 +5516,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. src/app/modules/header/header-links/header-links.component.html - 27,29 + 21,22 src/app/modules/mobile-menu/mobile-menu.component.html @@ -5666,7 +5688,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Research src/app/modules/header/header-links/header-links.component.html - 30,33 + 23,26 src/app/modules/mobile-menu/mobile-menu.component.html @@ -9518,17 +9540,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.9,12 - - Class Schedule - - src/app/teacher/teacher-home/teacher-home.component.ts - 22 - - - src/app/teacher/teacher-run-list/teacher-run-list.component.html - 5,8 - - periods From 8ec82ac399c57e45f2b2620619f45475ae7e941f Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Fri, 2 May 2025 12:15:45 -0700 Subject: [PATCH 12/19] Remove PersonalLibraryDetailsComponent --- src/app/modules/library/library.module.ts | 6 +----- .../personal-library-details.html | 16 --------------- .../personal-library.component.ts | 20 ------------------- 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 src/app/modules/library/personal-library/personal-library-details.html diff --git a/src/app/modules/library/library.module.ts b/src/app/modules/library/library.module.ts index 53eac36c7fa..38d2653cd55 100644 --- a/src/app/modules/library/library.module.ts +++ b/src/app/modules/library/library.module.ts @@ -30,10 +30,7 @@ import { TimelineModule } from '../timeline/timeline.module'; import { LibraryFiltersComponent } from './library-filters/library-filters.component'; import { HomePageProjectLibraryComponent } from './home-page-project-library/home-page-project-library.component'; import { OfficialLibraryComponent } from './official-library/official-library.component'; -import { - PersonalLibraryComponent, - PersonalLibraryDetailsComponent -} from './personal-library/personal-library.component'; +import { PersonalLibraryComponent } from './personal-library/personal-library.component'; import { ShareProjectDialogComponent } from './share-project-dialog/share-project-dialog.component'; import { CopyProjectDialogComponent } from './copy-project-dialog/copy-project-dialog.component'; import { LibraryPaginatorIntl } from './libraryPaginatorIntl'; @@ -100,7 +97,6 @@ const materialModules = [ LibraryGroupThumbsComponent, HomePageProjectLibraryComponent, OfficialLibraryComponent, - PersonalLibraryDetailsComponent, ShareProjectDialogComponent, CopyProjectDialogComponent ], diff --git a/src/app/modules/library/personal-library/personal-library-details.html b/src/app/modules/library/personal-library/personal-library-details.html deleted file mode 100644 index c0ee2fa996a..00000000000 --- a/src/app/modules/library/personal-library/personal-library-details.html +++ /dev/null @@ -1,16 +0,0 @@ -

My Units

-
-
-

- The "My Units" library contains curriculum units that you own or that have been shared with - you by other WISE users. -

-

- Units that you create using the WISE Authoring Tool will appear here. Any units that you copy - will also be listed here. -

-
-
-
- -
diff --git a/src/app/modules/library/personal-library/personal-library.component.ts b/src/app/modules/library/personal-library/personal-library.component.ts index b7c6650b244..0f35d8e0f7d 100644 --- a/src/app/modules/library/personal-library/personal-library.component.ts +++ b/src/app/modules/library/personal-library/personal-library.component.ts @@ -124,10 +124,6 @@ export class PersonalLibraryComponent extends LibraryComponent { return this.libraryService.numberOfPersonalProjectsVisible; } - protected getDetailsComponent(): any { - return PersonalLibraryDetailsComponent; - } - public filterUpdated(): void { super.filterUpdated(); this.filteredProjects = this.filteredProjects.filter( @@ -194,19 +190,3 @@ export class PersonalLibraryComponent extends LibraryComponent { this.filterUpdated(); } } - -@Component({ - selector: 'personal-library-details', - templateUrl: 'personal-library-details.html', - standalone: false -}) -export class PersonalLibraryDetailsComponent { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any - ) {} - - close(): void { - this.dialogRef.close(); - } -} From e0e0ad0a1cdc3024db2793a74e7389a7800901f2 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 2 May 2025 19:21:22 +0000 Subject: [PATCH 13/19] Updated messages --- src/messages.xlf | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/messages.xlf b/src/messages.xlf index 8f2caa0aeed..6a1bc2256b0 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -285,10 +285,6 @@ src/app/modules/library/library-project-details/library-project-details.component.html 198,202 - - src/app/modules/library/personal-library/personal-library-details.html - 15,17 - src/app/modules/library/public-unit-type-selector/community-library-details.html 17,19 @@ -1699,10 +1695,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/app/authoring-tool/import-step/choose-import-unit/choose-import-unit.component.html 19,22 - - src/app/modules/library/personal-library/personal-library-details.html - 1,5 - src/assets/wise5/authoringTool/project-list/project-list.component.html 55,57 @@ -6196,20 +6188,6 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.15,18 - - The "My Units" library contains curriculum units that you own or that have been shared with you by other WISE users. - - src/app/modules/library/personal-library/personal-library-details.html - 5,9 - - - - Units that you create using the WISE Authoring Tool will appear here. Any units that you copy will also be listed here. - - src/app/modules/library/personal-library/personal-library-details.html - 9,15 - - Active From c47f8ba52da2d99dd25a7ccd6119b07d20aaf7bd Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Fri, 2 May 2025 12:31:50 -0700 Subject: [PATCH 14/19] Switch active/archived toggle in personal library to select dropdown --- .../personal-library.component.html | 15 +++++++-------- .../personal-library.component.ts | 3 +-- .../personal-library/personal-library.harness.ts | 8 ++++---- 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/app/modules/library/personal-library/personal-library.component.html b/src/app/modules/library/personal-library/personal-library.component.html index 98ebee9fe86..260c8265680 100644 --- a/src/app/modules/library/personal-library/personal-library.component.html +++ b/src/app/modules/library/personal-library/personal-library.component.html @@ -2,14 +2,13 @@
- - Active - Archived - + + View + + Active + Archived + +
diff --git a/src/app/modules/library/personal-library/personal-library.component.ts b/src/app/modules/library/personal-library/personal-library.component.ts index 0f35d8e0f7d..9e0351c75f8 100644 --- a/src/app/modules/library/personal-library/personal-library.component.ts +++ b/src/app/modules/library/personal-library/personal-library.component.ts @@ -9,7 +9,7 @@ import { LibraryComponent } from '../library/library.component'; import { LibraryProject } from '../libraryProject'; import { LibraryProjectComponent } from '../library-project/library-project.component'; import { LibraryService } from '../../../services/library.service'; -import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'; +import { MatDialog } from '@angular/material/dialog'; import { MatDividerModule } from '@angular/material/divider'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatPaginatorModule, PageEvent } from '@angular/material/paginator'; @@ -31,7 +31,6 @@ import { Tag } from '../../../domain/tag'; MatDividerModule, MatFormFieldModule, MatPaginatorModule, - MatRadioModule, MatSelectModule, SelectAllItemsCheckboxComponent, SelectTagsComponent diff --git a/src/app/modules/library/personal-library/personal-library.harness.ts b/src/app/modules/library/personal-library/personal-library.harness.ts index 0172c4a4dbd..e89d00d00ec 100644 --- a/src/app/modules/library/personal-library/personal-library.harness.ts +++ b/src/app/modules/library/personal-library/personal-library.harness.ts @@ -3,12 +3,12 @@ import { LibraryProjectHarness } from '../library-project/library-project.harnes import { MatButtonHarness } from '@angular/material/button/testing'; import { MatCheckboxHarness } from '@angular/material/checkbox/testing'; import { MatPaginatorHarness } from '@angular/material/paginator/testing'; -import { MatRadioGroupHarness } from '@angular/material/radio/testing'; import { SelectAllItemsCheckboxHarness } from '../select-all-items-checkbox/select-all-items-checkbox.harness'; +import { MatSelectHarness } from '@angular/material/select/testing'; export class PersonalLibraryHarness extends ComponentHarness { static hostSelector = 'app-personal-library'; - protected getViewSelect = this.locatorFor(MatRadioGroupHarness); + protected getViewSelect = this.locatorFor(MatSelectHarness); getArchiveButton = this.locatorFor(MatButtonHarness.with({ selector: '[matTooltip="Archive"]' })); getUnarchiveButton = this.locatorFor( MatButtonHarness.with({ selector: '[matTooltip="Restore"]' }) @@ -46,11 +46,11 @@ export class PersonalLibraryHarness extends ComponentHarness { } async showArchivedView(): Promise { - return (await this.getViewSelect()).checkRadioButton({ label: 'Archived' }); + return (await this.getViewSelect()).clickOptions({ text: 'Archived' }); } async showActiveView(): Promise { - return (await this.getViewSelect()).checkRadioButton({ label: 'Active' }); + return (await this.getViewSelect()).clickOptions({ text: 'Active' }); } async getSelectedProjects(): Promise { From a8cb4ca89482553e23f7d0d5dce72df155c4de58 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 2 May 2025 19:36:57 +0000 Subject: [PATCH 15/19] Updated messages --- src/messages.xlf | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/messages.xlf b/src/messages.xlf index 6a1bc2256b0..68e6c20448a 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -6192,7 +6192,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Active src/app/modules/library/personal-library/personal-library.component.html - 10,11 + 8,9 src/app/teacher/teacher-run-list/teacher-run-list.component.html @@ -6203,7 +6203,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Archived src/app/modules/library/personal-library/personal-library.component.html - 11,14 + 9,13 src/app/teacher/teacher-run-list/teacher-run-list.component.html @@ -6214,14 +6214,14 @@ Click "Cancel" to keep the invalid JSON open so you can fix it. selected src/app/modules/library/personal-library/personal-library.component.html - 24,25 + 23,24 No units found. src/app/modules/library/personal-library/personal-library.component.html - 57,61 + 56,60 src/app/modules/library/public-library/public-library.component.html @@ -6232,7 +6232,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Select all units src/app/modules/library/personal-library/personal-library.component.ts - 55 + 54 From e4d713d9cd4069c8e6784ffaae7008f56671f453 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 2 May 2025 16:59:56 -0700 Subject: [PATCH 16/19] Ensure that only one instance of LibraryService is created for the entire application --- src/app/modules/library/library.module.ts | 2 -- src/app/services/library.service.ts | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/app/modules/library/library.module.ts b/src/app/modules/library/library.module.ts index 38d2653cd55..a44af3b9964 100644 --- a/src/app/modules/library/library.module.ts +++ b/src/app/modules/library/library.module.ts @@ -5,7 +5,6 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { LibraryGroupThumbsComponent } from './library-group-thumbs/library-group-thumbs.component'; import { LibraryProjectComponent } from './library-project/library-project.component'; import { LibraryProjectDetailsComponent } from './library-project-details/library-project-details.component'; -import { LibraryService } from '../../services/library.service'; import { RouterModule } from '@angular/router'; import { SharedModule } from '../shared/shared.module'; import { MatAutocompleteModule } from '@angular/material/autocomplete'; @@ -110,7 +109,6 @@ const materialModules = [ ], providers: [ ColorService, - LibraryService, { provide: MatPaginatorIntl, useClass: LibraryPaginatorIntl }, ProjectTagService ] diff --git a/src/app/services/library.service.ts b/src/app/services/library.service.ts index 808bd09335c..2fca5f98b06 100644 --- a/src/app/services/library.service.ts +++ b/src/app/services/library.service.ts @@ -7,7 +7,7 @@ import { ProjectFilterValues } from '../domain/projectFilterValues'; import { Project } from '../domain/project'; import { Router } from '@angular/router'; -@Injectable() +@Injectable({ providedIn: 'root' }) export class LibraryService { private libraryGroupsUrl = '/api/project/library'; private communityProjectsUrl = '/api/project/community'; From 019a4c5ed160cc9c35c1719c55b1c1bdb70078f0 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 2 May 2025 17:23:49 -0700 Subject: [PATCH 17/19] Fix issue where a unit that was copied in Class Schedule was not being highlighted in Personal Library. --- .../library/personal-library/personal-library.component.ts | 5 +++++ src/app/services/library.service.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/modules/library/personal-library/personal-library.component.ts b/src/app/modules/library/personal-library/personal-library.component.ts index 9e0351c75f8..5f1d05b07a7 100644 --- a/src/app/modules/library/personal-library/personal-library.component.ts +++ b/src/app/modules/library/personal-library/personal-library.component.ts @@ -70,6 +70,11 @@ export class PersonalLibraryComponent extends LibraryComponent { this.subscriptions.add( this.libraryService.personalLibraryProjectsSource$.subscribe( (personalProjects: LibraryProject[]) => { + if (history.state?.newProjectId) { + personalProjects.find( + (project) => project.id === history.state?.newProjectId + ).isHighlighted = true; + } this.personalProjects = personalProjects; this.updateProjects(); } diff --git a/src/app/services/library.service.ts b/src/app/services/library.service.ts index 2fca5f98b06..668f4e3be87 100644 --- a/src/app/services/library.service.ts +++ b/src/app/services/library.service.ts @@ -135,7 +135,7 @@ export class LibraryService { addPersonalLibraryProject(project: LibraryProject) { this.newProjectSource.next(project); - this.router.navigate(['/curriculum/personal']); + this.router.navigate(['/curriculum/personal'], { state: { newProjectId: project.id } }); } getProjectInfo(projectId): Observable { From c081b638d4b55b3dadaf739f8d057069e0dfc890 Mon Sep 17 00:00:00 2001 From: Hiroki Terashima Date: Fri, 2 May 2025 17:28:40 -0700 Subject: [PATCH 18/19] Removed MatDialog dependency from LibraryComponent. No longer used. --- src/app/modules/library/library/library.component.ts | 8 ++------ .../official-library.component.spec.ts | 3 +-- .../official-library/official-library.component.ts | 10 +++------- .../personal-library/personal-library.component.ts | 7 ++----- 4 files changed, 8 insertions(+), 20 deletions(-) diff --git a/src/app/modules/library/library/library.component.ts b/src/app/modules/library/library/library.component.ts index e45aabf5f2f..9a33be3f48f 100644 --- a/src/app/modules/library/library/library.component.ts +++ b/src/app/modules/library/library/library.component.ts @@ -1,9 +1,8 @@ -import { OnInit, QueryList, ViewChildren, Directive, Input } from '@angular/core'; +import { OnInit, QueryList, ViewChildren, Directive } from '@angular/core'; import { LibraryService } from '../../../services/library.service'; import { LibraryProject } from '../libraryProject'; import { PageEvent, MatPaginator } from '@angular/material/paginator'; import { BehaviorSubject, Subscription } from 'rxjs'; -import { MatDialog } from '@angular/material/dialog'; import { ProjectFilterValues } from '../../../domain/projectFilterValues'; @Directive() @@ -19,10 +18,7 @@ export abstract class LibraryComponent implements OnInit { protected showFilters: boolean = false; protected subscriptions: Subscription = new Subscription(); - constructor( - protected dialog: MatDialog, - protected libraryService: LibraryService - ) {} + constructor(protected libraryService: LibraryService) {} ngOnInit(): void { this.subscriptions.add( diff --git a/src/app/modules/library/official-library/official-library.component.spec.ts b/src/app/modules/library/official-library/official-library.component.spec.ts index c828ba42bf2..682205bb0ba 100644 --- a/src/app/modules/library/official-library/official-library.component.spec.ts +++ b/src/app/modules/library/official-library/official-library.component.spec.ts @@ -4,7 +4,6 @@ import { fakeAsyncResponse } from '../../../student/student-run-list/student-run import { LibraryService } from '../../../services/library.service'; import { NO_ERRORS_SCHEMA } from '@angular/core'; import { LibraryGroup } from '../libraryGroup'; -import { MatDialogModule } from '@angular/material/dialog'; import { BehaviorSubject, of } from 'rxjs'; import { OverlayModule } from '@angular/cdk/overlay'; import { ProjectFilterValues } from '../../../domain/projectFilterValues'; @@ -24,7 +23,7 @@ describe('OfficialLibraryComponent', () => { let fixture: ComponentFixture; beforeEach(waitForAsync(() => { TestBed.configureTestingModule({ - imports: [OverlayModule, MatDialogModule], + imports: [OverlayModule], declarations: [OfficialLibraryComponent], providers: [{ provide: LibraryService, useClass: MockLibraryService }], schemas: [NO_ERRORS_SCHEMA] diff --git a/src/app/modules/library/official-library/official-library.component.ts b/src/app/modules/library/official-library/official-library.component.ts index da908298400..cf244ba975f 100644 --- a/src/app/modules/library/official-library/official-library.component.ts +++ b/src/app/modules/library/official-library/official-library.component.ts @@ -1,10 +1,9 @@ import { BehaviorSubject } from 'rxjs'; -import { Component, Input, ViewEncapsulation, Inject } from '@angular/core'; +import { Component, Input, ViewEncapsulation } from '@angular/core'; import { LibraryGroup } from '../libraryGroup'; import { LibraryProject } from '../libraryProject'; import { LibraryService } from '../../../services/library.service'; import { LibraryComponent } from '../library/library.component'; -import { MatDialogRef, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog'; @Component({ selector: 'app-official-library', @@ -20,11 +19,8 @@ export class OfficialLibraryComponent extends LibraryComponent { libraryGroups: LibraryGroup[] = []; expandedGroups: object = {}; - constructor( - protected dialog: MatDialog, - protected libraryService: LibraryService - ) { - super(dialog, libraryService); + constructor(protected libraryService: LibraryService) { + super(libraryService); } ngOnInit() { diff --git a/src/app/modules/library/personal-library/personal-library.component.ts b/src/app/modules/library/personal-library/personal-library.component.ts index 5f1d05b07a7..f977f00d6ca 100644 --- a/src/app/modules/library/personal-library/personal-library.component.ts +++ b/src/app/modules/library/personal-library/personal-library.component.ts @@ -3,17 +3,15 @@ import { ArchiveProjectsButtonComponent } from '../../../teacher/archive-project import { ArchiveProjectService } from '../../../services/archive-project.service'; import { BehaviorSubject } from 'rxjs'; import { CommonModule } from '@angular/common'; -import { Component, Inject, Signal, WritableSignal, computed, signal } from '@angular/core'; +import { Component, Signal, WritableSignal, computed, signal } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { LibraryComponent } from '../library/library.component'; import { LibraryProject } from '../libraryProject'; import { LibraryProjectComponent } from '../library-project/library-project.component'; import { LibraryService } from '../../../services/library.service'; -import { MatDialog } from '@angular/material/dialog'; import { MatDividerModule } from '@angular/material/divider'; import { MatFormFieldModule } from '@angular/material/form-field'; import { MatPaginatorModule, PageEvent } from '@angular/material/paginator'; -import { MatRadioModule } from '@angular/material/radio'; import { MatSelectModule } from '@angular/material/select'; import { Project } from '../../../domain/project'; import { ProjectSelectionEvent } from '../../../domain/projectSelectionEvent'; @@ -59,10 +57,9 @@ export class PersonalLibraryComponent extends LibraryComponent { constructor( private archiveProjectService: ArchiveProjectService, - protected dialog: MatDialog, protected libraryService: LibraryService ) { - super(dialog, libraryService); + super(libraryService); } ngOnInit(): void { From 723e78c108cd1f9048730aac830e437392044cc9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 3 May 2025 00:35:14 +0000 Subject: [PATCH 19/19] Updated messages --- src/messages.xlf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/messages.xlf b/src/messages.xlf index 68e6c20448a..cdf6e7c8d46 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -6232,7 +6232,7 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Select all units src/app/modules/library/personal-library/personal-library.component.ts - 54 + 52