From 17b868769755c4d4cd642a2f24e7405ac672753b Mon Sep 17 00:00:00 2001 From: Elblinator Date: Fri, 19 Apr 2024 12:22:45 +0200 Subject: [PATCH 1/6] hide three dot menu completely --- .../participant-list/participant-list.component.html | 11 +++++++++-- .../participant-list/participant-list.component.ts | 4 ++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html index ca750b63ad..31990bcb15 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html @@ -150,14 +150,21 @@

{{ 'Participants' | translate }}

-
+
diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts index 03cb70978a..5217d1ea59 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts @@ -458,8 +458,8 @@ export class ParticipantListComponent extends BaseMeetingListViewComponent Date: Fri, 19 Apr 2024 12:32:16 +0200 Subject: [PATCH 2/6] remove ownPage check for consistency --- .../participant-list/participant-list.component.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts index 5217d1ea59..be1472e0e7 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts @@ -200,11 +200,7 @@ export class ParticipantListComponent extends BaseMeetingListViewComponent Date: Fri, 17 May 2024 10:28:28 +0200 Subject: [PATCH 3/6] extend scrolling-table-cell.directive --- .../participant-list/participant-list.component.html | 2 +- .../directives/scrolling-table-cell.directive.ts | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html index 31990bcb15..53c36406bb 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html @@ -155,7 +155,7 @@

{{ 'Participants' | translate }}

'menu'; row as user; config: { width: 40 }; - isHidden: !(canSeeItemMenu() || (viewport.isMobileSubject | async)) + isHidden: !canSeeItemMenu() && viewport.isMobileSubject " class="cell-slot" > diff --git a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts index 1cb147185c..dad45aae17 100644 --- a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts +++ b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts @@ -1,5 +1,6 @@ import { TemplatePortal } from '@angular/cdk/portal'; import { Directive, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; +import { Observable } from 'rxjs'; import { ScrollingTableManageService } from '../services'; import { ScrollingTableCellDefConfig } from './scrolling-table-cell-config'; @@ -22,8 +23,14 @@ export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDe } @Input() - public set osScrollingTableCellIsHidden(isHidden: boolean) { - this._isHidden = isHidden; + public set osScrollingTableCellIsHidden(isHidden: boolean | Observable) { + if (typeof isHidden == `boolean`) { + this._isHidden = isHidden; + } else { + isHidden.subscribe(isMobileView => { + this._isHidden = !isMobileView; + }); + } } @Input() From 786f53faa0f2a66da96ca066e8880872a7257179 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Tue, 21 May 2024 15:09:41 +0200 Subject: [PATCH 4/6] add unsubscribe() --- .../directives/scrolling-table-cell.directive.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts index dad45aae17..a324fd6245 100644 --- a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts +++ b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts @@ -27,9 +27,11 @@ export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDe if (typeof isHidden == `boolean`) { this._isHidden = isHidden; } else { - isHidden.subscribe(isMobileView => { - this._isHidden = !isMobileView; - }); + isHidden + .subscribe(isMobileView => { + this._isHidden = !isMobileView; + }) + .unsubscribe(); } } From acc3f6e963fa4d012c366a9c12ac32e1f5d1bdd9 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Tue, 21 May 2024 16:48:27 +0200 Subject: [PATCH 5/6] Add unsubscripe in a userful manner --- .../scrolling-table-cell.directive.ts | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts index a324fd6245..adb8f1d388 100644 --- a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts +++ b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts @@ -1,6 +1,6 @@ import { TemplatePortal } from '@angular/cdk/portal'; -import { Directive, Input, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; -import { Observable } from 'rxjs'; +import { Directive, Input, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core'; +import { Observable, Subscription } from 'rxjs'; import { ScrollingTableManageService } from '../services'; import { ScrollingTableCellDefConfig } from './scrolling-table-cell-config'; @@ -10,7 +10,7 @@ import { ScrollingTableCellPosition } from './scrolling-table-cell-position'; @Directive({ selector: `[osScrollingTableCell]` }) -export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDefinition { +export class ScrollingTableCellDirective implements OnInit, OnDestroy, ScrollingTableCellDefinition { @Input() public set osScrollingTableCell(property: string) { this._property = property; @@ -24,14 +24,16 @@ export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDe @Input() public set osScrollingTableCellIsHidden(isHidden: boolean | Observable) { + if (this.inputSubscription) { + this.inputSubscription.unsubscribe(); + } if (typeof isHidden == `boolean`) { + this.inputSubscription = null; this._isHidden = isHidden; } else { - isHidden - .subscribe(isMobileView => { - this._isHidden = !isMobileView; - }) - .unsubscribe(); + isHidden.subscribe(isMobileView => { + this._isHidden = !isMobileView; + }); } } @@ -90,6 +92,7 @@ export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDe private _property = ``; private _labelString = ``; private _isDefault = false; + private inputSubscription: Subscription | null = null; public constructor( public readonly template: TemplateRef, @@ -105,6 +108,12 @@ export class ScrollingTableCellDirective implements OnInit, ScrollingTableCellDe } } + public ngOnDestroy(): void { + if (this.inputSubscription) { + this.inputSubscription.unsubscribe(); + } + } + private render(): void { const { width, minWidth, maxWidth } = this._config; if (width) { From 0f129f3b87948299b377389c11111ab68941ac27 Mon Sep 17 00:00:00 2001 From: Elblinator Date: Tue, 21 May 2024 16:50:48 +0200 Subject: [PATCH 6/6] Change var name --- .../directives/scrolling-table-cell.directive.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts index adb8f1d388..aa5ab1c3ac 100644 --- a/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts +++ b/client/src/app/ui/modules/scrolling-table/directives/scrolling-table-cell.directive.ts @@ -24,11 +24,11 @@ export class ScrollingTableCellDirective implements OnInit, OnDestroy, Scrolling @Input() public set osScrollingTableCellIsHidden(isHidden: boolean | Observable) { - if (this.inputSubscription) { - this.inputSubscription.unsubscribe(); + if (this.isHiddenSubscription) { + this.isHiddenSubscription.unsubscribe(); } if (typeof isHidden == `boolean`) { - this.inputSubscription = null; + this.isHiddenSubscription = null; this._isHidden = isHidden; } else { isHidden.subscribe(isMobileView => { @@ -92,7 +92,7 @@ export class ScrollingTableCellDirective implements OnInit, OnDestroy, Scrolling private _property = ``; private _labelString = ``; private _isDefault = false; - private inputSubscription: Subscription | null = null; + private isHiddenSubscription: Subscription | null = null; public constructor( public readonly template: TemplateRef, @@ -109,8 +109,8 @@ export class ScrollingTableCellDirective implements OnInit, OnDestroy, Scrolling } public ngOnDestroy(): void { - if (this.inputSubscription) { - this.inputSubscription.unsubscribe(); + if (this.isHiddenSubscription) { + this.isHiddenSubscription.unsubscribe(); } }