From 469bcc68d95fe3c4d121212590150176c38f9d2a Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Sat, 7 Dec 2024 00:30:25 +0200 Subject: [PATCH 01/22] refactor alert message --- .../alert-message.component.html | 50 ++++++++++-- .../alert-message.component.scss | 24 ++++++ .../alert-message.component.scss-theme.scss | 78 ++++++++++++++++--- .../alert-message/alert-message.component.ts | 15 ++-- 4 files changed, 143 insertions(+), 24 deletions(-) diff --git a/src/app/cdk/alert-message/alert-message.component.html b/src/app/cdk/alert-message/alert-message.component.html index 141fe04d6e..7322724882 100644 --- a/src/app/cdk/alert-message/alert-message.component.html +++ b/src/app/cdk/alert-message/alert-message.component.html @@ -1,9 +1,45 @@ -
- error_outline -
+
+
+ info_outline + help_outline + warning_amber + thumb_up_off_alt +
-
- +
+ + + +
+ +
+
diff --git a/src/app/cdk/alert-message/alert-message.component.scss b/src/app/cdk/alert-message/alert-message.component.scss index 6c90a6314f..cdcddc88f9 100644 --- a/src/app/cdk/alert-message/alert-message.component.scss +++ b/src/app/cdk/alert-message/alert-message.component.scss @@ -1,4 +1,28 @@ :host { + ::ng-deep { + h1, + h2, + h3, + h4, + h5, + h6 { + margin: 0 0 8px 0 !important; + } + } + width: 100%; + display: inline-block; +} + +.title { + line-height: 24px; +} + +.content { + line-height: 21px !important; + letter-spacing: 0.25px !important; +} + +.alert-container { border: solid 2px; border-radius: 4px; padding: 16px; diff --git a/src/app/cdk/alert-message/alert-message.component.scss-theme.scss b/src/app/cdk/alert-message/alert-message.component.scss-theme.scss index 2823c4d698..9b1878bac6 100644 --- a/src/app/cdk/alert-message/alert-message.component.scss-theme.scss +++ b/src/app/cdk/alert-message/alert-message.component.scss-theme.scss @@ -8,18 +8,72 @@ $foreground: map-get($theme, foreground); $background: map-get($theme, background); - :host { - border-color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; - background-color: rgba($state-notice-light, 0.15); - } - mat-icon { - color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; + $alert-colors: ( + 'alert-notice': ( + 'border': 'state-notice-darkest', + 'background': 'state-notice-lightest', + 'link-darkest': 'brand-quad-darkest', + 'link-dark': 'brand-quad-dark', + ), + 'alert-info': ( + 'border': 'state-info-darkest', + 'background': 'state-info-lightest', + 'link-darkest': 'state-info-darkest', + 'link-dark': 'state-info-dark', + ), + 'alert-warning': ( + 'border': 'state-warning-dark', + 'background': 'state-warning-lightest', + 'link-darkest': 'state-warning-darkest', + 'link-dark': 'state-warning-dark', + ), + 'alert-success': ( + 'border': 'brand-primary-dark', + 'background': 'brand-primary-lightest', + 'link-darkest': 'brand-primary-darkest', + 'link-dark': 'brand-primary-dark', + ), + ); + + @each $class, $settings in $alert-colors { + $border-color: map-get($settings, 'border'); + $background-color: map-get($settings, 'background'); + $link-darkest: map-get($settings, 'link-darkest'); + $link-dark: map-get($settings, 'link-dark'); + + .#{$class} { + border-color: mat.get-color-from-palette( + $foreground, + $border-color + ) !important; + background-color: mat.get-color-from-palette( + $foreground, + $background-color + ) !important; + + mat-icon { + color: mat.get-color-from-palette( + $foreground, + $border-color + ) !important; + } + + ::ng-deep a { + color: mat.get-color-from-palette( + $foreground, + $link-darkest + ) !important; + + &:visited { + color: black !important; + } + &:hover, + &:active, + &:focus { + color: mat.get-color-from-palette($foreground, $link-dark) !important; + } + } + } } } diff --git a/src/app/cdk/alert-message/alert-message.component.ts b/src/app/cdk/alert-message/alert-message.component.ts index 4e9a6b2598..d796d75a7b 100644 --- a/src/app/cdk/alert-message/alert-message.component.ts +++ b/src/app/cdk/alert-message/alert-message.component.ts @@ -1,4 +1,5 @@ -import { Component, OnInit } from '@angular/core' +import { Component, Input } from '@angular/core' +import { AlertType } from 'src/app/constants' @Component({ selector: 'app-alert-message', @@ -8,8 +9,12 @@ import { Component, OnInit } from '@angular/core' 'alert-message.component.scss-theme.scss', ], }) -export class AlertMessageComponent implements OnInit { - constructor() {} - - ngOnInit(): void {} +/** + * Use `title` and `content` attributes to display the message + * Use headings (h1, h2...) for the title + * Margin is set to `0 0 8px 0` for all headings + * Line height and letter spacing is also standardized + */ +export class AlertMessageComponent { + @Input() type: AlertType = 'notice' } From 04f021ae365db08240a68c3717e4ec8aee539c82 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Sat, 7 Dec 2024 00:32:50 +0200 Subject: [PATCH 02/22] replace deprecation warning --- .../account-settings.module.ts | 2 ++ .../dialog-actions-duplicated.component.html | 25 ++++++------------- .../dialog-actions-duplicated.component.scss | 13 ---------- ...tions-duplicated.component.scss-theme.scss | 13 ---------- 4 files changed, 9 insertions(+), 44 deletions(-) diff --git a/src/app/account-settings/account-settings.module.ts b/src/app/account-settings/account-settings.module.ts index 7ac6c1e4b9..7c01fa2762 100644 --- a/src/app/account-settings/account-settings.module.ts +++ b/src/app/account-settings/account-settings.module.ts @@ -46,6 +46,7 @@ import { SettingsSharingComponent } from './components/settings-sharing/settings import { SettingsComponent } from './components/settings/settings.component' import { AccountSettingsComponent } from './pages/account-settings/account-settings.component' import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog' +import { AlertMessageModule } from '../cdk/alert-message/alert-message.module' @NgModule({ declarations: [ @@ -98,6 +99,7 @@ import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/lega TwoFactorAuthenticationFormModule, AccountPanelModule, TopBarMyPublicRecordPreviewModule, + AlertMessageModule, ], providers: [VerificationEmailModalService], }) diff --git a/src/app/account-settings/components/dialog-actions-duplicated/dialog-actions-duplicated.component.html b/src/app/account-settings/components/dialog-actions-duplicated/dialog-actions-duplicated.component.html index 85f318c869..4ed2df5107 100644 --- a/src/app/account-settings/components/dialog-actions-duplicated/dialog-actions-duplicated.component.html +++ b/src/app/account-settings/components/dialog-actions-duplicated/dialog-actions-duplicated.component.html @@ -3,24 +3,13 @@ >Remove duplicate record -
-
- info -
-
-

- Warning! All information will be deleted from the duplicate record. Only - the email addresses will be transferred to your main ORCID record. - Removing a duplicate record cannot be undone. -

-
-
+ + + Warning! All information will be deleted from the duplicate record. Only + the email addresses will be transferred to your main ORCID record. + Removing a duplicate record cannot be undone. + +

Date: Sat, 7 Dec 2024 00:33:48 +0200 Subject: [PATCH 03/22] replace revoke trusted org warning --- .../account-trusted-parties.module.ts | 2 + ...revoke-trusted-organization.component.html | 49 +++++++------------ ...revoke-trusted-organization.component.scss | 13 ----- ...ted-organization.component.scss-theme.scss | 13 ----- 4 files changed, 21 insertions(+), 56 deletions(-) diff --git a/src/app/account-trusted-parties/account-trusted-parties.module.ts b/src/app/account-trusted-parties/account-trusted-parties.module.ts index 734ead2035..37461fb92a 100644 --- a/src/app/account-trusted-parties/account-trusted-parties.module.ts +++ b/src/app/account-trusted-parties/account-trusted-parties.module.ts @@ -36,6 +36,7 @@ import { SettingsTrustedOrganizationsComponent } from './components/settings-tru import { SettingsUsersThatThrustYouComponent } from './components/settings-users-that-thrust-you/settings-users-that-thrust-you.component' import { SettingsComponent } from './components/settings/settings.component' import { AccountTrustedPartiesComponent } from './pages/account-trusted-parties/account-trusted-parties.component' +import { AlertMessageModule } from '../cdk/alert-message/alert-message.module' @NgModule({ declarations: [ @@ -78,6 +79,7 @@ import { AccountTrustedPartiesComponent } from './pages/account-trusted-parties/ TwoFactorAuthenticationFormModule, AccountPanelModule, TopBarMyPublicRecordPreviewModule, + AlertMessageModule, MatTooltipModule, ], providers: [VerificationEmailModalService], diff --git a/src/app/account-trusted-parties/components/dialog-revoke-trusted-organization/dialog-revoke-trusted-organization.component.html b/src/app/account-trusted-parties/components/dialog-revoke-trusted-organization/dialog-revoke-trusted-organization.component.html index 3d31c3b5d5..0a38990640 100644 --- a/src/app/account-trusted-parties/components/dialog-revoke-trusted-organization/dialog-revoke-trusted-organization.component.html +++ b/src/app/account-trusted-parties/components/dialog-revoke-trusted-organization/dialog-revoke-trusted-organization.component.html @@ -22,37 +22,26 @@
{{ permissions.key | scopePathType }}

-
-
- info -
-
-

- Organizations can still delete items they added to your record even - after their access permissions have been revoked. - + + + Organizations can still delete items they added to your record even + after their access permissions have been revoked. + - - - Find out more about Trusted Organizations and access permissions - - -

-
-
+ + + Find out more about Trusted Organizations and access permissions + + + + - -

- Please verify your primary email address! -

-

+ + + +

+ Please verify your primary email address! +

+ +

You need to verify your primary email in order to access all of ORCID’s editing features. @@ -60,7 +49,7 @@

To verify your email, click the link in the message sent to:

-
+

Need help?
@@ -86,10 +75,10 @@

- -

- Thank you for verifying your email -

-
-
- + + +

+ Thank you for verifying your email +

+
+ diff --git a/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss b/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss index 695e702ebd..a8ddfca3a8 100644 --- a/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss +++ b/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss @@ -3,22 +3,6 @@ box-sizing: border-box; } -.info { - display: flex; - padding: 16px; - border: solid 2px; - border-radius: 4px; - - h2 { - margin: 0; - } - p { - margin-top: 0; - } - p.you-need { - margin: 0; - } - p.email-container { - margin: 16px 0 16px 0; - } +button { + margin-top: 16px; } diff --git a/src/app/cdk/top-bar-verification-email/top-bar-verification-email.module.ts b/src/app/cdk/top-bar-verification-email/top-bar-verification-email.module.ts index 0c82fdaf79..05a71be52c 100644 --- a/src/app/cdk/top-bar-verification-email/top-bar-verification-email.module.ts +++ b/src/app/cdk/top-bar-verification-email/top-bar-verification-email.module.ts @@ -5,6 +5,7 @@ import { ModalModule } from '../modal/modal.module' import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button' import { MatIconModule } from '@angular/material/icon' import { TopBarVerificationEmailModalComponent } from './modals/top-bar-verification-email-modal/top-bar-verification-email-modal.component' +import { AlertMessageModule } from '../alert-message/alert-message.module' @NgModule({ declarations: [ @@ -13,6 +14,7 @@ import { TopBarVerificationEmailModalComponent } from './modals/top-bar-verifica ], imports: [ CommonModule, + AlertMessageModule, ModalModule, MatButtonModule, MatIconModule, From 420ef27860eb434c156f17e79fe0af37225ec993 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:56:05 +0200 Subject: [PATCH 07/22] add AlertType const --- src/app/constants.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/constants.ts b/src/app/constants.ts index 15522e070e..9ff0663d32 100644 --- a/src/app/constants.ts +++ b/src/app/constants.ts @@ -415,3 +415,5 @@ export function getAffiliationType( return affiliation.type === type })[0] } + +export type AlertType = 'notice' | 'info' | 'warning' | 'success' From afda7aaaa4f7a3eeaa809747b5492a031e70a419 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:56:47 +0200 Subject: [PATCH 08/22] tweak terms of use alert panel --- .../terms-of-use/terms-of-use.component.html | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html b/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html index 15b5120029..8fdde6dd7d 100644 --- a/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html +++ b/src/app/developer-tools/components/terms-of-use/terms-of-use.component.html @@ -133,11 +133,14 @@

