Skip to content

Commit

Permalink
Merge branch 'main' into fix/limit-build-artifacts-to-reduce-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
amontenegro authored Nov 18, 2024
2 parents 08e330c + 00fe32b commit 77e0db0
Show file tree
Hide file tree
Showing 16 changed files with 430 additions and 55 deletions.
32 changes: 32 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
## v2.107.12 - 2024-11-15

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.11...v2.107.12)

## v2.107.11 - 2024-11-13

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.10...v2.107.11)

## v2.107.10 - 2024-11-13

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.9...v2.107.10)

- [#2396](https://github.com/ORCID/orcid-angular/pull/2396): 9497 resolve the issues integrators are having when embedding summaries into iframes
- [#2393](https://github.com/ORCID/orcid-angular/pull/2393): Bump rollup from 3.29.4 to 3.29.5
- [#2395](https://github.com/ORCID/orcid-angular/pull/2395): scroll to top on email interstitial
- [#2394](https://github.com/ORCID/orcid-angular/pull/2394): convert to matrix format and bump all action versions for node version

### Fix

- bump linting action versions

## 2.108.0 - 2024-11-13

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.9...2.108.0)

- [#2395](https://github.com/ORCID/orcid-angular/pull/2395): scroll to top on email interstitial
- [#2394](https://github.com/ORCID/orcid-angular/pull/2394): convert to matrix format and bump all action versions for node version

### Fix

- bump linting action versions

## 2.107.10 - 2024-11-12

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.107.9...2.107.10)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
width: 100%;
display: flex;
justify-content: center;
height: 100vh;
}

main.stand-alone-mode {
Expand All @@ -17,6 +16,7 @@ main.inside-iframe {
align-content: start;
grid-gap: 0;
box-sizing: border-box;
height: 100vh;

.panel-body {
padding-top: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,25 @@ <h2 class="orc-font-body-large" i18n="@@developerTools.additionalResources">
</ng-container>
</p>

<app-alert-message *ngIf="!hasVerifiedEmailAddress">
<strong class="orc-font-body" i18n="@@developerTools.noVerifiedEmailAddresses"
>No verified email addresses found</strong
>

<p class="orc-font-body-small">
<ng-container i18n="@@developerTools.youMustHaveAtLeastOneVerifiedEmail"
>You must have at least one verified email address in your ORCID account
to register for your Public API credentials. Manage your email addresses
in the</ng-container
>
<a
(click)="openEmailModal()"
i18n="@@developerTools.emailsAndDomainsSection"
>Emails and domains section of your ORCID record</a
>.
</p>
</app-alert-message>

<div class="info" *ngIf="!checked && dirty">
<div class="col">
<mat-icon class="large-material-icon outline">warning</mat-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,14 @@ h2 {
.mat-button-wrap-text {
margin-bottom: 32px;
}

app-alert-message {
line-height: 21px;
margin-top: 16px;
a {
text-decoration: underline;
}
p {
margin-bottom: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { RecordService } from 'src/app/core/record/record.service'
import { of } from 'rxjs'

import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'
import { MatLegacyDialog } from '@angular/material/legacy-dialog'
import { useAnimation } from '@angular/animations'

describe('TermsOfUseComponent', () => {
let component: TermsOfUseComponent
Expand All @@ -19,6 +21,7 @@ describe('TermsOfUseComponent', () => {
{ provide: DeveloperToolsService, useValue: {} },
{ provide: PlatformInfoService, useValue: {} },
{ provide: RecordService, useValue: { getRecord: () => of() } },
{ provide: MatLegacyDialog, useValue: {} },
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
}).compileComponents()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ import {
ViewChild,
} from '@angular/core'
import { MatLegacyCheckbox as MatCheckbox } from '@angular/material/legacy-checkbox'
import { MatLegacyDialog } from '@angular/material/legacy-dialog'
import { Subject } from 'rxjs'
import { takeUntil } from 'rxjs/operators'
import { PlatformInfoService } from 'src/app/cdk/platform-info'
import { ModalEmailComponent } from 'src/app/cdk/side-bar/modals/modal-email/modal-email.component'
import { DeveloperToolsService } from 'src/app/core/developer-tools/developer-tools.service'
import { RecordService } from 'src/app/core/record/record.service'

Expand All @@ -31,10 +33,12 @@ export class TermsOfUseComponent implements OnInit, OnDestroy {
@Output() developerToolsEnable = new EventEmitter<boolean>()
$destroy = new Subject<boolean>()
emailAlreadyVerified: boolean
hasVerifiedEmailAddress: boolean

constructor(
private developerToolsService: DeveloperToolsService,
private _record: RecordService,
private _dialog: MatLegacyDialog,
private _changeDetectorRef: ChangeDetectorRef
) {}
ngOnDestroy(): void {
Expand All @@ -50,13 +54,27 @@ export class TermsOfUseComponent implements OnInit, OnDestroy {
const primaryEmail = userRecord?.emails?.emails?.filter(
(email) => email.primary
)[0]
this.hasVerifiedEmailAddress = userRecord.emails.emails.some(
(email) => email.verified
)
if (primaryEmail?.verified) {
this.emailAlreadyVerified = true
this._changeDetectorRef.detectChanges()
}
})
}

openEmailModal() {
return this._dialog
.open(ModalEmailComponent, {
width: '850px',
maxWidth: '99%',
// data: this.userRecord,
// ariaLabel: getAriaLabel(this.editModalComponent, this.type),
})
.afterClosed()
}

registerForPublicApi() {
this.dirty = true
if (!this.checked) {
Expand Down
2 changes: 2 additions & 0 deletions src/app/developer-tools/developer-tools.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ModalModule } from '../cdk/modal/modal.module'
import { A11yLinkModule } from '../cdk/a11y-link/a11y-link.module'
import { TopBarVerificationEmailModule } from '../cdk/top-bar-verification-email/top-bar-verification-email.module'
import { DeveloperToolsComponent } from './pages/developer-tools/developer-tools.component'
import { AlertMessageModule } from '../cdk/alert-message/alert-message.module'

@NgModule({
declarations: [
Expand Down Expand Up @@ -49,6 +50,7 @@ import { DeveloperToolsComponent } from './pages/developer-tools/developer-tools
ModalModule,
A11yLinkModule,
TopBarVerificationEmailModule,
AlertMessageModule,
],
})
export class DeveloperToolsModule {}
Original file line number Diff line number Diff line change
Expand Up @@ -204,56 +204,47 @@ <h2 class="orc-font-body-large" i18n="@@developerTools.redirectUris">
your integration users will experience an error.
</p>

<div class="info">
<div class="col">
<mat-icon class="material-icons-outlined large-material-icon"
>info</mat-icon
>
</div>
<div class="col l11 m6 s3">
<strong i18n="@@developerTools.pleaseNote">Please note</strong>
<ul>
<li>
<ng-container i18n="@@developerTools.only">
Only</ng-container
>
<strong i18n="@@developerTools.httpsURI">HTTPS URIs</strong>
<ng-container i18n="@@developerTools.areAccepted">
are accepted in production
</ng-container>
</li>
<li>
<ng-container i18n="@@developerTools.domainsRegisted"
>Domains registered</ng-container
>
<strong i18n="@@developerTools.must">MUST</strong>
<ng-container i18n="@@developerTools.exactlyMatchTheDomains"
>exactly match the domains used, including
subdomains</ng-container
>
</li>
<li>
<strong i18n="@@developerTools.registerAllRedirectURIs"
>Register all redirect URIs fully where possible.</strong
>
<ng-container i18n="@@developerTools.thisIsTheMostSecure"
>This is the most secure option and what we recommend. For
more information about redirect URIs, please see
our</ng-container
>

<a
class="underline"
i18n="@@developerTools.redirectUriFaq"
rel="noopener noreferrer"
target="_blank"
href="https://info.orcid.org/ufaqs/how-do-redirect-uris-work/"
>redirect URI FAQ</a
>
</li>
</ul>
</div>
</div>
<app-alert-message class="redirect-uri-notice">
<strong i18n="@@developerTools.pleaseNote">Please note</strong>
<ul>
<li>
<ng-container i18n="@@developerTools.only"> Only</ng-container>
<strong i18n="@@developerTools.httpsURI">HTTPS URIs</strong>
<ng-container i18n="@@developerTools.areAccepted">
are accepted in production
</ng-container>
</li>
<li>
<ng-container i18n="@@developerTools.domainsRegisted"
>Domains registered</ng-container
>
<strong i18n="@@developerTools.must">MUST</strong>
<ng-container i18n="@@developerTools.exactlyMatchTheDomains"
>exactly match the domains used, including
subdomains</ng-container
>
</li>
<li>
<strong i18n="@@developerTools.registerAllRedirectURIs"
>Register all redirect URIs fully where possible.</strong
>
<ng-container i18n="@@developerTools.thisIsTheMostSecure"
>This is the most secure option and what we recommend. For
more information about redirect URIs, please see
our</ng-container
>

<a
class="underline"
i18n="@@developerTools.redirectUriFaq"
rel="noopener noreferrer"
target="_blank"
href="https://info.orcid.org/ufaqs/how-do-redirect-uris-work/"
>redirect URI FAQ</a
>
</li>
</ul>
</app-alert-message>

<div class="warn" *ngIf="triedToSaveWithoutUrls">
<div class="col">
Expand Down Expand Up @@ -453,6 +444,27 @@ <h3 class="orc-font-body" i18n="@@developerTools.exampleCode">
Redirect URIs must be unique
</mat-error>
</p>
<app-alert-message class="notice-panel"
><ng-container
i18n="
@@developerTools.theOrcidPublicApiAllowsYouToRequestPermission"
>The ORCID Public API is free for non-commercial use by
individuals as stated in the</ng-container
>
<a
href="https://info.orcid.org/public-client-terms-of-service/"
target="_blank"
class="underline"
i18n="@@developerTools.publicClientTermsOfService"
>Public APIs Terms of Service.</a
>
<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.</ng-container
></app-alert-message
>

<button
mat-raised-button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ p {

ul {
padding-left: 16px;
margin-bottom: 0;
}

.add-more {
Expand Down Expand Up @@ -148,6 +149,19 @@ app-client-secret {
margin-top: 16px;
}

.notice-panel {
line-height: 21px;
margin-top: 32px;
}

.redirect-uri-notice {
strong {
display: inline;
}
line-height: 21px;
margin-bottom: 32px;
}

.save-button {
margin-top: 32px;
margin-bottom: 32px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,17 @@ export class EnvironmentBannerComponent implements OnInit {
canDismiss = environment['CAN_DISABLE_TEST_WARNING_BANNER']
@HostBinding('style.display') display = 'none'
labelWarning = $localize`:@@environmentBanner.ariaLabelWarning:Warning, testing website`
notInsideIframe: boolean
constructor(
@Inject(WINDOW) private window: Window,
private _cookieService: CookieService
) {
this.notInsideIframe = window.self === window.top
this.hostUrl = window.location.host
if (!this._cookieService.get('testWarningCookie') || !this.canDismiss) {
if (
(!this._cookieService.get('testWarningCookie') || !this.canDismiss) &&
this.notInsideIframe
) {
this.display = 'auto'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ developerTools.publicClientApplicationsAreGranted2=If you need access to an ORCI
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.noVerifiedEmailAddresses=No verified email addresses found
developerTools.youMustHaveAtLeastOneVerifiedEmail=You must have at least one verified email address in your ORCID account to register for your Public API credentials. Manage your email addresses in the
developerTools.emailsAndDomainsSection=Emails and domains section of your ORCID record
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ developerTools.publicClientApplicationsAreGranted2=LR
developerTools.memberApi=LR
developerTools.mayBeMoreAppropriate=LR
developerTools.byRegisteringForPublicApi=LR
developerTools.noVerifiedEmailAddresses=LR
developerTools.youMustHaveAtLeastOneVerifiedEmail=LR
developerTools.emailsAndDomainsSection=LR
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ developerTools.publicClientApplicationsAreGranted2=RL
developerTools.memberApi=RL
developerTools.mayBeMoreAppropriate=RL
developerTools.byRegisteringForPublicApi=RL
developerTools.noVerifiedEmailAddresses=RL
developerTools.youMustHaveAtLeastOneVerifiedEmail=RL
developerTools.emailsAndDomainsSection=RL
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,6 @@ developerTools.publicClientApplicationsAreGranted2=X
developerTools.memberApi=X
developerTools.mayBeMoreAppropriate=X
developerTools.byRegisteringForPublicApi=X
developerTools.noVerifiedEmailAddresses=X
developerTools.youMustHaveAtLeastOneVerifiedEmail=X
developerTools.emailsAndDomainsSection=X
Loading

0 comments on commit 77e0db0

Please sign in to comment.