From cf452428f8ec924f49f380c3cfd7e2c920306864 Mon Sep 17 00:00:00 2001 From: Jonathan Lim-Breitbart Date: Fri, 4 Aug 2023 09:38:38 -0700 Subject: [PATCH] fix(Node Icon): Edit badge shows text content instead of icon #1377 --- .../vle/node-icon/node-icon.component.html | 6 ++--- .../vle/node-icon/node-icon.component.scss | 22 +++++++------------ .../vle/node-icon/node-icon.component.ts | 3 +-- src/messages.xlf | 14 ++++++------ src/style/abstracts/_mixins.scss | 6 +++++ 5 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/assets/wise5/vle/node-icon/node-icon.component.html b/src/assets/wise5/vle/node-icon/node-icon.component.html index 49b3459ff64..d82dd3c70ae 100644 --- a/src/assets/wise5/vle/node-icon/node-icon.component.html +++ b/src/assets/wise5/vle/node-icon/node-icon.component.html @@ -1,14 +1,14 @@
{{ icon.fontName }}
@@ -20,7 +20,7 @@ matTooltip="Choose an Icon" matTooltipPosition="above" matBadge="edit" - class="node-icon mdc-text-field--filled" + class="mdc-text-field--filled has-icon-badge" (click)="openNodeIconChooserDialog()" >
diff --git a/src/assets/wise5/vle/node-icon/node-icon.component.scss b/src/assets/wise5/vle/node-icon/node-icon.component.scss index 8702a78dda0..fb6f795a987 100644 --- a/src/assets/wise5/vle/node-icon/node-icon.component.scss +++ b/src/assets/wise5/vle/node-icon/node-icon.component.scss @@ -1,16 +1,10 @@ -.node-icon { - .mat-icon { - color: #ffffff; - margin: 8px !important; - } - - &.mat-mdc-button { - text-transform: none; - padding: 8px; - height: 100%; - } +.mat-icon { + color: #ffffff; + margin: 8px !important; +} - .mat-badge-content { - font-family: 'Material Icons'; - } +.mat-mdc-button { + text-transform: none; + padding: 8px; + height: 100%; } diff --git a/src/assets/wise5/vle/node-icon/node-icon.component.ts b/src/assets/wise5/vle/node-icon/node-icon.component.ts index 3af3d6712cc..872b2e05ed5 100644 --- a/src/assets/wise5/vle/node-icon/node-icon.component.ts +++ b/src/assets/wise5/vle/node-icon/node-icon.component.ts @@ -8,8 +8,7 @@ import { Node } from '../../common/Node'; @Component({ selector: 'node-icon', templateUrl: 'node-icon.component.html', - styleUrls: ['node-icon.component.scss'], - encapsulation: ViewEncapsulation.None + styleUrls: ['node-icon.component.scss'] }) export class NodeIconComponent { @Input() diff --git a/src/messages.xlf b/src/messages.xlf index a04a5ecad89..41d7796d781 100644 --- a/src/messages.xlf +++ b/src/messages.xlf @@ -11827,49 +11827,49 @@ Click "Cancel" to keep the invalid JSON open so you can fix it.You are not allowed to insert the selected item after itself. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 182 + 174 You are not allowed to insert the selected items after itself. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 184 + 176 Please select an item to copy and then click the "Copy" button again. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 297 + 289 You cannot copy lessons at this time. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 304 + 296 Please select an item to move and then click the "Move" button again. src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 313 + 305 Are you sure you want to delete the selected item? src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 330 + 322 Are you sure you want to delete the selected items? src/assets/wise5/authoringTool/project-authoring/project-authoring.component.ts - 332 + 324 diff --git a/src/style/abstracts/_mixins.scss b/src/style/abstracts/_mixins.scss index 690dcab6058..1f5efe62035 100644 --- a/src/style/abstracts/_mixins.scss +++ b/src/style/abstracts/_mixins.scss @@ -160,6 +160,12 @@ } } +.has-icon-badge { + .mat-badge-content { + font-family: 'Material Icons'; + } +} + // Define a custom mixin that takes in the current material theme and colors @mixin theme-setup($theme, $colors) { a {