diff --git a/apps/red-ui/src/app/common/filter/filter.component.html b/apps/red-ui/src/app/common/filter/filter.component.html
index 6c3d07c01..e074ea531 100644
--- a/apps/red-ui/src/app/common/filter/filter.component.html
+++ b/apps/red-ui/src/app/common/filter/filter.component.html
@@ -31,6 +31,7 @@
>
+
diff --git a/apps/red-ui/src/app/common/filter/filter.component.ts b/apps/red-ui/src/app/common/filter/filter.component.ts
index 53a2b300e..e4afdb5f1 100644
--- a/apps/red-ui/src/app/common/filter/filter.component.ts
+++ b/apps/red-ui/src/app/common/filter/filter.component.ts
@@ -22,6 +22,7 @@ import { MAT_CHECKBOX_DEFAULT_OPTIONS } from '@angular/material/checkbox';
export class FilterComponent {
@Output() filtersChanged = new EventEmitter();
@Input() filterTemplate: TemplateRef;
+ @Input() actionsTemplate: TemplateRef;
@Input() filters: FilterModel[] = [];
@Input() filterLabel = 'filter-menu.label';
@Input() icon: string;
@@ -95,7 +96,7 @@ export class FilterComponent {
filterMouseLeave() {
this.mouseOver = false;
this.mouseOverTimeout = setTimeout(() => {
- this.trigger.closeMenu();
+ // this.trigger.closeMenu();
}, 1000);
}
}
diff --git a/apps/red-ui/src/app/common/sorters/super-type-sorter.ts b/apps/red-ui/src/app/common/sorters/super-type-sorter.ts
index 60dd9845d..156182c78 100644
--- a/apps/red-ui/src/app/common/sorters/super-type-sorter.ts
+++ b/apps/red-ui/src/app/common/sorters/super-type-sorter.ts
@@ -5,7 +5,7 @@ export const SuperTypeSorter = {
'suggestion-remove-dictionary': 8,
'suggestion-add': 5,
'suggestion-remove': 6,
- ignore: 50,
+ skipped: 50,
redaction: 1,
manual: 2,
hint: 10,
diff --git a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss
index 582cfa632..94eb48e41 100644
--- a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss
+++ b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss
@@ -25,11 +25,11 @@
}
.hint,
-.ignore {
+.skipped {
border-radius: 50%;
}
-.ignore {
+.skipped {
background-color: $grey-5;
}
diff --git a/apps/red-ui/src/app/components/buttons/circle-button/circle-button.component.scss b/apps/red-ui/src/app/components/buttons/circle-button/circle-button.component.scss
index 46a9a7873..0a6440b67 100644
--- a/apps/red-ui/src/app/components/buttons/circle-button/circle-button.component.scss
+++ b/apps/red-ui/src/app/components/buttons/circle-button/circle-button.component.scss
@@ -18,6 +18,7 @@ button {
mat-icon {
width: 14px;
+ margin: 0;
}
&.primary {
diff --git a/apps/red-ui/src/app/components/type-annotation-icon/type-annotation-icon.component.ts b/apps/red-ui/src/app/components/type-annotation-icon/type-annotation-icon.component.ts
index 465b74038..004364b7b 100644
--- a/apps/red-ui/src/app/components/type-annotation-icon/type-annotation-icon.component.ts
+++ b/apps/red-ui/src/app/components/type-annotation-icon/type-annotation-icon.component.ts
@@ -27,8 +27,8 @@ export class TypeAnnotationIconComponent implements OnChanges {
this.label =
this.annotation.isSuggestion || this.annotation.isDeclinedSuggestion
? 'S'
- : this.annotation.isIgnored
- ? 'I'
+ : this.annotation.isSkipped
+ ? 'S'
: this.annotation.isReadyForAnalysis
? 'A'
: this.annotation.dictionary[0].toUpperCase();
diff --git a/apps/red-ui/src/app/components/type-filter/type-filter.component.html b/apps/red-ui/src/app/components/type-filter/type-filter.component.html
index 7f6b1ceef..9a084280e 100644
--- a/apps/red-ui/src/app/components/type-filter/type-filter.component.html
+++ b/apps/red-ui/src/app/components/type-filter/type-filter.component.html
@@ -5,7 +5,7 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts
index 832743fcf..99fe8d9a0 100644
--- a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts
+++ b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts
@@ -61,4 +61,8 @@ export class AnnotationActionsComponent implements OnInit {
get dictionaryColor() {
return this.appStateService.getDictionaryColor('suggestion-add-dictionary');
}
+
+ logAnnotation(annotation: AnnotationWrapper) {
+ console.log(annotation);
+ }
}
diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
index 3730193dd..320ee34ac 100644
--- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
+++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.html
@@ -192,6 +192,7 @@
(filtersChanged)="filtersChanged($event)"
[chevron]="true"
[filterTemplate]="annotationFilterTemplate"
+ [actionsTemplate]="annotationFilterActionTemplate"
[filters]="annotationFilters"
>
@@ -286,3 +287,14 @@
{{ filter.key | humanize: false }}
+
+
+
+
+
+
+
diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.scss b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.scss
index 2fcb67d1a..fac86425f 100644
--- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.scss
+++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.scss
@@ -166,3 +166,10 @@ redaction-dictionary-annotation-icon {
.ml-8 {
margin-left: 8px;
}
+
+.skipped-toggle-button {
+ position: absolute;
+ right: 0;
+ justify-content: center;
+ align-items: center;
+}
diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
index 8d1ad09c9..c1ea0f915 100644
--- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
+++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts
@@ -170,6 +170,10 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
return this.fileData?.redactionChangeLog?.redactionLogEntry?.length > 0;
}
+ get ignoreColor() {
+ return this.appStateService.getDictionaryColor('skipped');
+ }
+
ngOnInit(): void {
document.documentElement.addEventListener('fullscreenchange', (event) => {
if (!document.fullscreenElement) {
@@ -548,6 +552,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
this.fileData.manualRedactions = manualRedactions;
this._rebuildFilters();
this._annotationDrawService.drawAnnotations(this._instance, this.annotationData.allAnnotations);
+ this._handleIgnoreAnnotationsDrawing();
});
}
@@ -660,6 +665,11 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
}
}
+ switchView($event: MatButtonToggleChange) {
+ this.viewMode = $event.value;
+ this.updateViewMode();
+ }
+
//
async openSSRFilePreview() {
window.open(`/pdf-preview/${this.projectId}/${this.fileId}`, '_blank');
@@ -678,8 +688,25 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
}
//
- switchView($event: MatButtonToggleChange) {
- this.viewMode = $event.value;
- this.updateViewMode();
+ areIgnoresVisible: boolean = false;
+
+ toggleIgnoresVisible($event) {
+ $event.stopPropagation();
+ $event.preventDefault();
+ this.areIgnoresVisible = !this.areIgnoresVisible;
+
+ this._handleIgnoreAnnotationsDrawing();
+
+ return false;
+ }
+
+ private _handleIgnoreAnnotationsDrawing() {
+ const allAnnotations = this._instance.annotManager.getAnnotationsList();
+ const ignoreAnnotations = allAnnotations.filter((a) => a.getCustomData('skipped'));
+ if (this.areIgnoresVisible) {
+ this._instance.annotManager.hideAnnotations(ignoreAnnotations);
+ } else {
+ this._instance.annotManager.showAnnotations(ignoreAnnotations);
+ }
}
}
diff --git a/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts b/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts
index f07f4d1a8..4ee34ff3d 100644
--- a/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts
+++ b/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts
@@ -10,7 +10,7 @@ export class AnnotationWrapper {
| 'suggestion-remove-dictionary'
| 'suggestion-add'
| 'suggestion-remove'
- | 'ignore'
+ | 'skipped'
| 'redaction'
| 'manual-redaction'
| 'recommendation'
@@ -49,7 +49,8 @@ export class AnnotationWrapper {
this.superType === 'suggestion-add-dictionary' ||
this.superType === 'suggestion-remove-dictionary' ||
this.superType === 'suggestion-add' ||
- this.superType === 'suggestion-remove'
+ this.superType === 'suggestion-remove' ||
+ this.superType === 'skipped'
);
}
@@ -74,11 +75,11 @@ export class AnnotationWrapper {
}
get isSuperTypeBasedColor() {
- return this.isIgnored || this.isSuggestion || this.isReadyForAnalysis || this.isDeclinedSuggestion;
+ return this.isSkipped || this.isSuggestion || this.isReadyForAnalysis || this.isDeclinedSuggestion;
}
- get isIgnored() {
- return this.superType === 'ignore';
+ get isSkipped() {
+ return this.superType === 'skipped';
}
get isImage() {
@@ -86,17 +87,13 @@ export class AnnotationWrapper {
}
get isFalsePositive() {
- return this.dictionary === 'false_positive' && (this.superType === 'ignore' || this.superType === 'hint' || this.superType === 'redaction');
+ return this.dictionary === 'false_positive' && (this.superType === 'skipped' || this.superType === 'hint' || this.superType === 'redaction');
}
get isManualRedaction() {
return this.superType === 'manual-redaction';
}
- get isRedactedOrIgnored() {
- return this.superType === 'ignore' || this.superType === 'redaction';
- }
-
get isDeclinedSuggestion() {
return this.superType === 'declined-suggestion';
}
@@ -192,7 +189,7 @@ export class AnnotationWrapper {
annotationWrapper.superType = 'recommendation';
return;
} else {
- annotationWrapper.superType = 'ignore';
+ annotationWrapper.superType = 'skipped';
return;
}
}
@@ -234,7 +231,7 @@ export class AnnotationWrapper {
}
if (!annotationWrapper.superType) {
- annotationWrapper.superType = annotationWrapper.redaction ? 'redaction' : annotationWrapper.hint ? 'hint' : 'ignore';
+ annotationWrapper.superType = annotationWrapper.redaction ? 'redaction' : annotationWrapper.hint ? 'hint' : 'skipped';
}
}
diff --git a/apps/red-ui/src/app/screens/file/model/file-data.model.ts b/apps/red-ui/src/app/screens/file/model/file-data.model.ts
index d1390cd0e..7413638a5 100644
--- a/apps/red-ui/src/app/screens/file/model/file-data.model.ts
+++ b/apps/red-ui/src/app/screens/file/model/file-data.model.ts
@@ -39,7 +39,7 @@ export class FileDataModel {
if (!areDevFeaturesEnabled) {
allAnnotations = allAnnotations.filter((annotation) => {
- return !annotation.isIgnored && !annotation.isFalsePositive;
+ return !annotation.isFalsePositive;
});
}
diff --git a/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts b/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts
index b6809a031..a51b70916 100644
--- a/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts
+++ b/apps/red-ui/src/app/screens/file/service/annotation-draw.service.ts
@@ -86,9 +86,10 @@ export class AnnotationDrawService {
highlight.Hidden = annotationWrapper.isChangeLogRemoved;
highlight.setCustomData('redaction', annotationWrapper.isRedacted);
+ highlight.setCustomData('skipped', annotationWrapper.isSkipped);
highlight.setCustomData('changeLog', annotationWrapper.isChangeLogEntry);
highlight.setCustomData('changeLogRemoved', annotationWrapper.isChangeLogRemoved);
- highlight.setCustomData('redactionColor', this.getColor(activeViewer, 'ignore', 'ignore'));
+ highlight.setCustomData('redactionColor', this.getColor(activeViewer, 'skipped', 'skipped'));
highlight.setCustomData('annotationColor', this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.dictionary));
return highlight;
@@ -102,7 +103,7 @@ export class AnnotationDrawService {
case 'recommendation':
color = this._appStateService.getDictionaryColor(dictionary);
break;
- case 'ignore':
+ case 'skipped':
color = this._appStateService.getDictionaryColor(superType);
break;
default:
diff --git a/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts b/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts
index bbc168cce..f5943932f 100644
--- a/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts
+++ b/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts
@@ -103,7 +103,7 @@ export class AnnotationProcessingService {
hint: 0,
redaction: 0,
request: 0,
- ignore: 0
+ skipped: 0
};
}
obj[pageNumber].annotations.push(annotation);
diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts
index fd419f8d9..1e7931252 100644
--- a/apps/red-ui/src/app/state/app-state.service.ts
+++ b/apps/red-ui/src/app/state/app-state.service.ts
@@ -522,9 +522,9 @@ export class AppStateService {
virtual: true
};
- dictionaryData['ignore'] = {
+ dictionaryData['skipped'] = {
hexColor: colors.notRedacted,
- type: 'ignore',
+ type: 'skipped',
virtual: true
};
dictionaryData['default'] = {
diff --git a/apps/red-ui/src/assets/i18n/de.json b/apps/red-ui/src/assets/i18n/de.json
index 1ca333104..6ee520bad 100644
--- a/apps/red-ui/src/assets/i18n/de.json
+++ b/apps/red-ui/src/assets/i18n/de.json
@@ -433,7 +433,7 @@
"active": "Aktiv",
"archived": "Archiviert",
"hint": "Hinweis",
- "ignore": "Ignorieren",
+ "skipped": "Ignorieren",
"redaction": "Redaktion",
"comment": "Kommentar",
"suggestion": "Redaktionsvorschlag",
@@ -478,7 +478,7 @@
"suggestion-remove-dictionary": "Vorgeschlagene Wörterbuchentfernung",
"suggestion-add": "Vorgeschlagene Redaktion",
"suggestion-remove": "Vorgeschlagene Redaktionsentfernung",
- "ignore": "Ignorieren",
+ "skipped": "Ignorieren",
"hint": "Hinweis",
"redaction": "Redaktion",
"manual-redaction": "Manuelle Redaktion",
diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json
index 3660dfd7e..f4629837c 100644
--- a/apps/red-ui/src/assets/i18n/en.json
+++ b/apps/red-ui/src/assets/i18n/en.json
@@ -443,7 +443,7 @@
"active": "Active",
"archived": "Archived",
"hint": "Hint",
- "ignore": "Ignore",
+ "skipped": "Skipped",
"redaction": "Redaction",
"comment": "Comment",
"suggestion": "Suggestion for redaction",
@@ -490,7 +490,7 @@
"suggestion-remove-dictionary": "Suggested dictionary removal",
"suggestion-add": "Suggested redaction",
"suggestion-remove": "Suggested redaction removal",
- "ignore": "Ignore",
+ "skipped": "Skipped",
"hint": "Hint",
"redaction": "Redaction",
"manual-redaction": "Manual Redaction",