Skip to content

Commit

Permalink
feat(AuthoringTool): Move preview unit button to top bar (#1486)
Browse files Browse the repository at this point in the history
Co-authored-by: Jonathan Lim-Breitbart <[email protected]>
  • Loading branch information
hirokiterashima and breity authored Oct 25, 2023
1 parent 2a75a5a commit 19829fa
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ <h3 fxLayout="row" fxLayoutAlign="start center" class="title-header">
>
<mat-icon>info</mat-icon>
</button>
<button mat-icon-button matTooltip="Preview Unit" i18n-matTooltip (click)="previewProject()">
<mat-icon>visibility</mat-icon>
</button>
<button
mat-icon-button
*ngIf="runId"
fxHide.xs
aria-label="Switch to Grading View"
i18n-aria-label
matTooltip="Switch to Grading View"
i18n-matTooltip
(click)="switchToGradingView()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ export class TopBarComponent implements OnInit {
return projectInfo;
}

protected previewProject(): void {
window.open(`${this.configService.getConfigParam('previewProjectURL')}`);
}

protected showHelp(): void {
window.open(
'https://docs.google.com/document/d/1G8lVtiUlGXLRAyFOvkEdadHYhJhJLW4aor9dol2VzeU',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@
>
<mat-icon>delete</mat-icon>
</button>
<button
mat-raised-button
color="primary"
(click)="previewProject()"
matTooltip="Preview Unit"
matTooltipPosition="above"
i18n-matTooltip
>
<mat-icon>visibility</mat-icon>
</button>
</div>
<div class="all-nodes-div">
<div class="projectItem" *ngFor="let item of items">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component } from '@angular/core';
import { ConfigService } from '../../services/configService';
import { DeleteNodeService } from '../../services/deleteNodeService';
import { TeacherProjectService } from '../../services/teacherProjectService';
import { TeacherDataService } from '../../services/teacherDataService';
Expand All @@ -25,7 +24,6 @@ export class ProjectAuthoringComponent {
private subscriptions: Subscription = new Subscription();

constructor(
private configService: ConfigService,
private deleteNodeService: DeleteNodeService,
private projectService: TeacherProjectService,
private dataService: TeacherDataService,
Expand Down Expand Up @@ -60,10 +58,6 @@ export class ProjectAuthoringComponent {
this.unselectAllItems();
}

protected previewProject(): void {
window.open(`${this.configService.getConfigParam('previewProjectURL')}`);
}

protected isGroupNode(nodeId: string): boolean {
return this.projectService.isGroupNode(nodeId);
}
Expand Down
46 changes: 21 additions & 25 deletions src/messages.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">38</context>
<context context-type="linenumber">39</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/components/common/feedbackRule/edit-feedback-rules/edit-feedback-rules.component.html</context>
Expand Down Expand Up @@ -1454,8 +1454,8 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<context context-type="linenumber">8</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">61</context>
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">21</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand Down Expand Up @@ -9685,7 +9685,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">141</context>
<context context-type="linenumber">131</context>
</context-group>
</trans-unit>
<trans-unit id="a10dba8eb1f22a5f90f90e79b8305963eec3ee38" datatype="html">
Expand All @@ -9700,7 +9700,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">199</context>
<context context-type="linenumber">189</context>
</context-group>
</trans-unit>
<trans-unit id="0217500199a3e48a7b95762b14b79dad49e76beb" datatype="html">
Expand All @@ -9715,7 +9715,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">200</context>
<context context-type="linenumber">190</context>
</context-group>
</trans-unit>
<trans-unit id="f951d80b53d5536f79142285e8ba09f190a3c723" datatype="html">
Expand Down Expand Up @@ -9823,25 +9823,21 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<source>Switch to Grading View</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">25</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">27</context>
<context context-type="linenumber">28</context>
</context-group>
</trans-unit>
<trans-unit id="b8ae83571c90788bf730befdbb3de4c7cf14ed8e" datatype="html">
<source> Help </source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">43,45</context>
<context context-type="linenumber">44,46</context>
</context-group>
</trans-unit>
<trans-unit id="ffac8783eaf153173408c8a9014a7484fa6a9175" datatype="html">
<source>User Menu</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">48</context>
<context context-type="linenumber">49</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand All @@ -9852,7 +9848,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<source> Go Home </source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">73,75</context>
<context context-type="linenumber">74,76</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand All @@ -9863,7 +9859,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<source> Sign Out </source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/components/top-bar/top-bar.component.html</context>
<context context-type="linenumber">77,79</context>
<context context-type="linenumber">78,80</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/classroomMonitor/classroomMonitorComponents/shared/top-bar/top-bar.component.html</context>
Expand Down Expand Up @@ -12098,7 +12094,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
<source>Select lesson or step</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">90</context>
<context context-type="linenumber">80</context>
</context-group>
</trans-unit>
<trans-unit id="acb6e7262d2e956f2b7e0de254cc6cfed8e87f1e" datatype="html">
Expand All @@ -12107,7 +12103,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">101,103</context>
<context context-type="linenumber">91,93</context>
</context-group>
</trans-unit>
<trans-unit id="e7834cb894423067b509305e88b77c295eb944df" datatype="html">
Expand All @@ -12116,7 +12112,7 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">111,113</context>
<context context-type="linenumber">101,103</context>
</context-group>
</trans-unit>
<trans-unit id="58b3861e3e505792599372978c991f9c886858ad" datatype="html">
Expand All @@ -12125,46 +12121,46 @@ Click &quot;Cancel&quot; to keep the invalid JSON open so you can fix it.</sourc
}}"/></source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">121,123</context>
<context context-type="linenumber">111,113</context>
</context-group>
</trans-unit>
<trans-unit id="b3b4847175a6193afa85eb431bbe16d1f04470fa" datatype="html">
<source>Has Rubric</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">130</context>
<context context-type="linenumber">120</context>
</context-group>
</trans-unit>
<trans-unit id="6ab64ec395f796b771a2d87d2801d0fe60b871d2" datatype="html">
<source>Select lesson</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">160</context>
<context context-type="linenumber">150</context>
</context-group>
</trans-unit>
<trans-unit id="0788cea8f340f4f5399901765d2003f90af76669" datatype="html">
<source>Select step</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">186</context>
<context context-type="linenumber">176</context>
</context-group>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.html</context>
<context context-type="linenumber">222</context>
<context context-type="linenumber">212</context>
</context-group>
</trans-unit>
<trans-unit id="791981839110791639" datatype="html">
<source>Are you sure you want to delete the selected item?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts</context>
<context context-type="linenumber">99</context>
<context context-type="linenumber">93</context>
</context-group>
</trans-unit>
<trans-unit id="1189930234736223663" datatype="html">
<source>Are you sure you want to delete the <x id="PH" equiv-text="selectedNodeIds.length"/> selected items?</source>
<context-group purpose="location">
<context context-type="sourcefile">src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts</context>
<context context-type="linenumber">100</context>
<context context-type="linenumber">94</context>
</context-group>
</trans-unit>
<trans-unit id="e8fb2ceb6f8d4c3e90a6a688e9024461e67f44f0" datatype="html">
Expand Down

0 comments on commit 19829fa

Please sign in to comment.