- No verified email addresses foundNo verified email addresses found -

+

You must have at least one verified email address in your ORCID account to register for your Public API credentials. Manage your email addresses @@ -151,17 +154,15 @@

-
-
- warning -
-
-

- You must accept the Public Client Terms of Service before you can register - for your Public API credentials. -

-
-
+ + + You must accept the Public Client Terms of Service before you can register + for your Public API credentials. + + Date: Mon, 9 Dec 2024 11:57:21 +0200 Subject: [PATCH 09/22] replace and tweak dev tools alert panels --- .../developer-tools.component.html | 104 ++++++++---------- .../developer-tools.component.scss | 60 +++------- .../developer-tools.component.scss-theme.scss | 28 ----- 3 files changed, 65 insertions(+), 127 deletions(-) diff --git a/src/app/developer-tools/pages/developer-tools/developer-tools.component.html b/src/app/developer-tools/pages/developer-tools/developer-tools.component.html index 03406c9f38..3d4ac94677 100644 --- a/src/app/developer-tools/pages/developer-tools/developer-tools.component.html +++ b/src/app/developer-tools/pages/developer-tools/developer-tools.component.html @@ -37,29 +37,22 @@ (clientSecretUpdated)="onClientSecretUpdated()" > - -
-
- info -
-
- - You’ve registered for your ORCID Public API credentials - - -

