From eeeb54c084333322e9e00315cc3b3695a2652168 Mon Sep 17 00:00:00 2001 From: George Date: Wed, 29 Mar 2023 17:58:50 +0300 Subject: [PATCH 1/9] RED-6412, remove subscriptions from annotation details component. --- apps/red-ui/src/app/models/file/list-item.ts | 4 ++ .../annotation-details.component.html | 4 +- .../annotation-details.component.ts | 58 ++++++------------- .../annotation-wrapper.component.html | 20 +++---- .../annotation-wrapper.component.ts | 19 ++---- .../annotations-list.component.html | 7 ++- .../annotations-list.component.ts | 7 ++- .../file-workload/file-workload.component.ts | 37 ++++++++++-- 8 files changed, 79 insertions(+), 77 deletions(-) create mode 100644 apps/red-ui/src/app/models/file/list-item.ts diff --git a/apps/red-ui/src/app/models/file/list-item.ts b/apps/red-ui/src/app/models/file/list-item.ts new file mode 100644 index 000000000..7bf4a2dea --- /dev/null +++ b/apps/red-ui/src/app/models/file/list-item.ts @@ -0,0 +1,4 @@ +export interface ListItem { + item: T; + isSelected: boolean; +} diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html index 317fe83b7..c30416ead 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html @@ -1,5 +1,5 @@
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts index 57777f99c..182504471 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts @@ -3,10 +3,9 @@ import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { TranslateService } from '@ngx-translate/core'; import { annotationChangesTranslations } from '@translations/annotation-changes-translations'; import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker'; -import { MultiSelectService } from '../../services/multi-select.service'; -import { KeysOf, shareDistinctLast } from '@iqser/common-ui'; -import { BehaviorSubject, combineLatest, filter, map, Observable, switchMap } from 'rxjs'; +import { KeysOf } from '@iqser/common-ui'; import { AnnotationsListingService } from '../../services/annotations-listing.service'; +import { ListItem } from '@models/file/list-item'; interface Engine { readonly icon: string; @@ -42,52 +41,29 @@ const changesProperties: KeysOf[] = [ styleUrls: ['./annotation-details.component.scss'], }) export class AnnotationDetailsComponent implements OnChanges { - @Input() annotation: AnnotationWrapper; - readonly noSelection$: Observable; + @Input() annotation: ListItem; isPopoverOpen = false; - readonly engines$: Observable; - readonly changesTooltip$: Observable; - readonly #annotationChanged$ = new BehaviorSubject(undefined); + engines: Engine[]; + changesTooltip: string; - constructor( - private readonly _translateService: TranslateService, - private readonly _listingService: AnnotationsListingService, - readonly multiSelectService: MultiSelectService, - ) { - const isSelected$ = this.#annotationChanged$.pipe(switchMap(annotation => this._listingService.isSelected$(annotation))); - this.noSelection$ = combineLatest([isSelected$, multiSelectService.inactive$]).pipe( - map(([isSelected, inactive]) => !isSelected || inactive), - shareDistinctLast(), - ); - this.engines$ = this.#engines$; - this.changesTooltip$ = this.#changesTooltip; - } + constructor(private readonly _translateService: TranslateService, private readonly _listingService: AnnotationsListingService) {} - get #engines$(): Observable { - return this.#annotationChanged$.pipe( - filter(annotation => !!annotation), - map(annotation => this.#extractEngines(annotation).filter(engine => engine.show)), - ); - } + getChangesTooltip(): string | undefined { + const changes = changesProperties.filter(key => this.annotation.item[key]); - get #changesTooltip(): Observable { - return this.#annotationChanged$.pipe( - filter(annotation => !!annotation), - map(annotation => changesProperties.filter(key => annotation[key])), - map(changes => { - if (!changes.length) { - return; - } - const header = this._translateService.instant(_('annotation-changes.header')); - const details = changes.map(change => this._translateService.instant(annotationChangesTranslations[change])); - return [header, ...details.map(change => `• ${change}`)].join('\n'); - }), - ); + if (!changes.length) { + return; + } + + const header = this._translateService.instant(_('annotation-changes.header')); + const details = changes.map(change => this._translateService.instant(annotationChangesTranslations[change])); + return [header, ...details.map(change => `• ${change}`)].join('\n'); } ngOnChanges() { - this.#annotationChanged$.next(this.annotation); + this.engines = this.#extractEngines(this.annotation.item).filter(engine => engine.show); + this.changesTooltip = this.getChangesTooltip(); } #extractEngines(annotation: AnnotationWrapper): Engine[] { diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html index b4c5a02da..4a0192977 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html @@ -1,37 +1,37 @@
-
+
-
+
- {{ annotation.comments.length }} + {{ annotation.item.comments.length }}
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts index f6f52c154..a3113b484 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts @@ -1,12 +1,11 @@ import { Component, HostBinding, Input, OnChanges } from '@angular/core'; -import { BehaviorSubject, Observable } from 'rxjs'; -import { distinctUntilChanged, switchMap, tap } from 'rxjs/operators'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; import { MultiSelectService } from '../../services/multi-select.service'; import { AnnotationsListingService } from '../../services/annotations-listing.service'; import { PdfProxyService } from '../../services/pdf-proxy.service'; import { ScrollableParentViews } from '@iqser/common-ui'; import { ActionsHelpModeKeys } from '../../utils/constants'; +import { ListItem } from '@models/file/list-item'; @Component({ selector: 'redaction-annotation-wrapper [annotation]', @@ -14,29 +13,21 @@ import { ActionsHelpModeKeys } from '../../utils/constants'; styleUrls: ['./annotation-wrapper.component.scss'], }) export class AnnotationWrapperComponent implements OnChanges { - @Input() annotation!: AnnotationWrapper; + @Input() annotation!: ListItem; - readonly isSelected$!: Observable; @HostBinding('attr.annotation-id') annotationId: string; @HostBinding('class.active') active = false; readonly scrollableParentView = ScrollableParentViews.ANNOTATIONS_LIST; - readonly #annotationChanged$ = new BehaviorSubject(undefined); constructor( readonly listingService: AnnotationsListingService, readonly multiSelectService: MultiSelectService, readonly pdfProxyService: PdfProxyService, - ) { - this.isSelected$ = this.#annotationChanged$.pipe( - switchMap(entity => this.listingService.isSelected$(entity)), - distinctUntilChanged(), - tap(isSelected => (this.active = isSelected)), - ); - } + ) {} ngOnChanges() { - this.#annotationChanged$.next(this.annotation); - this.annotationId = this.annotation.id; + this.annotationId = this.annotation.item.id; + this.active = this.annotation.isSelected; } getActionsHelpModeKey(annotation: AnnotationWrapper): string { diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html index 7637759e9..c93113416 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html @@ -1,9 +1,12 @@
- +
- +
[]; @Output() readonly pagesPanelActive = new EventEmitter(); @@ -87,11 +88,11 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O const earmarksGroups: EarmarkGroup[] = []; let lastGroup: EarmarkGroup; for (let idx = 0; idx < this.annotations.length; ++idx) { - if (idx === 0 || this.annotations[idx].color !== this.annotations[idx - 1].color) { + if (idx === 0 || this.annotations[idx].item.color !== this.annotations[idx - 1].item.color) { if (lastGroup) { earmarksGroups.push(lastGroup); } - lastGroup = { startIdx: idx, length: 1, color: this.annotations[idx].color }; + lastGroup = { startIdx: idx, length: 1, color: this.annotations[idx].item.color }; } else { lastGroup.length += 1; } diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 595a6cbc2..893b58a6c 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -31,6 +31,7 @@ import { REDAnnotationManager } from '../../../pdf-viewer/services/annotation-ma import { AnnotationsListingService } from '../../services/annotations-listing.service'; import { REDDocumentViewer } from '../../../pdf-viewer/services/document-viewer.service'; import { SuggestionsService } from '../../services/suggestions.service'; +import { ListItem } from '@models/file/list-item'; const COMMAND_KEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Escape']; const ALL_HOTKEY_ARRAY = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown']; @@ -49,7 +50,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy @Input() file!: File; displayedPages: number[] = []; pagesPanelActive = true; - readonly displayedAnnotations$: Observable>; + readonly displayedAnnotations$: Observable[]>>; readonly multiSelectInactive$: Observable; readonly showExcludedPages$: Observable; readonly title$: Observable; @@ -95,8 +96,8 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy this.handleKeyEvent($event); }); - this.displayedAnnotations$ = this._displayedAnnotations$; this.multiSelectInactive$ = this._multiSelectInactive$; + this.displayedAnnotations$ = this._displayedAnnotations$; this.showExcludedPages$ = this._showExcludedPages$; this.isEarmarks$ = this._isEarmarks$; this.title$ = this._title$; @@ -149,13 +150,39 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy return this.listingService.selected.length ? this.listingService.selected[0] : null; } - private get _displayedAnnotations$(): Observable> { + private get _displayedAnnotations$(): Observable[]>> { const primary$ = this.filterService.getFilterModels$('primaryFilters'); const secondary$ = this.filterService.getFilterModels$('secondaryFilters'); - return combineLatest([this.fileDataService.all$, primary$, secondary$]).pipe( + return combineLatest([ + this.fileDataService.all$, + primary$, + secondary$, + this.multiSelectInactive$, + this.listingService.selected$, + ]).pipe( delay(0), - map(([annotations, primary, secondary]) => this._filterAnnotations(annotations, primary, secondary)), + map( + ([annotations, primary, secondary, multiSelectInactive]) => + [this._filterAnnotations(annotations, primary, secondary), multiSelectInactive] as [ + Map, + boolean, + ], + ), + map(([annotations, multiSelectInactive]) => { + const listItemsMap = new Map[]>(); + if (!annotations) { + return listItemsMap; + } + [...annotations.keys()].forEach(key => { + const newValue = annotations.get(key).map(annotation => ({ + item: annotation, + isSelected: this.listingService.isSelected(annotation) && !multiSelectInactive, + })); + listItemsMap.set(key, newValue); + }); + return listItemsMap; + }), ); } From 545e6e0f988445d3e1c0dc0179824d9a9fbfe7b4 Mon Sep 17 00:00:00 2001 From: George Date: Thu, 30 Mar 2023 14:52:04 +0300 Subject: [PATCH 2/9] RED-6412, some more refactoring. --- apps/red-ui/src/app/models/file/list-item.ts | 1 + .../annotation-details.component.html | 4 +- .../annotation-details.component.ts | 2 + .../annotation-wrapper.component.html | 2 +- .../annotation-wrapper.component.ts | 6 +-- .../file-workload/file-workload.component.ts | 46 ++++++++++--------- 6 files changed, 32 insertions(+), 29 deletions(-) diff --git a/apps/red-ui/src/app/models/file/list-item.ts b/apps/red-ui/src/app/models/file/list-item.ts index 7bf4a2dea..71ba19148 100644 --- a/apps/red-ui/src/app/models/file/list-item.ts +++ b/apps/red-ui/src/app/models/file/list-item.ts @@ -1,4 +1,5 @@ export interface ListItem { item: T; isSelected: boolean; + multiSelectActive: boolean; } diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html index c30416ead..c5dbee02b 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.html @@ -1,5 +1,5 @@
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts index 182504471..183a6dd71 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-details/annotation-details.component.ts @@ -46,6 +46,7 @@ export class AnnotationDetailsComponent implements OnChanges { engines: Engine[]; changesTooltip: string; + noSelection: boolean; constructor(private readonly _translateService: TranslateService, private readonly _listingService: AnnotationsListingService) {} @@ -64,6 +65,7 @@ export class AnnotationDetailsComponent implements OnChanges { ngOnChanges() { this.engines = this.#extractEngines(this.annotation.item).filter(engine => engine.show); this.changesTooltip = this.getChangesTooltip(); + this.noSelection = !this.annotation.isSelected || !this.annotation.multiSelectActive; } #extractEngines(annotation: AnnotationWrapper): Engine[] { diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html index 4a0192977..994434dd0 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.html @@ -20,7 +20,7 @@ {{ annotation.item.comments.length }}
-
+
- [this._filterAnnotations(annotations, primary, secondary), multiSelectInactive] as [ - Map, - boolean, - ], + [this._filterAnnotations(annotations, primary, secondary), multiSelectInactive] as const, ), - map(([annotations, multiSelectInactive]) => { - const listItemsMap = new Map[]>(); - if (!annotations) { - return listItemsMap; - } - [...annotations.keys()].forEach(key => { - const newValue = annotations.get(key).map(annotation => ({ - item: annotation, - isSelected: this.listingService.isSelected(annotation) && !multiSelectInactive, - })); - listItemsMap.set(key, newValue); - }); - return listItemsMap; - }), + this._mapListItemsFromAnnotationWrapperArray(), ); } @@ -484,4 +468,24 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy FileWorkloadComponent._scrollToFirstElement(elements); } } + + private _mapListItemsFromAnnotationWrapperArray() { + return pipe( + map(([annotations, multiSelectActive]) => { + const listItemsMap = new Map[]>(); + if (!annotations) { + return listItemsMap; + } + [...annotations.keys()].forEach(key => { + const newValue = annotations.get(key).map(annotation => ({ + item: annotation, + isSelected: this.listingService.isSelected(annotation), + multiSelectActive, + })); + listItemsMap.set(key, newValue); + }); + return listItemsMap; + }), + ); + } } From d23a9ee3ab03d5591dfa0bd7811fbdf9a827b3ec Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Thu, 30 Mar 2023 11:58:34 +0300 Subject: [PATCH 3/9] RED-6176: Fixed save button disabled. --- .../components/user-management/user-management.component.html | 2 +- .../components/user-management/user-management.component.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html index 544237635..b33e14d10 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.html @@ -26,7 +26,7 @@ (save)="assignReviewer(file, $event)" *ngIf="editingReviewer" [options]="usersOptions$ | async" - [value]="file.assignee === null ? undefined : file.assignee" + [value]="file.assignee" >
diff --git a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.ts b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.ts index 9d086d657..765c24b55 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/user-management/user-management.component.ts @@ -91,7 +91,6 @@ export class UserManagementComponent { this.usersOptions$ = combineLatest([this._canUnassignUser$, this.stateService.file$, this._dossier$]).pipe( map(([canUnassignUser, file, dossier]) => { const unassignUser = canUnassignUser && file.assignee ? [undefined] : []; - console.log(unassignUser); return file.isUnderApproval ? this.#customSort([...dossier.approverIds, ...unassignUser]) : this.#customSort([...dossier.memberIds, ...unassignUser]); From 99d6a158c690572d9d42a5ffd9798a4486bfe48d Mon Sep 17 00:00:00 2001 From: Atlassian Bamboo Date: Thu, 30 Mar 2023 11:04:41 +0200 Subject: [PATCH 4/9] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3443 -> 3444 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 41aea12bb..366f22b72 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "4.32.0", + "version": "4.33.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index a1e6b927912a998e964af21d92771e649726441b..644d5ef2d2e2becbf2bd029058c3b68c38b4b324 100644 GIT binary patch delta 3359 zcmV+)4dC+g8uS{Fc7Nlzfo*%<6Wg)l#O{WrFyE`Rx>X7?GX zKbAH;T>hTBTAk(pbF`!KuSkp|Ci|9AU4PgbT)-=TO8%a=a@}73uIGaMSApj|LH5Tb z)!hEi<^M8Daa9wBF8}=PSJvk8`Nd1RFN=zyrplgOri_*K_J8_1DRNdXcSW(w2rg;8 zjEem=D1`g#1n+5f|HU6mlK<)(oYz~*aJIPHrR=4>@NE0Jz3|0nAU;>(b1gnM@ac## zju_*JF^(AHh%pWy^UIjlWrpv+sPAxjdG-8a$??OPl@c723jO^8p|=*zWAbK;oagW> zB^1`*B0sRpH-FDB-VJ7Kw;@T2iinvZj&65V(d4le6xxX0Cw<`yeTn7q;6g#}~99C3i>woTQR0ZQ`z^AU z>jwf`JZ|NowrG0cNWIW>z}d_Z?3no_j$@kd0DuepcGk0?ge-3-_wvUfh^k?P<5jg7 z2|Yc4=YQgKCgsH{*xn_sNY0)c>5rPK=C8_v=8RMZU9h<}h(CKC3EQ-IE%|Lwpg8v9 zKtQ^9xhFBjsK~Q>R7VvdIl_62o+(>o&G*}tfMwp-ngo5f<%4-|4ss^5B z#44LGqY>sJm>^@oSBb5=8JGbBycYH3E~Bw zWH=<5G(-oh=1SFPwnxaA3UECsec&BD9gxV_EfNDk$A(3sGU0$)g#bA_)&;pqaA+~KCQia99D|W8{1g1 zt6~xr6>hC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/file-preview/file-preview-screen.component.html | 5 +++-- libs/common-ui | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html index 580ace65a..9742256e4 100644 --- a/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html +++ b/apps/red-ui/src/app/modules/file-preview/file-preview-screen.component.html @@ -5,6 +5,7 @@
+
@@ -25,6 +26,7 @@
+ @@ -62,7 +64,6 @@ Date: Thu, 30 Mar 2023 13:10:16 +0200 Subject: [PATCH 6/9] chore(release) --- package.json | 2 +- paligo-theme.tar.gz | Bin 3444 -> 3445 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 366f22b72..0bce0b5b3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "redaction", - "version": "4.33.0", + "version": "4.34.0", "private": true, "license": "MIT", "scripts": { diff --git a/paligo-theme.tar.gz b/paligo-theme.tar.gz index 644d5ef2d2e2becbf2bd029058c3b68c38b4b324..99d8f24c2f29e19436c22389434b430b38f9f678 100644 GIT binary patch delta 3353 zcmV+!4d(Ln8uc2Gcz>(a%66XEjvd(U6BPU;*bG`zGh89`b1e1W*p|Bd<&T=(XQcjE z+VF7sd+vI5mjBPuj>^9xF^-t*TSj&LVQX*!ulyWV)e_T?{ z?f+cCii@ROQUfK)Kwx8PzUwj7Qb0t34;&TI^ju_*J zF^(AHh%t^BnF`2LIf4wsi#&o7o7Kb%=9!7-`O-!Bk)YtcL=Z??#J4!=@D zVf`)g1G{|l{D0!zV8(VElBB4Jm>J^ec2^Zm9$Qh771b6!bvK^tJL7pMb;K0T46CMZ z$ri1AzJPpnCzs_E!Mlv+#OhGltlNQmT8qujwrj|B73=h zAh5;bRvv1LrWcOX3rz={%^bmwnP1{Kruhy4xWI2`Jqt?6@^*4Be;k6S8b&x?Rg00( z(*t-ePJd@oUaW%cUE+%5?75NtsHtl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|a-<5iJ4xS7S{iJ>1>GoA$YA*JGxJcmx^f&V4+ZmbSNh~0lDoP-!?5EX42 zLiFZB^gR`#qKuDrts`9?#f=ZkJ0!$$_<78ui795c*mcg%#U}wIMbu1PxB1ln5qNIr jc5df(Zs&Gx=XP%Ac9UQY2o82`|4Z#ZU*>G-08jt`*4Bq9 From fdae158755901baa7aee95dcb52563b10a8f4fee Mon Sep 17 00:00:00 2001 From: George Date: Thu, 30 Mar 2023 15:46:38 +0300 Subject: [PATCH 7/9] RED-6412, add detech changes, simplify methods, remove additional pipes. --- .../file-workload/file-workload.component.ts | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 6abef5a7f..48d42db25 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -12,6 +12,7 @@ import { IconButtonTypes, INestedFilter, IqserEventTarget, + log, shareDistinctLast, shareLast, } from '@iqser/common-ui'; @@ -158,15 +159,13 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy this.fileDataService.all$, primary$, secondary$, - this.multiSelectService.active$.pipe(distinctUntilChanged()), this.listingService.selected$, + this.multiSelectService.active$, ]).pipe( delay(0), - map( - ([annotations, primary, secondary, multiSelectInactive]) => - [this._filterAnnotations(annotations, primary, secondary), multiSelectInactive] as const, - ), - this._mapListItemsFromAnnotationWrapperArray(), + map(([annotations, primary, secondary]) => this._filterAnnotations(annotations, primary, secondary)), + map(annotations => this._mapListItemsFromAnnotationWrapperArray(annotations)), + tap(() => this._changeDetectorRef.detectChanges()), ); } @@ -469,23 +468,19 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy } } - private _mapListItemsFromAnnotationWrapperArray() { - return pipe( - map(([annotations, multiSelectActive]) => { - const listItemsMap = new Map[]>(); - if (!annotations) { - return listItemsMap; - } - [...annotations.keys()].forEach(key => { - const newValue = annotations.get(key).map(annotation => ({ - item: annotation, - isSelected: this.listingService.isSelected(annotation), - multiSelectActive, - })); - listItemsMap.set(key, newValue); - }); - return listItemsMap; - }), - ); + private _mapListItemsFromAnnotationWrapperArray(annotations: Map) { + const listItemsMap = new Map[]>(); + if (!annotations) { + return listItemsMap; + } + [...annotations.keys()].forEach(key => { + const newValue = annotations.get(key).map(annotation => ({ + item: annotation, + isSelected: this.listingService.isSelected(annotation), + multiSelectActive: this.multiSelectService.isActive, + })); + listItemsMap.set(key, newValue); + }); + return listItemsMap; } } From a99810fea37c9200c6be1174c23dedce10b28611 Mon Sep 17 00:00:00 2001 From: George Date: Thu, 30 Mar 2023 16:53:19 +0300 Subject: [PATCH 8/9] RED-6412, remove unused imports, add trackby to stop flickering. --- .../annotation-wrapper/annotation-wrapper.component.ts | 1 - .../components/annotations-list/annotations-list.component.html | 2 +- .../components/annotations-list/annotations-list.component.ts | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts index 4d0c61752..1fd6e3c88 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-wrapper/annotation-wrapper.component.ts @@ -1,6 +1,5 @@ import { Component, HostBinding, Input, OnChanges } from '@angular/core'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; -import { MultiSelectService } from '../../services/multi-select.service'; import { AnnotationsListingService } from '../../services/annotations-listing.service'; import { PdfProxyService } from '../../services/pdf-proxy.service'; import { ScrollableParentViews } from '@iqser/common-ui'; diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html index c93113416..ac61e425b 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.html @@ -1,4 +1,4 @@ - +
diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts index b52637e79..2f793856f 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/annotations-list/annotations-list.component.ts @@ -22,6 +22,7 @@ export class AnnotationsListComponent extends HasScrollbarDirective implements O @Output() readonly pagesPanelActive = new EventEmitter(); readonly earmarkGroups$ = new BehaviorSubject([]); + protected readonly _trackBy = (index: number, listItem: ListItem) => listItem.item.id; constructor( protected readonly _elementRef: ElementRef, From 2d2ba49242bd3533536d0d75d4a2ef46054a6f3a Mon Sep 17 00:00:00 2001 From: George Date: Thu, 30 Mar 2023 17:31:32 +0300 Subject: [PATCH 9/9] RED-6412, fix document annotation select being delayed. --- .../components/file-workload/file-workload.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts index 48d42db25..682952d93 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/components/file-workload/file-workload.component.ts @@ -12,12 +12,11 @@ import { IconButtonTypes, INestedFilter, IqserEventTarget, - log, shareDistinctLast, shareLast, } from '@iqser/common-ui'; -import { combineLatest, delay, Observable, pipe } from 'rxjs'; -import { distinctUntilChanged, map, tap } from 'rxjs/operators'; +import { combineLatest, delay, Observable } from 'rxjs'; +import { map, tap } from 'rxjs/operators'; import { File } from '@red/domain'; import { ExcludedPagesService } from '../../services/excluded-pages.service'; import { MultiSelectService } from '../../services/multi-select.service'; @@ -165,7 +164,7 @@ export class FileWorkloadComponent extends AutoUnsubscribe implements OnDestroy delay(0), map(([annotations, primary, secondary]) => this._filterAnnotations(annotations, primary, secondary)), map(annotations => this._mapListItemsFromAnnotationWrapperArray(annotations)), - tap(() => this._changeDetectorRef.detectChanges()), + tap(() => setTimeout(() => this._changeDetectorRef.detectChanges())), ); }