From dfd8e2c0100ac64a82db900250ca2f197a77d873 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Tue, 29 Oct 2024 11:06:24 -0700 Subject: [PATCH] feat(Branch Authoring): UX improvements (#1967) --- .../add-step-button.component.html | 7 +- .../add-step-button.component.ts | 10 +++ .../create-branch.component.scss | 2 +- .../branch-criteria-help.component.html | 53 ++++++++++++ .../branch-criteria-help.component.spec.ts | 21 +++++ .../branch-criteria-help.component.ts | 12 +++ .../select-branch-criteria.component.html | 8 ++ .../select-branch-criteria.component.ts | 25 +++++- .../select-merge-step.component.html | 3 +- src/messages.xlf | 81 ++++++++++++++++++- 10 files changed, 213 insertions(+), 9 deletions(-) create mode 100644 src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html create mode 100644 src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.spec.ts create mode 100644 src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.ts diff --git a/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.html b/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.html index de82e1677e2..59d4789b5b5 100644 --- a/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.html +++ b/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.html @@ -12,17 +12,18 @@ @if (!branchMergePoint) { } @if (!branchPoint) { } @if (!branchPoint && !branchPathStep) { } diff --git a/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.ts b/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.ts index b29584b5e53..d522546c00d 100644 --- a/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.ts +++ b/src/assets/wise5/authoringTool/add-step-button/add-step-button.component.ts @@ -12,6 +12,16 @@ import { AddStepTarget } from '../../../../app/domain/addStepTarget'; selector: 'add-step-button', templateUrl: './add-step-button.component.html', standalone: true, + styles: [ + ` + .rotate-180 { + transform: rotate(180deg); + } + .flip-vertical { + transform: scaleY(-1); + } + ` + ], imports: [CommonModule, MatButtonModule, MatIconModule, MatMenuModule, MatTooltipModule] }) export class AddStepButtonComponent { diff --git a/src/assets/wise5/authoringTool/create-branch/create-branch.component.scss b/src/assets/wise5/authoringTool/create-branch/create-branch.component.scss index 94572ffe1de..a5d74c029b6 100644 --- a/src/assets/wise5/authoringTool/create-branch/create-branch.component.scss +++ b/src/assets/wise5/authoringTool/create-branch/create-branch.component.scss @@ -1,3 +1,3 @@ -create-branch-paths { +create-branch-paths, select-merge-step { margin-bottom: 16px; } diff --git a/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html b/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html new file mode 100644 index 00000000000..05a8a28bbb7 --- /dev/null +++ b/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html @@ -0,0 +1,53 @@ +

Branching Criteria Options

+ +

Workgroup ID

+

+ Automatically assigns students a branch path based on their WISE Workgroup ID number. This + option ensures a relatively even distribution of students per path. +

+

+ *Assigning paths based on Workgroup ID also can ensure that students are branched to the same + path across multiple branching structures in the unit (assuming each branching structure + contains the same number of paths). +

+

+ This option uses the + remainder function. So for 4 branch paths (A, B, C, D), calculations for the following Workgroup IDs would be: +

+ + +

Score

+

Assigns students a branch path based on their score from another item in the unit.

+

+ After choosing to branch by score, you'll need to identify a reference component. The branching + logic will use the student's score from that item to determine their path. +

+ +

Choice Chosen

+

+ Assigns students a branch path based on their selection from a multiple choice item in the unit. +

+

+ After choosing to branch by choice, you'll need to identify a reference component. The branching + logic will use the student's selection from that item to determine their path. +

+ +

Random

+

+ Randomly assigns student teams a branch path. This option ensures a relatively even distribution + of students per path. +

+
+ + + diff --git a/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.spec.ts b/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.spec.ts new file mode 100644 index 00000000000..0f623c6d523 --- /dev/null +++ b/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.spec.ts @@ -0,0 +1,21 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { BranchCriteriaHelpComponent } from './branch-criteria-help.component'; + +describe('BranchCriteriaHelpComponent', () => { + let component: BranchCriteriaHelpComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + imports: [BranchCriteriaHelpComponent] + }).compileComponents(); + + fixture = TestBed.createComponent(BranchCriteriaHelpComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.ts b/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.ts new file mode 100644 index 00000000000..a30353487ed --- /dev/null +++ b/src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.ts @@ -0,0 +1,12 @@ +import { Component } from '@angular/core'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDialogModule } from '@angular/material/dialog'; +import { MatDividerModule } from '@angular/material/divider'; + +@Component({ + selector: 'branch-criteria-help', + standalone: true, + imports: [MatButtonModule, MatDialogModule, MatDividerModule], + templateUrl: './branch-criteria-help.component.html' +}) +export class BranchCriteriaHelpComponent {} diff --git a/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.html b/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.html index d3ad17e00b8..0cb02ef137a 100644 --- a/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.html +++ b/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.html @@ -8,3 +8,11 @@ } + diff --git a/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.ts b/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.ts index 453f9506c30..a9f0795ccfb 100644 --- a/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.ts +++ b/src/assets/wise5/authoringTool/select-branch-criteria/select-branch-criteria.component.ts @@ -5,9 +5,24 @@ import { MatSelectModule } from '@angular/material/select'; import { BRANCH_CRITERIA, BranchCriteria } from '../../../../app/domain/branchCriteria'; import { FlexLayoutModule } from '@angular/flex-layout'; import { FormsModule } from '@angular/forms'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDialog, MatDialogModule } from '@angular/material/dialog'; +import { MatTooltipModule } from '@angular/material/tooltip'; +import { BranchCriteriaHelpComponent } from './branch-criteria-help/branch-criteria-help.component'; @Component({ - imports: [CommonModule, FlexLayoutModule, FormsModule, MatFormFieldModule, MatSelectModule], + imports: [ + CommonModule, + FlexLayoutModule, + FormsModule, + MatButtonModule, + MatDialogModule, + MatIconModule, + MatFormFieldModule, + MatSelectModule, + MatTooltipModule + ], selector: 'select-branch-criteria', standalone: true, styleUrl: './select-branch-criteria.component.scss', @@ -18,4 +33,12 @@ export class SelectBranchCriteriaComponent { @Input() criteria: string; @Output() criteriaChangedEvent: EventEmitter = new EventEmitter(); + + constructor(protected dialog: MatDialog) {} + + protected showCriteriaHelp(): void { + this.dialog.open(BranchCriteriaHelpComponent, { + panelClass: 'dialog-md' + }); + } } diff --git a/src/assets/wise5/authoringTool/select-merge-step/select-merge-step.component.html b/src/assets/wise5/authoringTool/select-merge-step/select-merge-step.component.html index b502cd3bf73..617c3145458 100644 --- a/src/assets/wise5/authoringTool/select-merge-step/select-merge-step.component.html +++ b/src/assets/wise5/authoringTool/select-merge-step/select-merge-step.component.html @@ -1,4 +1,4 @@ - + Merge Step @@ -6,4 +6,5 @@ Create New Step + All students will be directed here after completing their branch paths. diff --git a/src/messages.xlf b/src/messages.xlf index 1e9725e91af..a12c4c1e592 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -305,6 +305,10 @@ src/assets/wise5/authoringTool/peer-grouping/select-peer-grouping-dialog/select-peer-grouping-dialog.component.html 26 + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 52 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/manageStudents/manage-show-student-info/manage-show-student-info.component.html 37 @@ -9527,21 +9531,21 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.Add step before src/assets/wise5/authoringTool/add-step-button/add-step-button.component.html - 15 + 16 Add step after src/assets/wise5/authoringTool/add-step-button/add-step-button.component.html - 20 + 21 Branch off this step src/assets/wise5/authoringTool/add-step-button/add-step-button.component.html - 25 + 26 @@ -10847,6 +10851,10 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/assets/wise5/authoringTool/edit-branch-paths/edit-branch-paths.component.html 10 + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 29 + src/assets/wise5/classroomMonitor/classroomMonitorComponents/milestones/milestone-grading-view/milestone-grading-view.component.html 90 @@ -10874,6 +10882,10 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.src/assets/wise5/authoringTool/edit-branch-paths/edit-branch-paths.component.html 15 + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 36 + Create Branching Structure @@ -13047,6 +13059,62 @@ The branches will be removed but the steps will remain in the unit. 1 + + Branching Criteria Options + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 1 + + + + Workgroup ID + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 3 + + + + Automatically assigns students a branch path based on their WISE Workgroup ID number. This option ensures a relatively even distribution of students per path. + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 4,7 + + + + *Assigning paths based on Workgroup ID also can ensure that students are branched to the same path across multiple branching structures in the unit (assuming each branching structure contains the same number of paths). + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 8,12 + + + + Assigns students a branch path based on their score from another item in the unit. + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 30 + + + + Assigns students a branch path based on their selection from a multiple choice item in the unit. + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 37,39 + + + + Random + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 45 + + + + Randomly assigns student teams a branch path. This option ensures a relatively even distribution of students per path. + + src/assets/wise5/authoringTool/select-branch-criteria/branch-criteria-help/branch-criteria-help.component.html + 46,49 + + How to Choose Among Paths @@ -13075,6 +13143,13 @@ The branches will be removed but the steps will remain in the unit. 7 + + All students will be directed here after completing their branch paths. + + src/assets/wise5/authoringTool/select-merge-step/select-merge-step.component.html + 9 + + Number of Branch Paths