- Add your application details and one or more redirect URIs in - the form below. Once these details are saved we’ll generate your - client ID and secret so you can start using the Public API right - away. -

-
-
+ +

+ You’ve registered for your ORCID Public API credentials +

+ +

+ Add your application details and one or more redirect URIs in the + form below. Once these details are saved we’ll generate your + client ID and secret so you can start using the Public API right + away. +

+

- Please note -
    +

    Please note

    +
    • Only HTTPS URIs @@ -246,18 +239,15 @@

    -
    -
    - info -
    -
    -

    - Please add a redirect URI before saving your application -

    -
    -
    + + + Please add a redirect URI before saving your application + +
    Redirect URIs must be unique

    - The ORCID Public API is free for non-commercial use by - individuals as stated in the - Public APIs Terms of Service. - By “non-commercial” we mean that you may not charge any re-use - fees for the Public API, and you may not make use of the Public - API in connection with any revenue-generating product or - service. + + The ORCID Public API is free for non-commercial use by + individuals as stated in the + Public APIs Terms of Service. + By “non-commercial” we mean that you may not charge any re-use + fees for the Public API, and you may not make use of the Public + API in connection with any revenue-generating product or + service. diff --git a/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss b/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss index 1d7edbdbff..2eb3b3b416 100644 --- a/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss +++ b/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss @@ -4,32 +4,6 @@ width: 100%; } -.warn { - padding: 16px; - margin-top: 0px; - margin-bottom: 32px; - border: solid 2px; - border-radius: 4px; - display: flex; - - p { - margin: 0; - } -} - -.info { - padding: 16px; - margin-top: 16px; - margin-bottom: 32px; - border: solid 2px; - border-radius: 4px; - display: flex; - - p { - margin: 0; - } -} - hr { margin-bottom: 16px; } @@ -127,11 +101,6 @@ main#main { padding-left: 16px; } -.info p, -.info strong { - display: inline; -} - .title-container { display: flex; flex-direction: row; @@ -141,25 +110,30 @@ main#main { margin-top: 32px; } -.warning-title { - margin-bottom: 12px; -} - app-client-secret { margin-top: 16px; } -.notice-panel { - line-height: 21px; - margin-top: 32px; +app-alert-message { + &.registration-success-panel { + margin-top: 16px; + } + &.warning-panel { + margin-bottom: 16px; + margin-top: -16px; + } + &.redirect-uri-notice { + strong { + display: inline; + } + line-height: 21px; + margin-bottom: 32px; + } } -.redirect-uri-notice { - strong { - display: inline; - } +.notice-panel { line-height: 21px; - margin-bottom: 32px; + margin-top: 32px; } .save-button { diff --git a/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss-theme.scss b/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss-theme.scss index ac5a7015ed..9f18ec8638 100644 --- a/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss-theme.scss +++ b/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss-theme.scss @@ -8,34 +8,6 @@ $foreground: map-get($theme, foreground); $background: map-get($theme, background); - .info { - border-color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; - - mat-icon { - color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; - } - } - - .warn { - border-color: mat.get-color-from-palette( - $foreground, - 'state-warning-dark' - ) !important; - - mat-icon { - color: mat.get-color-from-palette( - $foreground, - 'state-warning-dark' - ) !important; - } - } - code { border-color: mat.get-color-from-palette($background, ui-background); background-color: mat.get-color-from-palette( From 6cab04a64b6574dbc0611334fd33416e9887dbed Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:57:44 +0200 Subject: [PATCH 10/22] replace delete modal alert --- .../modal-delete-items.component.html | 23 +++++-------------- .../modal-delete-items.component.scss | 12 ---------- ...dal-delete-items.component.scss-theme.scss | 14 ----------- 3 files changed, 6 insertions(+), 43 deletions(-) diff --git a/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.html b/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.html index 01dfbcd89b..10c4368c18 100644 --- a/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.html +++ b/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.html @@ -24,23 +24,12 @@ Cancel -
    -
    - info -
    -
    -

    - Deleting items permanently removes them from your ORCID record. Please - review the items selected for deletion. -

    -
    -
    + + + Deleting items permanently removes them from your ORCID record. Please + review the items selected for deletion. + +

    diff --git a/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss b/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss index 2b186dc517..c9180c1a8a 100644 --- a/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss +++ b/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss @@ -23,18 +23,6 @@ mat-checkbox.text-wrap { width: 14em; } -.info { - display: flex; - padding: 16px; - margin-top: 16px; - border: solid 2px; - border-radius: 4px; - - p { - margin: 0; - } -} - .affiliation-info { margin-bottom: 16px; diff --git a/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss-theme.scss b/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss-theme.scss index cee9f538b5..15dc715ca5 100644 --- a/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss-theme.scss +++ b/src/app/record/components/modals/modal-delete-item/modal-delete-items.component.scss-theme.scss @@ -7,20 +7,6 @@ $warn: map-get($theme, accent); $foreground: map-get($theme, foreground); $background: map-get($theme, background); - - .info { - border-color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; - - mat-icon { - color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; - } - } } @include delete-items-theme($orcid-app-theme); From fbbead3136c20c9b8c30a0ad9f783eba1ffd8fc6 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:58:12 +0200 Subject: [PATCH 11/22] replace locked alert message --- .../components/top-bar/top-bar.component.html | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/app/record/components/top-bar/top-bar.component.html b/src/app/record/components/top-bar/top-bar.component.html index a2bd997aca..3767fed115 100644 --- a/src/app/record/components/top-bar/top-bar.component.html +++ b/src/app/record/components/top-bar/top-bar.component.html @@ -11,14 +11,13 @@ [emailVerified]="emailVerified" [justRegistered]="justRegistered" > - - - Your account has been locked - Please contact + +

    + Your account has been locked +

    + +
    Date: Mon, 9 Dec 2024 11:58:56 +0200 Subject: [PATCH 12/22] replace merge selected works alert --- ...combine-works-with-selector.component.html | 25 ++++++------------- ...combine-works-with-selector.component.scss | 10 +------- 2 files changed, 8 insertions(+), 27 deletions(-) diff --git a/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.html b/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.html index b892029a9a..119ce68e6b 100644 --- a/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.html +++ b/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.html @@ -54,25 +54,14 @@

    -
    -
    - info -
    -
    - - Combining works cannot be undone! - -

    - Please check the selected works are correct before combining them. -

    + +

    + Combining works cannot be undone! +

    +
    + Please check the selected works are correct before combining them.
    -
    +

    diff --git a/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss b/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss index 7d1d68f79e..159ab4d204 100644 --- a/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss +++ b/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss @@ -1,13 +1,5 @@ -.info { - padding: 16px; +app-alert-message { margin-top: 32px; - border: solid 2px; - border-radius: 4px; - display: flex; - - p { - margin: 0; - } } .work-info { From 38d21928c0221770c2e9235c4b7e97025e747988 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:59:08 +0200 Subject: [PATCH 13/22] replace combine works modal alert --- ...ks-with-selector.component.scss-theme.scss | 14 ------------- .../modal-combine-works.component.html | 21 +++++++------------ .../modal-combine-works.component.scss | 19 +++-------------- 3 files changed, 11 insertions(+), 43 deletions(-) diff --git a/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss-theme.scss b/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss-theme.scss index fd07d62c1c..634a21a6ca 100644 --- a/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss-theme.scss +++ b/src/app/record/components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component.scss-theme.scss @@ -7,20 +7,6 @@ $warn: map-get($theme, accent); $foreground: map-get($theme, foreground); $background: map-get($theme, background); - - .info { - border-color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; - - mat-icon { - color: mat.get-color-from-palette( - $foreground, - 'state-notice-dark' - ) !important; - } - } } @include combine-work-theme($orcid-app-theme); diff --git a/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html b/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html index de2c63d179..03623ddd67 100644 --- a/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html +++ b/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html @@ -83,27 +83,22 @@

    -
    -
    - error_outline -
    -
    - Are you sure you want to group these works? -

    + + Are you sure you want to group these works? +

    +

    We recommend only grouping similar or related works together. Related works might have differing titles, identifiers or come from different sources.

    - Grouping un-related works can result in unexpected grouped items in your record.
    -
    +
    error Date: Mon, 9 Dec 2024 11:59:36 +0200 Subject: [PATCH 14/22] add alert dependency to modules --- src/app/record/record.module.ts | 4 ++-- src/app/register2/register.module.ts | 2 ++ src/app/sign-in/sign-in.module.ts | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/app/record/record.module.ts b/src/app/record/record.module.ts index 35abacac94..dcef46d48e 100644 --- a/src/app/record/record.module.ts +++ b/src/app/record/record.module.ts @@ -70,7 +70,6 @@ import { WorkModalComponent } from './components/work-modal/work-modal.component import { FundingExternalIdentifiersViewOnlyComponent } from './components/funding-external-identifiers-view-only/funding-external-identifiers-view-only.component' import { WorkExternalIdentifiersViewOnlyComponent } from './components/work-external-identifiers-view-only/work-external-identifiers-view-only.component' import { TextFieldModule } from '@angular/cdk/text-field' -import { WarningMessageModule } from '../cdk/warning-message/warning-message.module' import { VerificationEmailModalService } from '../core/verification-email-modal/verification-email-modal.service' import { ModalCombineWorksWithSelectorComponent } from './components/work/modals/modal-combine-works-with-selector/modal-combine-works-with-selector.component' import { TopBarMyPublicRecordPreviewModule } from '../cdk/top-bar-my-public-record-preview/top-bar-my-public-record-preview.module' @@ -81,6 +80,7 @@ import { TopBarVerificationEmailModule } from '../cdk/top-bar-verification-email import { RecordHeaderComponent } from './components/record-header/record-header.component' import { RecordInfoComponent } from './components/record-info/record-info.component' import { TrustedSummaryModule } from '../cdk/trusted-summary/trusted-summary.module' +import { AlertMessageModule } from '../cdk/alert-message/alert-message.module' @NgModule({ declarations: [ @@ -166,7 +166,7 @@ import { TrustedSummaryModule } from '../cdk/trusted-summary/trusted-summary.mod MatRadioModule, MatCheckboxModule, TextFieldModule, - WarningMessageModule, + AlertMessageModule, TopBarMyPublicRecordPreviewModule, TopBarVerificationEmailModule, TrustedSummaryModule, diff --git a/src/app/register2/register.module.ts b/src/app/register2/register.module.ts index 04d7abf499..da4ff75c97 100644 --- a/src/app/register2/register.module.ts +++ b/src/app/register2/register.module.ts @@ -37,6 +37,7 @@ import { MatLegacyAutocompleteModule as MatAutocompleteModule } from '@angular/m import { StepC2Component } from './components/step-c2/step-c2.component' import { MatLegacySelectModule } from '@angular/material/legacy-select' import { SharedModule } from '../shared/shared.module' +import { AlertMessageModule } from '../cdk/alert-message/alert-message.module' @NgModule({ declarations: [ @@ -61,6 +62,7 @@ import { SharedModule } from '../shared/shared.module' FormsModule, ReactiveFormsModule, RegisterRoutingModule, + AlertMessageModule, MatStepperModule, MatFormFieldModule, MatInputModule, diff --git a/src/app/sign-in/sign-in.module.ts b/src/app/sign-in/sign-in.module.ts index 1015a6b978..6c9ce3fbf4 100644 --- a/src/app/sign-in/sign-in.module.ts +++ b/src/app/sign-in/sign-in.module.ts @@ -18,6 +18,7 @@ import { FormDirectivesModule } from '../cdk/form-directives/form-directives.mod import { A11yLinkModule } from '../cdk/a11y-link/a11y-link.module' import { MyOrcidAlertsModule } from '../cdk/my-orcid-alerts/my-orcid-alerts.module' import { TwoFactorAuthenticationFormModule } from '../cdk/two-factor-authentication-form/two-factor-authentication-form.module' +import { AlertMessageModule } from '../cdk/alert-message/alert-message.module' @NgModule({ declarations: [ @@ -32,6 +33,7 @@ import { TwoFactorAuthenticationFormModule } from '../cdk/two-factor-authenticat CommonModule, FormsModule, ReactiveFormsModule, + AlertMessageModule, MatCardModule, MatIconModule, MatInputModule, From 1de1d5bfb0545f3e11fe2a4af430236129b1d4d5 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:00:26 +0200 Subject: [PATCH 15/22] replace long password alert on signin page --- .../form-sign-in/form-sign-in.component.html | 39 +++++++------------ .../form-sign-in/form-sign-in.component.scss | 7 ++++ 2 files changed, 20 insertions(+), 26 deletions(-) diff --git a/src/app/sign-in/components/form-sign-in/form-sign-in.component.html b/src/app/sign-in/components/form-sign-in/form-sign-in.component.html index db7b832b6f..06d5101fb8 100644 --- a/src/app/sign-in/components/form-sign-in/form-sign-in.component.html +++ b/src/app/sign-in/components/form-sign-in/form-sign-in.component.html @@ -32,7 +32,7 @@ class="orc-font-small-print" i18n="@@ngOrcid.signin.forExample" *ngIf="!usernameForm.invalid" - >For example: joe@institution.edu or 0000-1234-5678-9101 + >For example: joe@institution.edu or 0000-1234-5678-9101 Please enter a valid email address or ORCID iD, for example: - joe@institution.edu or 0000-1234-5678-9101 + joe@institution.edu or 0000-1234-5678-9101 -
    -
    - error -
    -
    +
    -

    - Your password is more than 256 characters long. - You cannot sign in to this ORCID account until you have reset - your password. -

    -
    -
    - Your password is more than 256 characters long. - Reset your passwordYou cannot sign in to this ORCID account until you have reset your + password.
    + + Reset your password
    -
    +
    diff --git a/src/app/sign-in/components/form-sign-in/form-sign-in.component.scss b/src/app/sign-in/components/form-sign-in/form-sign-in.component.scss index 797d88453d..0fc2258bc3 100644 --- a/src/app/sign-in/components/form-sign-in/form-sign-in.component.scss +++ b/src/app/sign-in/components/form-sign-in/form-sign-in.component.scss @@ -58,3 +58,10 @@ mat-label.orc-font-small-print { mat-divider { margin: 0px 0 30px 0; } + +app-alert-message { + .content > div { + margin-bottom: 16px; + } + margin-top: 24px; +} From db3da6aa95ba7edac8541c464ce75e626d01c28b Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:00:45 +0200 Subject: [PATCH 16/22] add color codes --- src/assets/scss/material.light-theme.scss | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/assets/scss/material.light-theme.scss b/src/assets/scss/material.light-theme.scss index 0c406c3e12..8c84dcad8c 100644 --- a/src/assets/scss/material.light-theme.scss +++ b/src/assets/scss/material.light-theme.scss @@ -52,12 +52,19 @@ box-border: $soft-grey, brand-primary: $brand-primary, brand-primary-dark: $brand-primary-dark, + brand-primary-darkest: $brand-primary-darkest, + brand-primary-lightest: $brand-primary-lightest, state-notice-light: $state-notice-light, state-notice-dark: $state-notice-dark, state-notice-darkest: $state-notice-darkest, + state-notice-lightest: $state-notice-lightest, + state-info-dark: $state-info-dark, state-info-darkest: $state-info-darkest, + state-info-lightest: $state-info-lightest, state-warning-dark: $state-warning-dark, - state-info-dark: $state-info-dark, + state-warning-darkest: $state-warning-darkest, + state-warning-lightest: $state-warning-lightest, + brand-quad-darkest: $brand-quad-darkest, text-dark-mid: $text-dark-mid, text-dark-high: $text-dark-high, text-light-high: $text-light-high, From 78f0b636cf7040a4ddca3398a40db2eb2a9b9fac Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:00:58 +0200 Subject: [PATCH 17/22] tweak and rearrange color codes --- src/assets/scss/material.palettes.scss | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/assets/scss/material.palettes.scss b/src/assets/scss/material.palettes.scss index a97dd2c452..6c4e5d77e5 100644 --- a/src/assets/scss/material.palettes.scss +++ b/src/assets/scss/material.palettes.scss @@ -104,7 +104,7 @@ $text-dark-mid: rgba(0, 0, 0, 0.6); $text-dark-high: rgba(0, 0, 0, 0.9); $ui-background-darkest: #212121; -$brand-primary-lightest: #f5f9e8; +$brand-primary-lightest: #fcfdf9; $brand-logo-grey: #a6a8ab; $ui-background-lightest: #fafafa; $ui-background-light: #eeeeee; @@ -134,20 +134,24 @@ $seamlessaccess-blue: #216e93; $brand-primary: #a6ce39; $brand-primary-dark: #7faa26; +$brand-primary-darkest: #447405; // state-notice zepling colors $state-notice-light: #ffdf72; - $state-notice-dark: #ff9c00; - $state-notice-lightest: #fffbee; - $state-notice-darkest: #ff6400; -$state-warning-dark: #d32f2f; +$state-info-dark: #1565c0; +$state-info-lightest: #f1f8fe; +$state-info-darkest: #0d47a1; +$state-warning-dark: #d32f2f; +$state-warning-lightest: rgba(255, 235, 238, 0.25); $state-warning-darkest: #b71c1c; +$brand-quad-darkest: #66002b; + $panel-shadow: rgba(214, 214, 214, 1); // UI background colours @@ -159,9 +163,3 @@ $ui-background-dark: #616161; // . // . $dark-primary-background: #f6f6f6; - -$state-info-dark: #1565c0; -$state-info-lightest: #bbdefb; - -$state-info-darkest: #0d47a1; -$state-info-lightest: #f1f8fe; From 27354174687eb21b9f7e2679197b149dcb007b2f Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:02:31 +0200 Subject: [PATCH 18/22] add brand-quad-dark --- src/assets/scss/material.light-theme.scss | 1 + src/assets/scss/material.palettes.scss | 1 + 2 files changed, 2 insertions(+) diff --git a/src/assets/scss/material.light-theme.scss b/src/assets/scss/material.light-theme.scss index 8c84dcad8c..79178006c7 100644 --- a/src/assets/scss/material.light-theme.scss +++ b/src/assets/scss/material.light-theme.scss @@ -64,6 +64,7 @@ state-warning-dark: $state-warning-dark, state-warning-darkest: $state-warning-darkest, state-warning-lightest: $state-warning-lightest, + brand-quad-dark: $brand-quad-dark, brand-quad-darkest: $brand-quad-darkest, text-dark-mid: $text-dark-mid, text-dark-high: $text-dark-high, diff --git a/src/assets/scss/material.palettes.scss b/src/assets/scss/material.palettes.scss index 6c4e5d77e5..7964de773e 100644 --- a/src/assets/scss/material.palettes.scss +++ b/src/assets/scss/material.palettes.scss @@ -150,6 +150,7 @@ $state-warning-dark: #d32f2f; $state-warning-lightest: rgba(255, 235, 238, 0.25); $state-warning-darkest: #b71c1c; +$brand-quad-dark: #990041; $brand-quad-darkest: #66002b; $panel-shadow: rgba(214, 214, 214, 1); From 62c8debea9d5f85934b8ee6d736397c5c403506a Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 12:03:43 +0200 Subject: [PATCH 19/22] replace invalid email alert on signin page --- .../form-personal.component.html | 26 +++++++------------ .../form-personal.component.scss | 7 +++++ 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/app/register2/components/form-personal/form-personal.component.html b/src/app/register2/components/form-personal/form-personal.component.html index 35f81497c4..c4baf51522 100644 --- a/src/app/register2/components/form-personal/form-personal.component.html +++ b/src/app/register2/components/form-personal/form-personal.component.html @@ -145,7 +145,7 @@

    " i18n="@@register.invalidEmail2" > - Please enter a valid email address, for example joe@institution.edu + Please enter a valid email address, for example joe@institution.edu

    -
    -
    - error -
    -
    -
    -

    + +

    +
    The email address @@ -207,10 +201,8 @@

    You cannot use this email address when creating a new ORCID iD. -

    -

    +
    - -
    -
    + + @@ -280,7 +272,7 @@

    " i18n="@@register.invalidEmail2" > - Please enter a valid email address, for example joe@institution.edu + Please enter a valid email address, for example joe@institution.edu +
    diff --git a/src/app/cdk/alert-message/alert-message.component.scss b/src/app/cdk/alert-message/alert-message.component.scss index cdcddc88f9..3cafed228a 100644 --- a/src/app/cdk/alert-message/alert-message.component.scss +++ b/src/app/cdk/alert-message/alert-message.component.scss @@ -19,7 +19,6 @@ .content { line-height: 21px !important; - letter-spacing: 0.25px !important; } .alert-container { diff --git a/src/app/cdk/alert-message/alert-message.component.ts b/src/app/cdk/alert-message/alert-message.component.ts index d796d75a7b..84c474910e 100644 --- a/src/app/cdk/alert-message/alert-message.component.ts +++ b/src/app/cdk/alert-message/alert-message.component.ts @@ -13,7 +13,7 @@ import { AlertType } from 'src/app/constants' * Use `title` and `content` attributes to display the message * Use headings (h1, h2...) for the title * Margin is set to `0 0 8px 0` for all headings - * Line height and letter spacing is also standardized + * Line height is also standardized */ export class AlertMessageComponent { @Input() type: AlertType = 'notice' diff --git a/src/app/cdk/side-bar/modals/modal-email/modal-email.component.html b/src/app/cdk/side-bar/modals/modal-email/modal-email.component.html index 8f35dc4b56..79c3b114c2 100644 --- a/src/app/cdk/side-bar/modals/modal-email/modal-email.component.html +++ b/src/app/cdk/side-bar/modals/modal-email/modal-email.component.html @@ -50,14 +50,11 @@

    - Please verify your email addresses +

    + Please verify your email addresses +

    -

    +

    To access all of ORCID’s editing features you must verify at least one email address. Until then you will only be able to @@ -69,7 +66,7 @@ in your ORCID record. -

    +
    diff --git a/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss b/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss index 2eb3b3b416..b8c6bdebad 100644 --- a/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss +++ b/src/app/developer-tools/pages/developer-tools/developer-tools.component.scss @@ -119,6 +119,9 @@ app-alert-message { margin-top: 16px; } &.warning-panel { + div { + line-height: 24px !important; + } margin-bottom: 16px; margin-top: -16px; } diff --git a/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html b/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html index 03623ddd67..f9fdc40289 100644 --- a/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html +++ b/src/app/record/components/work/modals/modal-combine-works/modal-combine-works.component.html @@ -84,9 +84,9 @@

    - Are you sure you want to group these works? +

    + Are you sure you want to group these works? +

    We recommend only grouping similar or related works together. Related From 7744308326b68209e9e787d8c725bd57c13a16f2 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 16:34:53 +0200 Subject: [PATCH 21/22] add improvements --- .../alert-message/alert-message.component.html | 2 +- .../alert-message/alert-message.component.scss | 18 ++++++++---------- .../alert-message/alert-message.component.ts | 4 ++-- .../top-bar-verification-email.component.scss | 4 ---- .../developer-tools.component.html | 8 +++++++- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/app/cdk/alert-message/alert-message.component.html b/src/app/cdk/alert-message/alert-message.component.html index 3da6fe4968..7322724882 100644 --- a/src/app/cdk/alert-message/alert-message.component.html +++ b/src/app/cdk/alert-message/alert-message.component.html @@ -35,7 +35,7 @@

    - +
    diff --git a/src/app/cdk/alert-message/alert-message.component.scss b/src/app/cdk/alert-message/alert-message.component.scss index 3cafed228a..f81779ca13 100644 --- a/src/app/cdk/alert-message/alert-message.component.scss +++ b/src/app/cdk/alert-message/alert-message.component.scss @@ -1,23 +1,21 @@ :host { - ::ng-deep { - h1, - h2, - h3, - h4, - h5, - h6 { - margin: 0 0 8px 0 !important; - } - } width: 100%; display: inline-block; } .title { + ::ng-deep * { + margin: 0; + } line-height: 24px; } .content { + ::ng-deep { + > :first-child { + margin-top: 8px; + } + } line-height: 21px !important; } diff --git a/src/app/cdk/alert-message/alert-message.component.ts b/src/app/cdk/alert-message/alert-message.component.ts index 84c474910e..e57657b30b 100644 --- a/src/app/cdk/alert-message/alert-message.component.ts +++ b/src/app/cdk/alert-message/alert-message.component.ts @@ -12,8 +12,8 @@ import { AlertType } from 'src/app/constants' /** * Use `title` and `content` attributes to display the message * Use headings (h1, h2...) for the title - * Margin is set to `0 0 8px 0` for all headings - * Line height is also standardized + * Title is stripped of any margin, has 24px line height and is bold + * Content has `margin-top: 8px` on its first child if it has any, line height is 21px */ export class AlertMessageComponent { @Input() type: AlertType = 'notice' diff --git a/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss b/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss index abd869d507..c4f3d5dcc6 100644 --- a/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss +++ b/src/app/cdk/top-bar-verification-email/top-bar-verification-email.component.scss @@ -3,10 +3,6 @@ box-sizing: border-box; } -button { - margin-top: 8px; -} - .need-help { margin-bottom: 0; } diff --git a/src/app/developer-tools/pages/developer-tools/developer-tools.component.html b/src/app/developer-tools/pages/developer-tools/developer-tools.component.html index 479a687d42..4dfdff223a 100644 --- a/src/app/developer-tools/pages/developer-tools/developer-tools.component.html +++ b/src/app/developer-tools/pages/developer-tools/developer-tools.component.html @@ -198,7 +198,13 @@

    -

    Please note

    +

    + Please note +

    • Only From 6708fb02cff756fb312510ccd5c22c6ebadc7968 Mon Sep 17 00:00:00 2001 From: andrej romanov <50377758+auumgn@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:53:48 +0200 Subject: [PATCH 22/22] restore dependency --- src/app/record/record.module.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/record/record.module.ts b/src/app/record/record.module.ts index da1c7eba01..807ccfe284 100644 --- a/src/app/record/record.module.ts +++ b/src/app/record/record.module.ts @@ -83,6 +83,7 @@ import { TrustedSummaryModule } from '../cdk/trusted-summary/trusted-summary.mod import { AlertMessageModule } from '../cdk/alert-message/alert-message.module' import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog' import { LoginInterstitialsService } from '../core/login-interstitials/login-interstitials.service' +import { WarningMessageModule } from '../cdk/warning-message/warning-message.module' @NgModule({ declarations: [ @@ -168,6 +169,7 @@ import { LoginInterstitialsService } from '../core/login-interstitials/login-int MatRadioModule, MatCheckboxModule, TextFieldModule, + WarningMessageModule, AlertMessageModule, TopBarMyPublicRecordPreviewModule, TopBarVerificationEmailModule,