From 31f0733ffc461094176f609be48f3f513af211ae Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Tue, 2 May 2023 17:29:48 +0200 Subject: [PATCH 01/17] integration test add language to meeting create request (#2242) --- client/tests/Dockerfile.test | 2 +- client/tests/integration/helpers/request.ts | 1 + client/tests/package-lock.json | 55 +++++++++++++++------ client/tests/package.json | 2 +- 4 files changed, 43 insertions(+), 17 deletions(-) diff --git a/client/tests/Dockerfile.test b/client/tests/Dockerfile.test index dc0de14e9a..e06c4e7bb8 100644 --- a/client/tests/Dockerfile.test +++ b/client/tests/Dockerfile.test @@ -1,4 +1,4 @@ -FROM mcr.microsoft.com/playwright:v1.28.1-focal +FROM mcr.microsoft.com/playwright:v1.32.0-jammy WORKDIR /app COPY ./package.json . diff --git a/client/tests/integration/helpers/request.ts b/client/tests/integration/helpers/request.ts index ca03709bab..d0bee3926d 100644 --- a/client/tests/integration/helpers/request.ts +++ b/client/tests/integration/helpers/request.ts @@ -85,6 +85,7 @@ export async function createMeeting( const meetingData = { committee_id: id, name, + language: `en`, admin_ids }; diff --git a/client/tests/package-lock.json b/client/tests/package-lock.json index 0701fee5d6..8436c99249 100644 --- a/client/tests/package-lock.json +++ b/client/tests/package-lock.json @@ -6,23 +6,26 @@ "packages": { "": { "devDependencies": { - "@playwright/test": "^1.28.1" + "@playwright/test": "^1.32.0" } }, "node_modules/@playwright/test": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz", - "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==", + "version": "1.32.3", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.32.3.tgz", + "integrity": "sha512-BvWNvK0RfBriindxhLVabi8BRe3X0J9EVjKlcmhxjg4giWBD/xleLcg2dz7Tx0agu28rczjNIPQWznwzDwVsZQ==", "dev": true, "dependencies": { "@types/node": "*", - "playwright-core": "1.28.1" + "playwright-core": "1.32.3" }, "bin": { "playwright": "cli.js" }, "engines": { "node": ">=14" + }, + "optionalDependencies": { + "fsevents": "2.3.2" } }, "node_modules/@types/node": { @@ -31,10 +34,24 @@ "integrity": "sha512-j3CEDa2vd96K0AXF8Wur7UucACvnjkk8hYyQAHhUNciabZLDl9nfAEVUSwmh245OOZV15bRA3Y590Gi5jUcDJg==", "dev": true }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/playwright-core": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz", - "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==", + "version": "1.32.3", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.32.3.tgz", + "integrity": "sha512-SB+cdrnu74ZIn5Ogh/8278ngEh9NEEV0vR4sJFmK04h2iZpybfbqBY0bX6+BLYWVdV12JLLI+JEFtSnYgR+mWg==", "dev": true, "bin": { "playwright": "cli.js" @@ -46,13 +63,14 @@ }, "dependencies": { "@playwright/test": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.28.1.tgz", - "integrity": "sha512-xN6spdqrNlwSn9KabIhqfZR7IWjPpFK1835tFNgjrlysaSezuX8PYUwaz38V/yI8TJLG9PkAMEXoHRXYXlpTPQ==", + "version": "1.32.3", + "resolved": "https://registry.npmjs.org/@playwright/test/-/test-1.32.3.tgz", + "integrity": "sha512-BvWNvK0RfBriindxhLVabi8BRe3X0J9EVjKlcmhxjg4giWBD/xleLcg2dz7Tx0agu28rczjNIPQWznwzDwVsZQ==", "dev": true, "requires": { "@types/node": "*", - "playwright-core": "1.28.1" + "fsevents": "2.3.2", + "playwright-core": "1.32.3" } }, "@types/node": { @@ -61,10 +79,17 @@ "integrity": "sha512-j3CEDa2vd96K0AXF8Wur7UucACvnjkk8hYyQAHhUNciabZLDl9nfAEVUSwmh245OOZV15bRA3Y590Gi5jUcDJg==", "dev": true }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "playwright-core": { - "version": "1.28.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.28.1.tgz", - "integrity": "sha512-3PixLnGPno0E8rSBJjtwqTwJe3Yw72QwBBBxNoukIj3lEeBNXwbNiKrNuB1oyQgTBw5QHUhNO3SteEtHaMK6ag==", + "version": "1.32.3", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.32.3.tgz", + "integrity": "sha512-SB+cdrnu74ZIn5Ogh/8278ngEh9NEEV0vR4sJFmK04h2iZpybfbqBY0bX6+BLYWVdV12JLLI+JEFtSnYgR+mWg==", "dev": true } } diff --git a/client/tests/package.json b/client/tests/package.json index a2f55cab50..ce0754455c 100644 --- a/client/tests/package.json +++ b/client/tests/package.json @@ -1,6 +1,6 @@ { "scripts": {}, "devDependencies": { - "@playwright/test": "^1.28.1" + "@playwright/test": "^1.32.0" } } From 8c03e7d69dfe66ecb23bea2a68973d2c83c040a7 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 3 May 2023 10:18:12 +0200 Subject: [PATCH 02/17] improve agenda sort filter (#2249) --- .../pages/agenda-sort/agenda-sort.module.ts | 4 ++ .../agenda-sort/agenda-sort.component.html | 40 +++++++------------ .../agenda-sort/agenda-sort.component.scss | 5 ++- .../agenda-sort/agenda-sort.component.ts | 16 ++++---- 4 files changed, 30 insertions(+), 35 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/agenda-sort.module.ts b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/agenda-sort.module.ts index 207356381a..9b67aff2e6 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/agenda-sort.module.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/agenda-sort.module.ts @@ -4,6 +4,8 @@ import { FormsModule } from '@angular/forms'; import { MatCardModule } from '@angular/material/card'; import { MatCheckboxModule } from '@angular/material/checkbox'; import { MatIconModule } from '@angular/material/icon'; +import { MatListModule } from '@angular/material/list'; +import { MatMenuModule } from '@angular/material/menu'; import { MatSidenavModule } from '@angular/material/sidenav'; import { MatTooltipModule } from '@angular/material/tooltip'; import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations'; @@ -26,6 +28,8 @@ import { AgendaSortComponent } from './components/agenda-sort/agenda-sort.compon MatCheckboxModule, MatCardModule, MatTooltipModule, + MatMenuModule, + MatListModule, SortingModule ] }) diff --git a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.html b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.html index d627bdbe66..7734d4c6f2 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.html +++ b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.html @@ -22,31 +22,21 @@

{{ 'Sort agenda' | translate }}

- - -
- - -
{{ 'Visibility' | translate }}
-
- - - {{ getIcon(option.id) }} - - {{ option.label | translate }} - -
-
-
-
+ + +
{{ 'Visibility' | translate }}
+ + + + {{ getIcon(option.id) }} + +

{{ option.label | translate }}

+
+
+
diff --git a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.scss b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.scss index 7e28eb5070..4ef29a1a07 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.scss +++ b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.scss @@ -1,8 +1,11 @@ +.filter-hint { + padding: 0 16px; +} + .sort-header { display: block; padding: 0 8px; width: auto; - position: relative; text-align: center; .button-menu { diff --git a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.ts b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.ts index e7fc9c71b0..df4f59f374 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-sort/components/agenda-sort/agenda-sort.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, OnInit, ViewChild } from '@angular/core'; +import { MatListOption, MatSelectionList } from '@angular/material/list'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { AgendaItemType, ItemTypeChoices } from 'src/app/domain/models/agenda/agenda-item'; @@ -23,6 +24,8 @@ export class AgendaSortComponent extends BaseSortTreeViewComponent; + @ViewChild(`visibilities`) visibilitiesEl: MatSelectionList; + /** * These are the available options for filtering the nodes. * Adds the property `state` to identify if the option is marked as active. @@ -56,14 +59,8 @@ export class AgendaSortComponent extends BaseSortTreeViewComponent f.value)); } /** @@ -89,6 +86,7 @@ export class AgendaSortComponent extends BaseSortTreeViewComponent Date: Wed, 3 May 2023 14:58:03 +0200 Subject: [PATCH 03/17] fix spinner not disappearing when blocking media access (#2250) Co-authored-by: Bastian Rihm --- .../services/operator-media-permission.service.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts b/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts index 1f2eebc742..73025b87aa 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts @@ -80,10 +80,8 @@ export class OperatorMediaPermissionService { }); } } catch (e) { - if (e instanceof DOMException) { - if (e.message === `Permission denied`) { - this.throwPermError(); - } + if (e instanceof DOMException && e.name === `NotAllowedError`) { + this.throwPermError(); } else { this.throwPermError(e as any); } From 937d2b13c40c41e481c24e9edb58d014982a6db9 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Fri, 5 May 2023 10:59:59 +0200 Subject: [PATCH 04/17] fix missing autoupdate for amendment change recommendations (#2256) --- .../pages/meetings/pages/motions/motions.subscription.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts b/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts index 22d567467f..0e407341b6 100644 --- a/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts @@ -174,7 +174,8 @@ export const getMotionDetailSubscriptionConfig: SubscriptionConfigGenerator = (. { idField: `lead_motion_id`, fieldset: [`text`] }, { idField: `amendment_ids`, - fieldset: [`text`, `modified_final_version`, { templateField: `amendment_paragraph_$` }] + fieldset: [`text`, `modified_final_version`, { templateField: `amendment_paragraph_$` }], + follow: [{ idField: `change_recommendation_ids`, fieldset: FULL_FIELDSET }] }, { idField: `comment_ids`, fieldset: FULL_FIELDSET }, { idField: `supporter_ids`, ...UserFieldsets.FullNameSubscription } @@ -215,7 +216,10 @@ export const getAmendmentListSubscriptionConfig: SubscriptionConfigGenerator = ( { idField: `amendment_ids`, fieldset: [`text`, { templateField: `amendment_paragraph_$` }], - follow: [{ idField: `lead_motion_id`, fieldset: [`text`, `modified_final_version`] }] + follow: [ + { idField: `change_recommendation_ids`, fieldset: FULL_FIELDSET }, + { idField: `lead_motion_id`, fieldset: [`text`, `modified_final_version`] } + ] } ] } From 3cba30aeb6d58786f99ed5a6fd0ec021de3d476d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20H=C3=B6=C3=9Fl?= Date: Fri, 5 May 2023 14:08:51 +0200 Subject: [PATCH 05/17] Bugfix: appending lists in amendments produced broken diff (#2129) (#2226) Fix also insertions in nested lists #1767 --- .../motion-diff.service.spec.ts | 77 ++++++++++++++++++- .../motion-diff.service.ts | 27 ++++++- 2 files changed, 101 insertions(+), 3 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.spec.ts b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.spec.ts index 9c4928dae4..7a1734757f 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.spec.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.spec.ts @@ -865,7 +865,7 @@ describe(`MotionDiffService`, () => { expect(diff).toBe(expected); })); - it(`handles insterted paragraphs infront of list`, inject([MotionDiffService], (service: MotionDiffService) => { + it(`handles inserted paragraphs in front of list`, inject([MotionDiffService], (service: MotionDiffService) => { // Hint: line number should be moved into first element const before = `
  •  Lorem ipsum
`, after = `

Add before UL

  •  Lorem ipsum
`, @@ -875,6 +875,81 @@ describe(`MotionDiffService`, () => { expect(diff).toBe(expected); })); + it(`handles inserted list items at the end of nested lists`, inject( + [MotionDiffService], + (service: MotionDiffService) => { + // Hint: line number should be moved into first element + const before = + `
    1. ` + + `
    2.  c
    3. ` + + `
`, + after = + `
    1. ` + + `
    2. c
    3. ` + + `
    4. d
    5. ` + + `
    6. e
    7. ` + + `
`, + expected = + `
    1. ` + + `
    2.  c
    3. ` + + `
    4. d
    5. ` + + `
    6. e
    7. ` + + `
`; + + const diff = service.diff(before, after); + expect(diff).toBe(expected); + } + )); + + it(`handles changed text within nested lists`, inject([MotionDiffService], (service: MotionDiffService) => { + // Hint: line number should be moved into first element + const before = + `
  •  Ebene 1` + + `
    •  Ebene 2` + + `
      •  Ebene 3` + + `
        •  Ebene 4
        • ` + + `
`, + after = + `
  • Ebene 1` + + `
    • Ebene 2` + + `
      • Ebene 3a` + + `
        • Ebene 4
        ` + + `
`, + expected = + `
  •  Ebene 1` + + `
    •  Ebene 2` + + `
      •  ` + + `Ebene 3Ebene 3a` + + `
        •  Ebene 4
        • ` + + `
`; + + const diff = service.diff(before, after); + expect(diff).toBe(expected); + })); + + it(`handles replaced text at the end of nested lists`, inject( + [MotionDiffService], + (service: MotionDiffService) => { + // Hint: line number should be moved into first element + const before = + `
      1. ` + + `
      2.  Test 1
      3. ` + + `
`, + after = + `
      1. ` + + `
      2. Test 2
      3. ` + + `
`, + expected = + `
      1. ` + + `
      2.  ` + + `Test 12
      3. ` + + `
`; + + const diff = service.diff(before, after); + expect(diff).toBe(expected); + } + )); + it(`handles completely deleted paragraphs`, inject([MotionDiffService], (service: MotionDiffService) => { const before = `

Ihr könnt ohne Sorge fortgehen.'Da meckerte die Alte und machte sich getrost auf den Weg.

`, after = ``; diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts index 80f77ffccf..7d8d9c089b 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/motion-diff.service/motion-diff.service.ts @@ -1576,7 +1576,7 @@ export class MotionDiffService { (whole: string, insDel: string): string => { const modificationClass = insDel.toLowerCase() === `ins` ? `insert` : `delete`; return whole.replace( - /(<(p|div|blockquote|li)[^>]*>)([\s\S]*?)(<\/\2>)/gi, + /(<(p|div|blockquote|ul|ol|li)[^>]*>)([\s\S]*?)(<\/\2>)/gi, (_whole2: string, opening: string, _blockTag: string, content: string, closing: string): string => { const modifiedTag = DomHelpers.addClassToHtmlTag(opening, modificationClass); return `` + modifiedTag + content + closing + `<` + insDel + `>`; @@ -1585,7 +1585,7 @@ export class MotionDiffService { } ); - // deleted text

inserted.

=> deleted tetinserted.

+ // deleted text

inserted.

=> deleted textinserted.

diffUnnormalized = diffUnnormalized.replace( /([^<]*)<\/(p|div|blockquote|li)><\/del>([^<]*)<\/\2>(\s*)<\/ins>/gi, (_whole: string, deleted: string, tag: string, inserted: string, white: string): string => @@ -1680,6 +1680,14 @@ export class MotionDiffService { `` ); + // Ebene 3
  •  Ebene 3a
    • + // => Ebene 3 Ebene 3a
      •   + diffUnnormalized = diffUnnormalized.replace( + /([^<]+)((?:<(?:ul|ol|li)>)+)<\/del>(]*os-line-number[^>]*>(?: |\s)<\/span>)?([^<]+)\2<\/ins>/gi, + (_whole: string, del: string, block: string, ln: string, ins: string): string => + `` + del + `` + ins + `` + block + ln + ); + //

        ->

        diffUnnormalized = diffUnnormalized.replace( /(<\/(p|div|blockquote|li)>)(\s*)<\/(ins|del)>/gi, @@ -1687,6 +1695,21 @@ export class MotionDiffService { `` + ending + space ); + //
          • ...
      • d
      • e
    + // =>
      • ...
      • d
      • e
    + diffUnnormalized = diffUnnormalized.replace( + /((<\/(li|ul|ol)>)+)<\/del>((
  • .*?<\/li>)*)\1<\/ins>/i, + (_whole: string, ending: string, _e1: string, _e2: string, insertedLis: string, _e3: string) => + insertedLis + ending + ); + + //
        • Ebene 4
    Ebene 5
+ // =>
      • Ebene 4Ebene 5
+ diffUnnormalized = diffUnnormalized.replace( + /([^<>]*)((<\/(li|ul|ol)>)+)<\/del>([^<>]*)\2<\/ins>/i, + (_whole, del, end, _ul, _u2, ins) => `` + del + `` + ins + `` + end + ); + let diff: string; if (this.diffDetectBrokenDiffHtml(diffUnnormalized)) { diff = this.diffParagraphs(htmlOld, htmlNew, lineLength!, firstLineNumber!); From a8fd2e116b2d9ceb634f45227ff8124da1db94b1 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Mon, 8 May 2023 10:33:38 +0200 Subject: [PATCH 06/17] fix high cpu load on motion create (#2239) --- .../agenda-content-object-form.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/agenda-content-object-form/components/agenda-content-object-form/agenda-content-object-form.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/agenda-content-object-form/components/agenda-content-object-form/agenda-content-object-form.component.ts index 3d43c1bd83..3a729bca04 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/agenda-content-object-form/components/agenda-content-object-form/agenda-content-object-form.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/agenda-content-object-form/components/agenda-content-object-form/agenda-content-object-form.component.ts @@ -27,7 +27,7 @@ export class AgendaContentObjectFormComponent } public get itemObserver(): Observable { - return this._itemsSubject.asObservable(); + return this._itemsSubject; } public permission = Permission; From fb84988e374b45667c12de9d893ea70e96662fb6 Mon Sep 17 00:00:00 2001 From: jsangmeister <33004050+jsangmeister@users.noreply.github.com> Date: Mon, 8 May 2023 17:38:36 +0200 Subject: [PATCH 07/17] Rename fields (#2245) --- .../definitions/meeting-settings-defaults.ts | 4 ++-- client/src/app/domain/models/meetings/meeting.ts | 14 +++++++------- client/src/app/domain/models/users/user.ts | 4 ++-- .../repositories/users/user-repository.service.ts | 2 +- .../user-detail-view/user-detail-view.component.ts | 2 +- .../topic-poll/services/topic-poll.service.ts | 2 +- .../services/assignment-poll.service.ts | 2 +- .../motion-poll.service/motion-poll.service.ts | 2 +- .../participant-detail-view.component.html | 4 ++-- .../participant-list.component.html | 4 ++-- .../participant-list-filter.service.ts | 2 +- .../participant-list-sort.service.ts | 2 +- .../meeting-settings-definitions.ts | 4 ++-- .../site/pages/meetings/view-models/view-user.ts | 4 ++-- .../account-detail/account-detail.component.html | 4 ++-- .../account-list/account-list.component.html | 4 ++-- .../account-sort.service.ts | 2 +- .../services/common/account-filter.service.ts | 2 +- 18 files changed, 32 insertions(+), 32 deletions(-) diff --git a/client/src/app/domain/definitions/meeting-settings-defaults.ts b/client/src/app/domain/definitions/meeting-settings-defaults.ts index 110affd292..1021586ef9 100644 --- a/client/src/app/domain/definitions/meeting-settings-defaults.ts +++ b/client/src/app/domain/definitions/meeting-settings-defaults.ts @@ -58,7 +58,7 @@ export const meetingSettingsDefaults: { [key: string]: any } = { motions_supporters_min_amount: 0, motions_block_slide_columns: 3, motion_poll_default_type: `pseudoanonymous`, - motion_poll_default_100_percent_base: `YNA`, + motion_poll_default_onehundred_percent_base: `YNA`, motion_poll_ballot_paper_selection: `CUSTOM_NUMBER`, motion_poll_ballot_paper_number: 8, motion_poll_default_backend: `fast`, @@ -67,7 +67,7 @@ export const meetingSettingsDefaults: { [key: string]: any } = { motions_export_follow_recommendation: false, assignment_poll_default_method: `Y`, assignment_poll_default_type: `pseudoanonymous`, - assignment_poll_default_100_percent_base: `valid`, + assignment_poll_default_onehundred_percent_base: `valid`, assignment_poll_sort_poll_result_by_votes: true, assignment_poll_add_candidates_to_list_of_speakers: false, assignment_poll_enable_max_votes_per_option: false, diff --git a/client/src/app/domain/models/meetings/meeting.ts b/client/src/app/domain/models/meetings/meeting.ts index 4781885960..d4593c3ad1 100644 --- a/client/src/app/domain/models/meetings/meeting.ts +++ b/client/src/app/domain/models/meetings/meeting.ts @@ -141,7 +141,7 @@ export class Settings { public motion_poll_ballot_paper_selection!: BallotPaperSelection; public motion_poll_ballot_paper_number!: number; public motion_poll_default_type!: PollType; - public motion_poll_default_100_percent_base!: PollPercentBase; + public motion_poll_default_onehundred_percent_base!: PollPercentBase; public motion_poll_default_group_ids!: Id[]; // (group/used_as_motion_poll_default_id)[]; public motion_poll_default_backend!: PollBackendDurationType; @@ -171,7 +171,7 @@ export class Settings { public assignment_poll_sort_poll_result_by_votes!: boolean; public assignment_poll_default_type!: PollType; public assignment_poll_default_method!: PollMethod; - public assignment_poll_default_100_percent_base!: PollPercentBase; + public assignment_poll_default_onehundred_percent_base!: PollPercentBase; public assignment_poll_default_group_ids!: Id[]; // (group/used_as_assignment_poll_default_id)[]; public assignment_poll_default_backend!: PollBackendDurationType; @@ -183,7 +183,7 @@ export class Settings { topic_poll_sort_poll_result_by_votes: boolean; topic_poll_default_type: PollType; topic_poll_default_method: PollMethod; - topic_poll_default_100_percent_base: PollPercentBase; + topic_poll_default_onehundred_percent_base: PollPercentBase; topic_poll_default_group_ids: Id[]; // (group/used_as_poll_default_id)[]; topic_poll_default_backend: PollBackendDurationType; @@ -195,7 +195,7 @@ export class Settings { poll_sort_poll_result_by_votes: boolean; poll_default_type: PollType; poll_default_method: PollMethod; - poll_default_100_percent_base: PollPercentBase; + poll_default_onehundred_percent_base: PollPercentBase; poll_default_group_ids: Id[]; // (group/used_as_poll_default_id)[]; poll_default_backend: PollBackendDurationType; } @@ -378,7 +378,7 @@ export class Meeting extends BaseModel { `motion_poll_ballot_paper_selection`, `motion_poll_ballot_paper_number`, `motion_poll_default_type`, - `motion_poll_default_100_percent_base`, + `motion_poll_default_onehundred_percent_base`, `motion_poll_default_group_ids`, `motion_poll_default_backend`, `poll_candidate_list_ids`, @@ -405,7 +405,7 @@ export class Meeting extends BaseModel { `assignment_poll_sort_poll_result_by_votes`, `assignment_poll_default_type`, `assignment_poll_default_method`, - `assignment_poll_default_100_percent_base`, + `assignment_poll_default_onehundred_percent_base`, `assignment_poll_default_group_ids`, `assignment_poll_default_backend`, `poll_ballot_paper_selection`, @@ -413,7 +413,7 @@ export class Meeting extends BaseModel { `poll_sort_poll_result_by_votes`, `poll_default_type`, `poll_default_method`, - `poll_default_100_percent_base`, + `poll_default_onehundred_percent_base`, `poll_default_group_ids`, `poll_default_backend`, `topic_poll_default_group_ids`, diff --git a/client/src/app/domain/models/users/user.ts b/client/src/app/domain/models/users/user.ts index fc90829b50..32562fea5a 100644 --- a/client/src/app/domain/models/users/user.ts +++ b/client/src/app/domain/models/users/user.ts @@ -37,7 +37,7 @@ export class User extends BaseDecimalModel { public readonly default_structure_level!: string; public readonly structure_level_$!: string[]; public readonly email!: string; - public readonly last_email_send!: number; // comes in seconds + public readonly last_email_sent!: number; // comes in seconds public readonly last_login!: number; // comes in seconds public readonly vote_weight_$!: number[]; public readonly default_vote_weight!: number; @@ -193,7 +193,7 @@ export class User extends BaseDecimalModel { `default_number`, `default_structure_level`, `default_vote_weight`, - `last_email_send`, + `last_email_sent`, `is_demo_user`, `last_login`, `organization_management_level`, diff --git a/client/src/app/gateways/repositories/users/user-repository.service.ts b/client/src/app/gateways/repositories/users/user-repository.service.ts index 40eeb17063..36b942d250 100644 --- a/client/src/app/gateways/repositories/users/user-repository.service.ts +++ b/client/src/app/gateways/repositories/users/user-repository.service.ts @@ -95,7 +95,7 @@ export class UserRepositoryService extends BaseRepository { const filterableListFields: TypedFieldset = listFields.concat([ `email`, - `last_email_send`, + `last_email_sent`, `last_login`, `organization_management_level` ]); diff --git a/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts b/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts index fb0783ae14..820eb391c9 100644 --- a/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts +++ b/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts @@ -264,7 +264,7 @@ export class UserDetailViewComponent extends BaseUiComponent implements OnInit, last_name: [``], gender: [``], email: [``], - last_email_send: [``], + last_email_sent: [``], default_password: [``], is_active: [true], is_physical_person: [true], diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/services/topic-poll.service.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/services/topic-poll.service.ts index e545da0807..65c7e41a11 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/services/topic-poll.service.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/services/topic-poll.service.ts @@ -49,7 +49,7 @@ export class TopicPollService extends PollService { ) { super(organizationSettingsService, translate, pollKeyVerbose, parsePollNumber, themeService); this.meetingSettingsService - .get(`topic_poll_default_100_percent_base`) + .get(`topic_poll_default_onehundred_percent_base`) .subscribe(base => (this.defaultPercentBase = base ?? PollPercentBase.Y)); this.meetingSettingsService diff --git a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts index c8b106cf0b..8dd801af18 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts @@ -53,7 +53,7 @@ export class AssignmentPollService extends PollService { super(organizationSettingsService, translate, pollKeyVerbose, parsePollNumber, themeService); pollServiceMapper.registerService(ViewAssignment.COLLECTION, this); this.meetingSettingsService - .get(`assignment_poll_default_100_percent_base`) + .get(`assignment_poll_default_onehundred_percent_base`) .subscribe(base => (this.defaultPercentBase = base)); this.meetingSettingsService .get(`assignment_poll_default_group_ids`) diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/services/motion-poll.service/motion-poll.service.ts b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/services/motion-poll.service/motion-poll.service.ts index a6cd94f8d9..c4f5156d1a 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/services/motion-poll.service/motion-poll.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/services/motion-poll.service/motion-poll.service.ts @@ -55,7 +55,7 @@ export class MotionPollService extends PollService { ) { super(organizationSettingsService, translate, pollKeyVerbose, parsePollNumber, themeService); this.meetingSettingsService - .get(`motion_poll_default_100_percent_base`) + .get(`motion_poll_default_onehundred_percent_base`) .subscribe(base => (this.defaultPercentBase = base)); this.meetingSettingsService.get(`motion_poll_default_type`).subscribe(type => (this.defaultPollType = type)); this.meetingSettingsService.get(`motion_poll_default_group_ids`).subscribe(ids => (this.defaultGroupIds = ids)); diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html index d183c136d5..ac07b22588 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html @@ -186,10 +186,10 @@

{{ 'About me' | translate }}

{{ 'Meeting specific information' | translate }}

-
+

{{ 'Last email sent' | translate }}

- {{ user.last_email_send | localizedDate }} + {{ user.last_email_sent | localizedDate }}
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 e8c0d12ed9..c93be0e0eb 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 @@ -106,8 +106,8 @@

{{ 'Participants' | translate }}

mail diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter.service/participant-list-filter.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter.service/participant-list-filter.service.ts index f939c48dc7..b2497e267e 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter.service/participant-list-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter.service/participant-list-filter.service.ts @@ -75,7 +75,7 @@ export class ParticipantListFilterService extends BaseMeetingFilterListService { { property: `structure_level`, label: _(`Structure level`) }, { property: `voteWeight`, label: _(`Vote weight`) }, { property: `comment` }, - { property: `last_email_send`, label: _(`Last email sent`) }, + { property: `last_email_sent`, label: _(`Last email sent`) }, { property: `last_login`, label: _(`Last login`) } ]; diff --git a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts index 189f148d7d..047700c8fc 100644 --- a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts +++ b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts @@ -627,7 +627,7 @@ export const meetingSettings: SettingsGroup[] = fillInSettingsDefaults([ } }, { - key: `motion_poll_default_100_percent_base`, + key: `motion_poll_default_onehundred_percent_base`, label: _(`Default 100 % base of a voting result`), type: `choice`, choices: PollPercentBaseVerbose @@ -727,7 +727,7 @@ export const meetingSettings: SettingsGroup[] = fillInSettingsDefaults([ } }, { - key: `assignment_poll_default_100_percent_base`, + key: `assignment_poll_default_onehundred_percent_base`, label: _(`Default 100 % base of an election result`), type: `choice`, choices: PollPercentBaseVerbose diff --git a/client/src/app/site/pages/meetings/view-models/view-user.ts b/client/src/app/site/pages/meetings/view-models/view-user.ts index 27ddb02d8f..35584a6b45 100644 --- a/client/src/app/site/pages/meetings/view-models/view-user.ts +++ b/client/src/app/site/pages/meetings/view-models/view-user.ts @@ -35,8 +35,8 @@ export class ViewUser extends BaseViewModel /* implements Searchable */ { return this._model; } - public get isLastEmailSend(): boolean { - return !!this.last_email_send; + public get isLastEmailSent(): boolean { + return !!this.last_email_sent; } public get isLastLogin(): boolean { diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.html b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.html index ccd5991102..3513717c67 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.html +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.html @@ -130,10 +130,10 @@

{{ 'Administration roles (at organization level)' | translate }}

{{ getOmlVerboseName(user.organization_management_level) | translate }}
-
+

{{ 'Last email sent' | translate }}

- {{ user.last_email_send | localizedDate }} + {{ user.last_email_sent | localizedDate }}
diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html index 548ab050c3..21ecc359aa 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.html @@ -76,8 +76,8 @@

{{ 'Accounts' | translate }}

diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts index 4ab6b54379..c51f211ac3 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts @@ -24,7 +24,7 @@ export class AccountSortService extends BaseSortListService { { property: `gender`, label: _(`Gender`) }, { property: `id`, label: _(`Sequential number`) }, { property: `numberOfMeetings`, label: _(`Amount of meetings`) }, - { property: `last_email_send`, label: _(`Last email sent`) }, + { property: `last_email_sent`, label: _(`Last email sent`) }, { property: `last_login`, label: _(`Last login`) } ]; diff --git a/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts b/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts index 8d7b3ce446..fcb0f0d335 100644 --- a/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts @@ -101,7 +101,7 @@ export class AccountFilterService extends BaseFilterListService { ] }, { - property: `isLastEmailSend`, + property: `isLastEmailSent`, label: this.translate.instant(`Last email sent`), options: [ { condition: true, label: this.translate.instant(`Got an email`) }, From df51e4397b1d46bd92d9a4d56848a7df8d5f0967 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Mon, 8 May 2023 22:44:04 +0200 Subject: [PATCH 08/17] apply change recommendations to motion title on forward (#2264) --- .../motion-format.service.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts index 44fda79e29..f96610fcfe 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/common/motion-format.service/motion-format.service.ts @@ -121,12 +121,25 @@ export class MotionFormatService { return { origin_id: motion.id, - title: motion.title, + title: this.getFinalTitle(motion, lineLength), reason: motion.reason || ``, text: textWithoutLines }; } + private getFinalTitle(motion: ViewMotion, lineLength: number): string { + const titleChange = this.getUnifiedChanges(motion, lineLength).find((obj: ViewUnifiedChange) => + obj.isTitleChange() + )!; + const crMode = !!motion.modified_final_version ? ChangeRecoMode.ModifiedFinal : ChangeRecoMode.Final; + + if (titleChange) { + return this.changeRecoRepo.getTitleWithChanges(motion.title, titleChange, crMode); + } + + return motion.title; + } + /** * returns the most recent motion text version: Either the modified final version (if present) * otherwise final version From c5c2ba15b6f8cf75f57b489bbae2d0728b3d2b21 Mon Sep 17 00:00:00 2001 From: jsangmeister <33004050+jsangmeister@users.noreply.github.com> Date: Wed, 10 May 2023 09:08:44 +0200 Subject: [PATCH 09/17] Remove commit message guide from README (#2268) --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 104eebf8e8..b3fafc9f41 100644 --- a/README.md +++ b/README.md @@ -65,15 +65,7 @@ Generally, please work in your own fork, make branches and make a pull request i ## Commit messages -Write your commit messages like they could appear in a change log. - -- Separate subject from body with a blank line -- Limit the subject line to 50 characters -- Capitalize the subject line -- Do not end the subject line with a period -- Use the imperative mood in the subject line -- Wrap the body at 72 characters -- Use the body to explain what and why vs. how +See https://github.com/OpenSlides/OpenSlides/wiki/Development-organization#pull-request-titles-and-commit-messages. ## Code alignment From f2bca37db707d9b667115a7b11133446b377dade Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 10 May 2023 21:09:04 +0200 Subject: [PATCH 10/17] amendment list pdf export with nested lists fix (#2269) --- .../html-to-pdf.service/html-to-pdf.service.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/client/src/app/gateways/export/html-to-pdf.service/html-to-pdf.service.ts b/client/src/app/gateways/export/html-to-pdf.service/html-to-pdf.service.ts index 2a5bc547aa..20678bb7fb 100644 --- a/client/src/app/gateways/export/html-to-pdf.service/html-to-pdf.service.ts +++ b/client/src/app/gateways/export/html-to-pdf.service/html-to-pdf.service.ts @@ -309,9 +309,19 @@ export class HtmlToPdfService { * Can be overwritten by subclasses for more specific functionality. */ protected createListParagraph(data: CreateSpecificParagraphPayload): any { - const children = this.parseChildren(data.element, data.styles); + let children = this.parseChildren(data.element, data.styles); const list = this.create(data.nodeName); + // Fixes nested lists being placed inside `text` elements + if ( + children.length === 1 && + (children[0])?.text.length && + (children[0])?.text.find((el: any) => !!el.ul) + ) { + // @ts-ignore + children = [{ stack: (children[0]).text }]; + } + // keep the numbers of the ol list if (data.nodeName === `ol`) { const start = data.element.getAttribute(`start`); From 5bda6896206e1757b1496242161df32af91dfdef Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 10 May 2023 21:17:24 +0200 Subject: [PATCH 11/17] fix amendment change recos missing in pdf export (#2273) --- .../services/motion-export-dialog.service.ts | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/components/motion-export-dialog/services/motion-export-dialog.service.ts b/client/src/app/site/pages/meetings/pages/motions/components/motion-export-dialog/services/motion-export-dialog.service.ts index 216aaeec4e..ac8ca72fe7 100644 --- a/client/src/app/site/pages/meetings/pages/motions/components/motion-export-dialog/services/motion-export-dialog.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/components/motion-export-dialog/services/motion-export-dialog.service.ts @@ -7,6 +7,8 @@ import { ModelRequestService } from 'src/app/site/services/model-request.service import { BaseDialogService } from 'src/app/ui/base/base-dialog-service'; import { getMotionDetailSubscriptionConfig } from '../../../motions.subscription'; +import { AmendmentControllerService } from '../../../services/common/amendment-controller.service'; +import { MotionLineNumberingService } from '../../../services/common/motion-line-numbering.service'; import { MotionExportInfo } from '../../../services/export/motion-export.service'; import { MotionExportService } from '../../../services/export/motion-export.service'; import { ViewMotion } from '../../../view-models'; @@ -25,7 +27,9 @@ export class MotionExportDialogService extends BaseDialogService< dialog: MatDialog, private exportService: MotionExportService, private modelRequestService: ModelRequestService, - private motionRepo: MotionRepositoryService + private motionRepo: MotionRepositoryService, + private amendmentRepo: AmendmentControllerService, + private motionLineNumbering: MotionLineNumberingService ) { super(dialog); } @@ -38,12 +42,19 @@ export class MotionExportDialogService extends BaseDialogService< public async export(motions: ViewMotion[]): Promise { const dialogRef = await this.open(motions); const exportInfo = await firstValueFrom(dialogRef.afterClosed()); + if (exportInfo) { await this.modelRequestService.fetch(getMotionDetailSubscriptionConfig(...motions.map(m => m.id))); - this.exportService.evaluateExportRequest( - exportInfo, - motions.map(m => this.motionRepo.getViewModel(m.id)) - ); + const amendments = this.amendmentRepo.getViewModelList(); + this.motionLineNumbering.resetAmendmentChangeRecoListeners(amendments); + + // The timeout is needed for the repos to update their view model list subjects + setTimeout(() => { + this.exportService.evaluateExportRequest( + exportInfo, + motions.map(m => this.motionRepo.getViewModel(m.id)) + ); + }, 2000); } } } From 3ce9e3e8578fdc3845755a4dd0be58fc535cfdd5 Mon Sep 17 00:00:00 2001 From: luisa-beerboom <101706784+luisa-beerboom@users.noreply.github.com> Date: Wed, 10 May 2023 21:20:59 +0200 Subject: [PATCH 12/17] Add maxLength 32 to pronoun inputs (#2275) --- .../components/user-detail-view/user-detail-view.component.html | 1 + .../components/user-detail-view/user-detail-view.component.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.html b/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.html index 6f203c1a37..687889e25f 100644 --- a/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.html +++ b/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.html @@ -85,6 +85,7 @@

{{ 'Personal information' | translate }}

+ {{ 'Pronoun can only have 32 letters' | translate }} diff --git a/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts b/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts index 820eb391c9..696fe624ca 100644 --- a/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts +++ b/client/src/app/site/modules/user-components/components/user-detail-view/user-detail-view.component.ts @@ -258,7 +258,7 @@ export class UserDetailViewComponent extends BaseUiComponent implements OnInit, this.personalInfoForm = this.fb.group( { username: [``, this.isNewUser ? [] : [Validators.required]], - pronoun: [``], + pronoun: [``, Validators.maxLength(32)], title: [``], first_name: [``], last_name: [``], From cb23557c6ea47a168581285964c61141b051a56f Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Thu, 11 May 2023 10:14:05 +0200 Subject: [PATCH 13/17] set autopilot min height (#2237) * set autopilot min height * move headbar into global headbar * update page navigation an site wrapper --- .../global-headbar.component.html | 2 + .../global-headbar.component.ts | 8 +- .../global-headbar/global-headbar.module.ts | 4 +- .../global-headbar/global-headbar.service.ts | 15 ++ .../site-wrapper/site-wrapper.component.scss | 1 + ...meetings-navigation-wrapper.component.html | 10 +- .../autopilot/autopilot.component.scss | 4 + ...nization-navigation-wrapper.component.scss | 2 +- .../head-bar/head-bar.component.html | 170 +++++++++--------- .../components/head-bar/head-bar.component.ts | 27 ++- .../components/sidenav/sidenav.component.html | 92 +++++----- .../components/sidenav/sidenav.component.scss | 24 ++- .../components/sidenav/sidenav.component.ts | 28 ++- 13 files changed, 243 insertions(+), 144 deletions(-) create mode 100644 client/src/app/site/modules/global-headbar/global-headbar.service.ts diff --git a/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.html b/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.html index eeda1d464a..522063dcb4 100644 --- a/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.html +++ b/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.html @@ -12,3 +12,5 @@
+ + diff --git a/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.ts b/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.ts index c97569889c..335bc3aa10 100644 --- a/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.ts +++ b/client/src/app/site/modules/global-headbar/components/global-headbar/global-headbar.component.ts @@ -2,6 +2,8 @@ import { Component } from '@angular/core'; import { ActiveMeetingService } from 'src/app/site/pages/meetings/services/active-meeting.service'; import { OrganizationService } from 'src/app/site/pages/organization/services/organization.service'; +import { GlobalHeadbarService } from '../../global-headbar.service'; + @Component({ selector: `os-global-headbar`, templateUrl: `./global-headbar.component.html`, @@ -20,7 +22,11 @@ export class GlobalHeadbarComponent { return ``; } - public constructor(private activeMeeting: ActiveMeetingService, private orgaService: OrganizationService) {} + public constructor( + private activeMeeting: ActiveMeetingService, + private orgaService: OrganizationService, + public headbarService: GlobalHeadbarService + ) {} public openSearch(): void {} } diff --git a/client/src/app/site/modules/global-headbar/global-headbar.module.ts b/client/src/app/site/modules/global-headbar/global-headbar.module.ts index 6717398011..5fb7ffaf7a 100644 --- a/client/src/app/site/modules/global-headbar/global-headbar.module.ts +++ b/client/src/app/site/modules/global-headbar/global-headbar.module.ts @@ -1,3 +1,4 @@ +import { PortalModule } from '@angular/cdk/portal'; import { ScrollingModule } from '@angular/cdk/scrolling'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; @@ -26,7 +27,8 @@ const MODULES = [ MatDividerModule, MatMenuModule, MatTooltipModule, - MatDialogModule + MatDialogModule, + PortalModule ]; const DECLARATIONS = [GlobalHeadbarComponent]; diff --git a/client/src/app/site/modules/global-headbar/global-headbar.service.ts b/client/src/app/site/modules/global-headbar/global-headbar.service.ts new file mode 100644 index 0000000000..1cfb1922f4 --- /dev/null +++ b/client/src/app/site/modules/global-headbar/global-headbar.service.ts @@ -0,0 +1,15 @@ +import { TemplatePortal } from '@angular/cdk/portal'; +import { Injectable } from '@angular/core'; + +@Injectable({ providedIn: `root` }) +export class GlobalHeadbarService { + private _headbar: TemplatePortal = null; + + public get headbar() { + return this._headbar; + } + + public set headbar(portal: TemplatePortal) { + this._headbar = portal; + } +} diff --git a/client/src/app/site/modules/site-wrapper/components/site-wrapper/site-wrapper.component.scss b/client/src/app/site/modules/site-wrapper/components/site-wrapper/site-wrapper.component.scss index 9aa9b5836d..dfb2826a4e 100644 --- a/client/src/app/site/modules/site-wrapper/components/site-wrapper/site-wrapper.component.scss +++ b/client/src/app/site/modules/site-wrapper/components/site-wrapper/site-wrapper.component.scss @@ -9,5 +9,6 @@ .os-router-outlet-container { flex-grow: 1; + overflow: auto; } } diff --git a/client/src/app/site/pages/meetings/modules/meetings-navigation/components/meetings-navigation-wrapper/meetings-navigation-wrapper.component.html b/client/src/app/site/pages/meetings/modules/meetings-navigation/components/meetings-navigation-wrapper/meetings-navigation-wrapper.component.html index e6d4ad5147..7d7e8f1817 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-navigation/components/meetings-navigation-wrapper/meetings-navigation-wrapper.component.html +++ b/client/src/app/site/pages/meetings/modules/meetings-navigation/components/meetings-navigation-wrapper/meetings-navigation-wrapper.component.html @@ -59,14 +59,8 @@
-
-
- -
- -
-
-
+ +
diff --git a/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss b/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss index de49c55d6e..9016b498c5 100644 --- a/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss +++ b/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss @@ -1,3 +1,7 @@ .projector { border: 1px solid #d3d3d3; } + +.content-container { + min-height: calc(100vh - 77px); +} diff --git a/client/src/app/site/pages/organization/modules/navigation/organization-navigation-wrapper/organization-navigation-wrapper.component.scss b/client/src/app/site/pages/organization/modules/navigation/organization-navigation-wrapper/organization-navigation-wrapper.component.scss index 8136bcebcd..a8181f2818 100644 --- a/client/src/app/site/pages/organization/modules/navigation/organization-navigation-wrapper/organization-navigation-wrapper.component.scss +++ b/client/src/app/site/pages/organization/modules/navigation/organization-navigation-wrapper/organization-navigation-wrapper.component.scss @@ -1,5 +1,5 @@ .scrollable-content { - height: calc(100% - var(--global-headbar-height)); + height: 100%; width: 100%; overflow: auto; } diff --git a/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.html b/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.html index e408bd1830..16319ca007 100644 --- a/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.html +++ b/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.html @@ -1,100 +1,102 @@ - -
- - - - + + +
+ + + + + + + + - - - - - - - - -
- - +
+ + +
-
- -
-
- -
-
+ +
+
+ +
+
-
- - +
+ + - - + + - - + + - - -
- + + +
+
- -
- -
-
- - - + +
+ +
+
+ + + - + - + - - - + + + +
diff --git a/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.ts b/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.ts index ce51b470ec..299a64d42d 100644 --- a/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.ts +++ b/client/src/app/ui/modules/head-bar/components/head-bar/head-bar.component.ts @@ -1,6 +1,19 @@ -import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core'; +import { TemplatePortal } from '@angular/cdk/portal'; +import { + AfterViewInit, + Component, + EventEmitter, + Input, + OnInit, + Output, + TemplateRef, + ViewChild, + ViewContainerRef, + ViewEncapsulation +} from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; import { BehaviorSubject, Observable } from 'rxjs'; +import { GlobalHeadbarService } from 'src/app/site/modules/global-headbar/global-headbar.service'; import { MainMenuService } from '../../../../../site/pages/meetings/services/main-menu.service'; import { ViewPortService } from '../../../../../site/services/view-port.service'; @@ -59,7 +72,7 @@ export const HEAD_BAR_HEIGHT = 50; // height of the head-bar in px. styleUrls: [`./head-bar.component.scss`], encapsulation: ViewEncapsulation.None }) -export class HeadBarComponent implements OnInit { +export class HeadBarComponent implements OnInit, AfterViewInit { /** * Determine if the the navigation "hamburger" icon should be displayed in mobile mode */ @@ -98,6 +111,8 @@ export class HeadBarComponent implements OnInit { this._isSaveButtonEnabled = value || false; } + @ViewChild(`headbarContent`) headbarContent: TemplateRef; + public get isSaveButtonEnabled(): boolean { return this._isSaveButtonEnabled; } @@ -198,7 +213,9 @@ export class HeadBarComponent implements OnInit { private menu: MainMenuService, private router: Router, private route: ActivatedRoute, - private routingState: RoutingStateService + private routingState: RoutingStateService, + private headbarService: GlobalHeadbarService, + private _viewContainerRef: ViewContainerRef ) {} /** @@ -208,6 +225,10 @@ export class HeadBarComponent implements OnInit { this.isCancelEditUsed = this.cancelEditEvent.observers.length > 0; } + public ngAfterViewInit(): void { + this.headbarService.headbar = new TemplatePortal(this.headbarContent, this._viewContainerRef); + } + /** * Emits a signal to the parent if */ diff --git a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html index fe5e5c2b92..63a871b0af 100644 --- a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html +++ b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html @@ -3,63 +3,36 @@ (backdropClick)="toggle()" osSwipe swipeConstraints="left" - (swipeRight)="sideNav.open()" + (swipeRight)="open()" (swipeLeft)="mobileAutoCloseNav()" > - + - +
+ +
+ +
+
- + + + + + diff --git a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.scss b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.scss index b4c9eea93f..043b9cd020 100644 --- a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.scss +++ b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.scss @@ -13,6 +13,20 @@ } } +.main-content-wrapper { + display: flex; + flex: 1 1 auto; + .navigation { + position: sticky; + flex: 1 0 auto; + background: white; + } + .content { + width: 100%; + overflow: auto; + } +} + .nav-toolbar-flex-container { display: flex; flex-direction: column; @@ -53,17 +67,23 @@ mat-sidenav-container { height: 100%; width: 100%; - mat-sidenav.side-panel { + mat-sidenav-content { + display: flex; + } + + mat-sidenav.side-panel, + .main-content-wrapper .navigation { border: 0; box-shadow: 3px 0px 10px 0px rgba(0, 0, 0, 0.2); width: 260px; overflow-x: hidden; + z-index: 3; } } // CSS for the toggle button .nav-toggle-button-container { - position: absolute; + position: sticky; z-index: 99; bottom: 24px; & > div { diff --git a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.ts b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.ts index 8a4f12b93a..039ed09964 100644 --- a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.ts +++ b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.ts @@ -17,24 +17,38 @@ export class SidenavComponent { @ContentChild(SidenavDrawerContentDirective, { read: TemplateRef, static: true }) public drawerContent: TemplateRef | null = null; - @ViewChild(`sideNav`, { static: true, read: MatSidenav }) + @ViewChild(`sideNav`, { read: MatSidenav }) private sideNav: MatSidenav | undefined; @Input() public logoLink = [``]; + private desktopOpen = true; + public get isMobile(): boolean { return this.vp.isMobile; } + public get isOpen(): boolean { + return this.isMobile ? this.sideNav?.opened : this.desktopOpen; + } + public constructor(private vp: ViewPortService) {} public close(): void { - this.sideNav?.close(); + if (this.isMobile) { + this.sideNav?.close(); + } else { + this.desktopOpen = false; + } } public toggle(): void { - this.sideNav?.toggle(); + if (this.isMobile) { + this.sideNav?.toggle(); + } else { + this.desktopOpen = !this.desktopOpen; + } } public mobileAutoCloseNav(): void { @@ -42,4 +56,12 @@ export class SidenavComponent { this.sideNav.close(); } } + + public open(): void { + if (this.isMobile) { + this.sideNav?.open(); + } else { + this.desktopOpen = true; + } + } } From c7247800d3e615e51934f052d11d0c6e040ae1ca Mon Sep 17 00:00:00 2001 From: luisa-beerboom <101706784+luisa-beerboom@users.noreply.github.com> Date: Fri, 12 May 2023 08:53:20 +0200 Subject: [PATCH 14/17] Fixed darkmode sidebar background (#2284) --- .../modules/sidenav/components/sidenav/sidenav.component.html | 2 +- .../modules/sidenav/components/sidenav/sidenav.component.scss | 1 - client/src/assets/styles/global-components-style.scss | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html index 63a871b0af..c54a1b241f 100644 --- a/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html +++ b/client/src/app/ui/modules/sidenav/components/sidenav/sidenav.component.html @@ -22,7 +22,7 @@ [ngTemplateOutlet]="sideNavToggleButton" >
-