Skip to content

Commit

Permalink
Merge branch 'main' into side-bar-email-verification-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
auumgn committed Oct 15, 2024
2 parents a04613e + 68edf72 commit a41d317
Show file tree
Hide file tree
Showing 16 changed files with 62 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: unit_tests

jobs:
unit_tests:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { Component, Input, OnInit } from '@angular/core'
export class PanelElementSourceComponent implements OnInit {
@Input() name: string
@Input() date: string
@Input() isEmailOrDomain = false
@Input() isLastItem: boolean
@Input() assertion: string
constructor() {}
Expand Down
42 changes: 33 additions & 9 deletions src/app/cdk/side-bar/modals/modal-email/modal-email.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,26 @@ <h2 class="orc-font-body-large" i18n="@@side-bar.emailAddressesUppercase">
<div class="email-entry row">
<div class="row email-input-line" [formGroupName]="email.putCode">
<mat-icon
*ngIf="
!email.verified || (email.verified && email.professionalEmail)
"
class="verification-icon"
[ngClass]="{
verified: email.verified,
}"
>check_circle</mat-icon
>
<mat-icon
*ngIf="email.verified && !email.professionalEmail"
aria-hidden="false"
[attr.aria-label]="selfAssertedSource"
[attr.alt]="selfAssertedSource"
class="verification-icon"
><img
src="./assets/vectors/profile-not-verified.svg"
[attr.alt]="selfAssertedSource"
/>
</mat-icon>
<div class="email-input-container">
<mat-form-field
*ngIf="!showEmailAsVerified(email.putCode)"
Expand All @@ -112,11 +126,18 @@ <h2 class="orc-font-body-large" i18n="@@side-bar.emailAddressesUppercase">
<strong tabindex="0" class="row orc-font-body-small">
{{ emailsForm.value[email.putCode].email }}</strong
>
<em
class="row orc-font-small-print"
i18n="@@side-bar.verifiedEmail"
>Verified email address</em
<app-panel-element-source
class="orc-font-small-print"
[name]="
email.professionalEmail
? orcidEmailValidation
: email.sourceName
"
[isEmailOrDomain]="true"
[date]="email.verificationDate | monthDayYearDateToString"
[isLastItem]="true"
>
</app-panel-element-source>
</div>
</div>
<div
Expand Down Expand Up @@ -212,7 +233,7 @@ <h2 class="orc-font-body-large" i18n="@@side-bar.emailAddressesUppercase">
class="orc-font-small-print"
>
Please enter a valid email address, for example
joe@institution.edu
joe&#64;institution.edu
</mat-error>

