From f27898ac17aa52143e3f29cbf072d65e4a04fdfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 15 Dec 2020 14:36:43 +0200 Subject: [PATCH 1/4] UI updates --- .../icon-button/icon-button.component.scss | 4 ++++ .../dictionary-overview-screen.component.scss | 2 +- .../watermark-screen.component.html | 13 +++++++++---- .../project-overview-screen.component.html | 2 +- apps/red-ui/src/assets/styles/red-button.scss | 19 ++++++++++++++----- apps/red-ui/src/assets/styles/red-input.scss | 1 + .../src/assets/styles/red-page-layout.scss | 2 +- 7 files changed, 31 insertions(+), 12 deletions(-) diff --git a/apps/red-ui/src/app/components/buttons/icon-button/icon-button.component.scss b/apps/red-ui/src/app/components/buttons/icon-button/icon-button.component.scss index 8f44b4566..5f4c4a311 100644 --- a/apps/red-ui/src/app/components/buttons/icon-button/icon-button.component.scss +++ b/apps/red-ui/src/app/components/buttons/icon-button/icon-button.component.scss @@ -5,6 +5,10 @@ button { &.show-bg { background-color: $grey-6; + + &:not(.mat-button-disabled):hover { + background-color: $grey-4; + } } mat-icon { diff --git a/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.scss b/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.scss index 035108650..28ba1375a 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.scss +++ b/apps/red-ui/src/app/screens/admin/dictionary-overview-screen/dictionary-overview-screen.component.scss @@ -45,7 +45,7 @@ .red-input-group { margin-bottom: 16px; - max-width: 450px; + max-width: 300px; input { padding-right: 32px; diff --git a/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html b/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html index 23418b272..c6c53324b 100644 --- a/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html +++ b/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html @@ -71,11 +71,16 @@
- + -
+
diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html index 5dd77925d..44dd459fa 100644 --- a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html +++ b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.html @@ -95,7 +95,7 @@
-
+
diff --git a/apps/red-ui/src/assets/styles/red-button.scss b/apps/red-ui/src/assets/styles/red-button.scss index 008154754..b80c936c2 100644 --- a/apps/red-ui/src/assets/styles/red-button.scss +++ b/apps/red-ui/src/assets/styles/red-button.scss @@ -13,6 +13,7 @@ display: flex; align-items: center; line-height: 34px; + transition: opacity 0.2s; > *:not(last-child) { margin-right: 6px; @@ -20,17 +21,25 @@ } &.mat-button-disabled { - background-color: $grey-6 !important; + .mat-button-wrapper { + opacity: 0.3; + } } } -.cdk-program-focused .mat-button-focus-overlay { +.mat-button-focus-overlay { opacity: 0 !important; } -.mat-flat-button.mat-primary.red-button { +.mat-flat-button.mat-primary { padding: 0 14px; - transition: background-color 0.2s; + transition: background-color 0.2s, color 0.2s; + background-color: $red-1; + + &.mat-button-disabled { + background-color: $red-1; + color: rgba($white, 0.5); + } &:not(.mat-button-disabled):hover { background-color: $red-2; @@ -42,10 +51,10 @@ redaction-chevron-button, redaction-circle-button { position: relative; display: flex; - transition: background-color 0.2s; button { font-weight: 400 !important; + transition: background-color 0.2s; &.overlay { background: rgba($primary, 0.1); diff --git a/apps/red-ui/src/assets/styles/red-input.scss b/apps/red-ui/src/assets/styles/red-input.scss index 99314813d..46873f1a7 100644 --- a/apps/red-ui/src/assets/styles/red-input.scss +++ b/apps/red-ui/src/assets/styles/red-input.scss @@ -173,6 +173,7 @@ .mat-datepicker-input { margin-top: 0; + width: 120px; } .mat-datepicker-toggle { diff --git a/apps/red-ui/src/assets/styles/red-page-layout.scss b/apps/red-ui/src/assets/styles/red-page-layout.scss index 9267eff66..c5e4d2fa1 100644 --- a/apps/red-ui/src/assets/styles/red-page-layout.scss +++ b/apps/red-ui/src/assets/styles/red-page-layout.scss @@ -82,7 +82,7 @@ body { height: 4px; } - .no-data { + .empty-state { display: flex; flex-direction: column; align-items: center; From 76ea03549139b5be7a14ded0650ed7d3aa4f5565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 15 Dec 2020 15:55:22 +0200 Subject: [PATCH 2/4] UI updates --- .../app/components/comments/comments.component.html | 2 +- .../add-edit-project-dialog.component.html | 10 +++------- .../assign-owner-dialog.component.html | 2 +- .../confirmation-dialog.component.html | 4 ++-- .../manual-annotation-dialog.component.html | 4 +++- .../add-edit-dictionary-dialog.component.html | 4 +++- .../watermark-screen/watermark-screen.component.html | 11 +++-------- .../project-listing-details.component.scss | 7 +------ .../project-details/project-details.component.html | 6 +++--- .../project-details/project-details.component.scss | 4 ++-- apps/red-ui/src/assets/styles/red-button.scss | 6 +++++- 11 files changed, 27 insertions(+), 33 deletions(-) diff --git a/apps/red-ui/src/app/components/comments/comments.component.html b/apps/red-ui/src/app/components/comments/comments.component.html index 12854b686..e1faa0d7b 100644 --- a/apps/red-ui/src/app/components/comments/comments.component.html +++ b/apps/red-ui/src/app/components/comments/comments.component.html @@ -30,7 +30,7 @@
- +
diff --git a/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html b/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html index fd0f49496..d96420c96 100644 --- a/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html +++ b/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html @@ -56,13 +56,9 @@
- +
- diff --git a/apps/red-ui/src/app/dialogs/confirmation-dialog/confirmation-dialog.component.html b/apps/red-ui/src/app/dialogs/confirmation-dialog/confirmation-dialog.component.html index b8eaf7cbf..310267be3 100644 --- a/apps/red-ui/src/app/dialogs/confirmation-dialog/confirmation-dialog.component.html +++ b/apps/red-ui/src/app/dialogs/confirmation-dialog/confirmation-dialog.component.html @@ -8,10 +8,10 @@
- -
diff --git a/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html b/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html index 2ac26d0e4..5f36ff807 100644 --- a/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html +++ b/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html @@ -47,7 +47,9 @@
- +
diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html index 45b1b5915..e46f46e53 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html @@ -61,7 +61,9 @@
- +
diff --git a/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html b/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html index c6c53324b..c3d720290 100644 --- a/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html +++ b/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html @@ -71,14 +71,9 @@
- +
diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-details/project-listing-details.component.scss b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-details/project-listing-details.component.scss index e74f5c002..05197f10b 100644 --- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-details/project-listing-details.component.scss +++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-details/project-listing-details.component.scss @@ -4,19 +4,14 @@ flex: 1; display: flex; flex-direction: row; - justify-content: space-between; + justify-content: space-evenly; > div { display: flex; - flex: 1; flex-direction: column; align-items: center; padding-top: 50px; - //&:first-child { - // border-right: 1px solid $separator; - //} - .project-stats-container { .project-stats-item { display: flex; diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.html b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.html index 9d1d92815..ca7fa8730 100644 --- a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.html +++ b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.html @@ -47,13 +47,13 @@ >
-
+
-
+
{{ 'project-overview.project-details.stats.documents' | translate: { count: appStateService.activeProject.files.length } }} @@ -86,7 +86,7 @@
-
+
{{ appStateService.activeProject.project.description }}
diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.scss b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.scss index 6512f227d..9b01c9835 100644 --- a/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.scss +++ b/apps/red-ui/src/app/screens/project-overview-screen/project-details/project-details.component.scss @@ -63,6 +63,6 @@ margin-top: 24px; } -.mt-32 { - margin-top: 32px; +.pb-32 { + padding-bottom: 32px; } diff --git a/apps/red-ui/src/assets/styles/red-button.scss b/apps/red-ui/src/assets/styles/red-button.scss index b80c936c2..c152790fe 100644 --- a/apps/red-ui/src/assets/styles/red-button.scss +++ b/apps/red-ui/src/assets/styles/red-button.scss @@ -38,7 +38,11 @@ &.mat-button-disabled { background-color: $red-1; - color: rgba($white, 0.5); + color: $white; + + > * { + opacity: 0.5; + } } &:not(.mat-button-disabled):hover { From 5990d5498b3a5152d80705208cddc98c34e3143c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Tue, 15 Dec 2020 17:49:11 +0200 Subject: [PATCH 3/4] Scroll fixes --- apps/red-ui/src/app/app.module.ts | 2 + .../add-edit-project-dialog.component.html | 3 +- .../add-edit-project-dialog.component.ts | 7 +- .../manual-annotation-dialog.component.html | 2 +- .../manual-annotation-dialog.component.ts | 6 -- .../dictionary-listing-screen.component.html | 2 +- .../dictionary-listing-screen.component.scss | 2 +- .../users/user-listing-screen.component.html | 2 +- .../users/user-listing-screen.component.scss | 2 +- .../watermark-screen.component.html | 3 +- .../watermark-screen.component.ts | 6 -- .../file-preview-screen.component.html | 73 ++++++++++--------- .../file-preview-screen.component.scss | 37 +++++++--- .../project-listing-screen.component.html | 38 +++++----- .../project-listing-screen.component.scss | 2 +- .../project-listing-screen.component.ts | 2 +- .../project-overview-screen.component.html | 2 +- .../project-overview-screen.component.scss | 10 ++- .../src/app/utils/has-scrollbar.directive.ts | 18 +++++ apps/red-ui/src/assets/styles/red-tables.scss | 35 +++++---- 20 files changed, 141 insertions(+), 113 deletions(-) create mode 100644 apps/red-ui/src/app/utils/has-scrollbar.directive.ts diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index fa74b8195..add4c23ae 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -97,6 +97,7 @@ import { PdfViewerScreenComponent } from './screens/pdf-viewer-screen/pdf-viewer import { HtmlDebugScreenComponent } from './screens/html-debug-screen/html-debug-screen.component'; import { ReportDownloadBtnComponent } from './components/buttons/report-download-btn/report-download-btn.component'; import { ProjectListingActionsComponent } from './screens/project-listing-screen/project-listing-actions/project-listing-actions.component'; +import { HasScrollbarDirective } from './utils/has-scrollbar.directive'; export function HttpLoaderFactory(httpClient: HttpClient) { return new TranslateHttpLoader(httpClient, '/assets/i18n/', '.json'); @@ -280,6 +281,7 @@ const matImports = [ ChevronButtonComponent, DictionaryListingScreenComponent, SyncWidthDirective, + HasScrollbarDirective, AddEditDictionaryDialogComponent, DictionaryOverviewScreenComponent, TeamMembersComponent, diff --git a/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html b/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html index d96420c96..a5ffd8362 100644 --- a/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html +++ b/apps/red-ui/src/app/dialogs/add-edit-project-dialog/add-edit-project-dialog.component.html @@ -30,8 +30,7 @@
+
diff --git a/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts b/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts index 3e3197507..17e3fd101 100644 --- a/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts +++ b/apps/red-ui/src/app/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.ts @@ -31,8 +31,6 @@ export class ManualAnnotationDialogComponent implements OnInit { redactionDictionaries: TypeValue[] = []; legalOptions: LegalBasisOption[] = []; - @ViewChild('textarea') private _textarea: ElementRef; - get title() { return this._manualAnnotationService.getTitle(this.manualRedactionEntryWrapper.type); } @@ -85,10 +83,6 @@ export class ManualAnnotationDialogComponent implements OnInit { this.redactionDictionaries.sort((a, b) => a.label.localeCompare(b.label)); } - public get hasScrollbar() { - return this._textarea?.nativeElement.clientHeight < this._textarea?.nativeElement.scrollHeight; - } - handleAddRedaction() { this._enhanceManualRedaction(this.manualRedactionEntryWrapper.manualRedactionEntry); this._manualAnnotationService.addAnnotation(this.manualRedactionEntryWrapper.manualRedactionEntry).subscribe( diff --git a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html index 59c630664..14ab60446 100644 --- a/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html +++ b/apps/red-ui/src/app/screens/admin/dictionary-listing-screen/dictionary-listing-screen.component.html @@ -68,7 +68,7 @@
-
+
-
+
diff --git a/apps/red-ui/src/app/screens/admin/users/user-listing-screen.component.scss b/apps/red-ui/src/app/screens/admin/users/user-listing-screen.component.scss index a31941627..4cb561573 100644 --- a/apps/red-ui/src/app/screens/admin/users/user-listing-screen.component.scss +++ b/apps/red-ui/src/app/screens/admin/users/user-listing-screen.component.scss @@ -4,7 +4,7 @@ .grid-container { grid-template-columns: 1fr 1fr 11px; - &:hover { + &.has-scrollbar:hover { grid-template-columns: 1fr 1fr; } diff --git a/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html b/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html index c3d720290..152a9d25b 100644 --- a/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html +++ b/apps/red-ui/src/app/screens/admin/watermark-screen/watermark-screen.component.html @@ -26,9 +26,8 @@