Skip to content

Commit c740fee

Browse files
committed
PD-3704
1 parent 1e22af7 commit c740fee

10 files changed

Lines changed: 85 additions & 35 deletions

File tree

projects/orcid-ui/src/lib/components/record-header/record-header.component.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
width="48px"
8888
height="48px"
8989
[shimmerPercentage]="60"
90-
9190
></orcid-skeleton-placeholder>
9291
</div>
9392
</section>
@@ -185,7 +184,6 @@
185184
width="48px"
186185
height="48px"
187186
[shimmerPercentage]="60"
188-
189187
></orcid-skeleton-placeholder>
190188
<orcid-skeleton-placeholder
191189
shape="circle"

src/app/cdk/panel/panel/panel.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,4 +226,4 @@
226226

227227
<ng-template #tempHeader>
228228
<ng-content select="[header]"></ng-content>
229-
</ng-template>
229+
</ng-template>

src/app/cdk/panel/panel/panel.component.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@
142142
margin-left: 8px;
143143
}
144144
}
145-
}
145+
}

src/app/core/record-affiliations/record-affiliations.service.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import { HttpClient, HttpHeaders } from '@angular/common/http'
22
import { Injectable } from '@angular/core'
33
import { BehaviorSubject, Observable, of, ReplaySubject } from 'rxjs'
4-
import { catchError, finalize, map, retry, switchMap, tap } from 'rxjs/operators'
4+
import {
5+
catchError,
6+
finalize,
7+
map,
8+
retry,
9+
switchMap,
10+
tap,
11+
} from 'rxjs/operators'
512
import {
613
AffiliationUIGroup,
714
AffiliationsEndpoint,

src/app/layout/header/header.component.html

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,7 @@
6666
<!-- Mobile/tablet spacer to offset fixed compact record header -->
6767
<div
6868
class="compact-record-header-spacer"
69-
*ngIf="
70-
!platform.columns12 &&
71-
isCompactActive &&
72-
(isPublicRecord$ | async)
73-
"
69+
*ngIf="!platform.columns12 && isCompactActive && (isPublicRecord$ | async)"
7470
></div>
7571

7672
<mat-divider></mat-divider>

src/app/record/components/affiliation-stack/affiliation-stack.component.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
import { Component, EventEmitter, HostBinding, Input, OnDestroy, OnInit, Output } from '@angular/core'
1+
import {
2+
Component,
3+
EventEmitter,
4+
HostBinding,
5+
Input,
6+
OnDestroy,
7+
OnInit,
8+
Output,
9+
} from '@angular/core'
210
import { combineLatest, Observable, of, Subject } from 'rxjs'
311
import { first, takeUntil, finalize } from 'rxjs/operators'
412
import { OrganizationsService } from 'src/app/core'
@@ -253,7 +261,10 @@ export class AffiliationStackComponent implements OnInit, OnDestroy {
253261
}
254262

255263
loadingFeatured: { [key: string]: boolean } = {}
256-
@Output() featuredToggled = new EventEmitter<{ affiliationName: string; featured: boolean }>()
264+
@Output() featuredToggled = new EventEmitter<{
265+
affiliationName: string
266+
featured: boolean
267+
}>()
257268

258269
toggleFeatured(affiliation: Affiliation) {
259270
const putCode = affiliation.featured ? '' : affiliation.putCode.value

src/app/record/components/affiliation-stacks-groups/affiliation-stacks-groups.component.html

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,30 @@
3333
role="alert"
3434
class="featured-success-alert"
3535
>
36-
3736
<span content class="orc-font-body-small">
3837
<span class="orc-font-body-small">
39-
<ng-container i18n="@@shared.featuredAffiliationSuccessMessageBefore">Your affiliation</ng-container>
38+
<ng-container
39+
i18n="@@shared.featuredAffiliationSuccessMessageBefore"
40+
>Your affiliation</ng-container
41+
>
4042
<strong>{{ featuredAffiliationName }}</strong>
41-
<ng-container i18n="@@shared.featuredAffiliationSuccessMessageAfter">has been highlighted and will be shown at the top of your public record. To remove this highlight click the star icon next to the affiliation name.</ng-container>
43+
<ng-container i18n="@@shared.featuredAffiliationSuccessMessageAfter"
44+
>has been highlighted and will be shown at the top of your public
45+
record. To remove this highlight click the star icon next to the
46+
affiliation name.</ng-container
47+
>
4248
</span>
43-
<p><a
44-
class="underline brand-primary-darkest-link"
45-
rel="noopener noreferrer"
46-
target="_blank"
47-
href="https://support.orcid.org/hc/en-us/articles/360006894834-Add-employment-information-to-your-ORCID-record"
48-
i18n="@@shared.featuredAffiliationLearnMore"
49-
>
50-
Find out more about highlighting affiliations in your ORCID record
49+
<p>
50+
<a
51+
class="underline brand-primary-darkest-link"
52+
rel="noopener noreferrer"
53+
target="_blank"
54+
href="https://support.orcid.org/hc/en-us/articles/360006894834-Add-employment-information-to-your-ORCID-record"
55+
i18n="@@shared.featuredAffiliationLearnMore"
56+
>
57+
Find out more about highlighting affiliations in your ORCID record
5158
</a>
52-
</p>
59+
</p>
5360
</span>
5461
</app-alert-message>
5562
<app-alert-message
@@ -58,14 +65,30 @@
5865
role="alert"
5966
class="featured-notice-alert"
6067
>
61-
<span title i18n="@@shared.highlightYourAffiliations">Highlight your affiliations</span>
68+
<span title i18n="@@shared.highlightYourAffiliations"
69+
>Highlight your affiliations</span
70+
>
6271
<span content class="orc-font-body-small">
6372
<span class="orc-font-body-small">
64-
<ng-container i18n="@@shared.featuredAffiliationNoticeMessagePart1">Highlighted affiliations are shown at the top of your public record.</ng-container>
65-
<ng-container i18n="@@shared.featuredAffiliationNoticeMessagePart2Before">To highlight an affiliation click the</ng-container>
73+
<ng-container i18n="@@shared.featuredAffiliationNoticeMessagePart1"
74+
>Highlighted affiliations are shown at the top of your public
75+
record.</ng-container
76+
>
77+
<ng-container
78+
i18n="@@shared.featuredAffiliationNoticeMessagePart2Before"
79+
>To highlight an affiliation click the</ng-container
80+
>
6681
<strong>star</strong>
67-
<ng-container i18n="@@shared.featuredAffiliationNoticeMessagePart2After">icon next to the affiliation name.</ng-container>
68-
<em><ng-container i18n="@@shared.featuredAffiliationNoticeMessagePart3">You can only highlight one affiliation at a time.</ng-container></em>
82+
<ng-container
83+
i18n="@@shared.featuredAffiliationNoticeMessagePart2After"
84+
>icon next to the affiliation name.</ng-container
85+
>
86+
<em
87+
><ng-container
88+
i18n="@@shared.featuredAffiliationNoticeMessagePart3"
89+
>You can only highlight one affiliation at a time.</ng-container
90+
></em
91+
>
6992
</span>
7093
<p>
7194
<a

src/app/record/components/affiliation-stacks-groups/affiliation-stacks-groups.component.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export class AffiliationStacksGroupsComponent implements OnInit {
133133
'PROFESSIONAL_ACTIVITIES'
134134
)
135135
}
136-
136+
137137
// Check for featured affiliation after affiliations are loaded
138138
this.checkForFeaturedAffiliationOnRegistration()
139139
// Check if notice alert should be shown (no featured affiliation)
@@ -224,7 +224,8 @@ export class AffiliationStacksGroupsComponent implements OnInit {
224224
if (platform.queryParameters.hasOwnProperty('justRegistered')) {
225225
const featuredAffiliation = this.findFeaturedAffiliation()
226226
if (featuredAffiliation) {
227-
this.featuredAffiliationName = featuredAffiliation.affiliationName?.value || ''
227+
this.featuredAffiliationName =
228+
featuredAffiliation.affiliationName?.value || ''
228229
this.showFeaturedSuccessAlert = true
229230
}
230231
}
@@ -271,7 +272,11 @@ export class AffiliationStacksGroupsComponent implements OnInit {
271272
// 2. There are employment affiliations
272273
// 3. No featured affiliation exists
273274
// 4. Not a public record (users can only highlight on their own record)
274-
if (this.showFeaturedSuccessAlert || !this.userRecord?.affiliations || this.isPublicRecord) {
275+
if (
276+
this.showFeaturedSuccessAlert ||
277+
!this.userRecord?.affiliations ||
278+
this.isPublicRecord
279+
) {
275280
this.showFeaturedNoticeAlert = false
276281
return
277282
}

src/app/record/components/record-header/record-header.component.ts

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { Component, EventEmitter, Inject, Input, OnInit, Output } from '@angular/core'
1+
import {
2+
Component,
3+
EventEmitter,
4+
Inject,
5+
Input,
6+
OnInit,
7+
Output,
8+
} from '@angular/core'
29
import { CommonModule, NgIf } from '@angular/common'
310
import { Router } from '@angular/router'
411
import { RecordHeaderStateService } from 'src/app/core/record-header-state/record-header-state.service'
@@ -164,7 +171,11 @@ export class RecordHeaderComponent implements OnInit {
164171
// Compact state
165172
this._compact.compactActive$
166173
.pipe(takeUntil(this.$destroy))
167-
.subscribe((active) => (this.disableCompactMode ? this.compactMode = false : this.compactMode = !!active))
174+
.subscribe((active) =>
175+
this.disableCompactMode
176+
? (this.compactMode = false)
177+
: (this.compactMode = !!active)
178+
)
168179

169180
// Subscribe to shared state for inputs
170181
this._state.loadingUserRecord$

src/app/record/pages/my-orcid/my-orcid.component.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
[isPublicRecord]="publicOrcid"
55
></app-top-bar-my-public-record-preview>
66

7-
87
<!--
98
The following record is always display, even in compact mode it works as a hidden placeholder while the user scrolls the page
109
During compact mode the record header visible is displayed from header.component

0 commit comments

Comments
 (0)