<mat-error
Expand Down Expand Up @@ -287,11 +308,14 @@ <h2 class="orc-font-body-large" i18n="@@side-bar.emailAddressesUppercase">
<strong tabindex="0" class="row orc-font-body-small">
{{ domain.value }}</strong
>
<em
class="row orc-font-small-print"
i18n="@@side-bar.verifiedEmailDomain"
>Verified email domain</em
<app-panel-element-source
class="orc-font-small-print"
[name]="orcidEmailValidation"
[isEmailOrDomain]="true"
[date]="domain.createdDate | monthDayYearDateToString"
[isLastItem]="true"
>
</app-panel-element-source>
</div>
<div class="actions-sub-wrapper domain-visibility">
<app-visibility-selector
Expand Down
14 changes: 10 additions & 4 deletions src/app/cdk/side-bar/modals/modal-email/modal-email.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,17 @@ app-alert-message {

.verification-icon {
height: 40px;
width: 32px;
font-size: 32px;
width: 40px;
font-size: 40px;
margin-right: 16px;
align-content: center;
img {
height: 32px;
width: 32px;
margin-left: auto;
margin-right: auto;
display: block;
}
}

mat-form-field {
Expand All @@ -45,7 +52,7 @@ mat-form-field {

.actions-wrapper {
width: 100%;
margin-left: 48px;
margin-left: 60px;
margin-right: 255px;
margin-top: 3px;
line-height: 21px;
Expand Down Expand Up @@ -145,7 +152,6 @@ section[id='Email domains'] {
strong {
margin-bottom: 2px;
}
line-height: 21px;
letter-spacing: 0.25px;
flex-grow: 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,18 @@ export class ModalEmailComponent implements OnInit, OnDestroy {
ariaLabelVisibilityDomainTrustedParty = $localize`:@@side-bar.ariaLabelDomainVisibilityTrustedParties:Set domain visibility to Trusted Parties`
ariaLabelVisibilityDomainPrivate = $localize`:@@side-bar.ariaLabelDomainVisibilityPrivate:Set domain visibility to Only Me`
ariaOpenAccountSettings = $localize`:@@side-bar.ariaOpenAccountSettings:Open your ORCID account settings`
selfAssertedSource = $localize`:@@record.selfAssertedSource:Self-asserted source`
deleteTooltip = $localize`:@@side-bar.deleteTooltip:You can't delete the only email address in your account`
visibilityTooltip = $localize`:@@side-bar.visibilityTooltip:Visibility set to Only me`
orcidEmailValidation = $localize`:@@side-bar.orcidEmailValidation:ORCID email validation`

@ViewChildren('emailInput') inputs: QueryList<ElementRef>
verificationsSend: string[] = []
$destroy: Subject<boolean> = new Subject<boolean>()
addedEmailsCount = 0
emailsForm: UntypedFormGroup = new UntypedFormGroup({})
emails: AssertionVisibilityString[] = []
verifiedDomains = []
verifiedDomains: AssertionVisibilityString[] = []
primaryEmail: AssertionVisibilityString | undefined = undefined
originalEmailsBackendCopy: AssertionVisibilityString[]
defaultVisibility: VisibilityStrings = 'PRIVATE'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2 class="orc-font-body-large" i18n="@@developerTools.gettingStarted">
<p i18n="@@developerTools.orcidOffersAnApi">
ORCID offers a free Public API (Application Programming Interface) that allows
your systems and applications to connect to the ORCID registry for
non-commercial use
non-commercial use.
</p>
<p i18n="@@developerTools.orcidOffersAnApi2">
By registering for Public API Credentials, your system or application can:
Expand Down Expand Up @@ -128,7 +128,7 @@ <h2 class="orc-font-body-large" i18n="@@developerTools.additionalResources">
<ng-container i18n="@@developerTools.byRegisteringForPublicApi">
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
any revenue-generating product or service.
</ng-container>
</p>

Expand Down
2 changes: 2 additions & 0 deletions src/app/types/record.endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ export interface AssertionBase {
urlName?: string
sourceName?: string
content?: string
professionalEmail?: boolean
createdDate?: MonthDayYearDate
lastModified?: MonthDayYearDate
verificationDate?: MonthDayYearDate
assertionOriginOrcid?: any
assertionOriginClientId?: any
assertionOriginName?: any
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ developerTools.ressettingYourClientSecret=Resetting your client secret will gene
developerTools.developerTools=Developer tools
developerTools.thisSectionIsIntended=This section is intended for developers who plan to integrate ORCID into their system using the ORCID Public API.
developerTools.gettingStarted=Getting started with the free ORCID Public API
developerTools.orcidOffersAnApi=ORCID offers a free Public API (Application Programming Interface) that allows your systems and applications to connect to the ORCID registry for non-commercial use
developerTools.orcidOffersAnApi=ORCID offers a free Public API (Application Programming Interface) that allows your systems and applications to connect to the ORCID registry for non-commercial use.
developerTools.allowUserToSignInto=Allow users to sign into your system/application with their ORCID account
developerTools.getAUserAuthenticated=Obtain a user's’ authenticated ORCID iDs
developerTools.retrieveMachineReadable=Read public information from ORCID records in machine-readable format
Expand Down Expand Up @@ -81,4 +81,4 @@ developerTools.obtainHigher=Obtain a higher usage quota than the ORCID Anonymous
developerTools.publicClientApplicationsAreGranted2=If you need access to an ORCID API for commercial use, need a higher usage quota, organizational administration of your API credentials, or the ability to write data to or access Trusted Party data in ORCID records, our
developerTools.memberApi=Member API
developerTools.mayBeMoreAppropriate=is available to ORCID member organizations.
developerTools.byRegisteringForPublicApi=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
developerTools.byRegisteringForPublicApi=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.
1 change: 1 addition & 0 deletions src/locale/properties/shared/shared.en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ shared.whoCanSeeBio=Control who can see your biography by setting the visibility
shared.whoCanSeeName=Control who can see your given, family and published names by setting the visibility. The default visibility for your names is
shared.requiredInformation=Required information
shared.created=Created:
shared.verified=Verified:
shared.delete=Delete
shared.showMore=Show more
shared.showLess=Show less
Expand Down
1 change: 1 addition & 0 deletions src/locale/properties/shared/shared.lr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -665,3 +665,4 @@ shared.selectCountryOrLocation=LR
shared.opensInNewTab=LR
shared.emailsAndDomains=LR
shared.verifiedEmailsAndDomains=LR
shared.verified=LR
1 change: 1 addition & 0 deletions src/locale/properties/shared/shared.rl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -661,3 +661,4 @@ shared.selectCountryOrLocation=RL
shared.opensInNewTab=RL
shared.emailsAndDomains=RL
shared.verifiedEmailsAndDomains=RL
shared.verified=RL
1 change: 1 addition & 0 deletions src/locale/properties/shared/shared.xx.properties
Original file line number Diff line number Diff line change
Expand Up @@ -661,3 +661,4 @@ shared.selectCountryOrLocation=X
shared.opensInNewTab=X
shared.emailsAndDomains=X
shared.verifiedEmailsAndDomains=X
shared.verified=X
1 change: 1 addition & 0 deletions src/locale/properties/side-bar/side-bar.en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ side-bar.verifiedEmailDomain=Verified email domain
side-bar.whenYouVerifyEmail=When you verify a professional email address we will add the associated domain to your record. You can choose to show an email domain on your public record instead of the full email address.
side-bar.findOutMoreAboutVerifiedEmailDomains=Find out more about verified email domains
side-bar.noVerifiedEmailDomains=No verified email domains
side-bar.orcidEmailValidation=ORCID email validation
side-bar.inYourOrcidRecord=in your ORCID record.
side-bar.youNeedToVerify=You need to verify your primary email in order to access all of ORCID’s editing features.
side-bar.youNeedToVerify2=To verify your email, click the link in the message sent to:
Expand Down
1 change: 1 addition & 0 deletions src/locale/properties/side-bar/side-bar.lr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ side-bar.verifiedEmailAddresses=LR
side-bar.ariaLabelDomainVisibilityPublic=LR
side-bar.ariaLabelDomainVisibilityTrustedParties=LR
side-bar.ariaLabelDomainVisibilityPrivate=LR
side-bar.orcidEmailValidation=LR
1 change: 1 addition & 0 deletions src/locale/properties/side-bar/side-bar.rl.properties
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,4 @@ side-bar.verifiedEmailAddresses=RL
side-bar.ariaLabelDomainVisibilityPublic=RL
side-bar.ariaLabelDomainVisibilityTrustedParties=RL
side-bar.ariaLabelDomainVisibilityPrivate=RL
side-bar.orcidEmailValidation=RL
1 change: 1 addition & 0 deletions src/locale/properties/side-bar/side-bar.xx.properties
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ side-bar.verifiedEmailAddresses=X
side-bar.ariaLabelDomainVisibilityPublic=X
side-bar.ariaLabelDomainVisibilityTrustedParties=X
side-bar.ariaLabelDomainVisibilityPrivate=X
side-bar.orcidEmailValidation=X

0 comments on commit a41d317

Please sign in to comment.