From ddd3c984f98cdbd37adcf43bbda781f24ca56a4d Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Date: Wed, 16 Aug 2023 16:00:06 -0600 Subject: [PATCH 1/4] leo/aug-16-batch-of-fixes --- .../summary-panel.component.html | 6 +-- .../summary-panel.component.scss | 20 +++++++-- .../summary-panel/summary-panel.component.ts | 4 +- .../summary-simple-panel.component.html | 2 +- .../summary-simple-panel.component.scss | 19 +++++++-- .../summary-simple-panel.component.ts | 1 + .../trusted-summary.component.html | 17 ++++---- .../trusted-summary.component.scss | 42 +++++++++++++++---- .../trusted-summary.component.scss-theme.scss | 13 +++--- .../trusted-summary.component.ts | 15 +++++-- src/app/types/trust-summary.ts | 4 +- .../properties/summary/summary.en.properties | 2 +- 12 files changed, 107 insertions(+), 38 deletions(-) diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.html b/src/app/trusted-summary/component/summary-panel/summary-panel.component.html index 7b85790e68..f3e1531d10 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.html +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.html @@ -94,7 +94,7 @@
{{ activity.role }}
-
{{ activity.type }}
+
{{ activity.type | affiliationTypeLabel | lowercase }}
@@ -105,7 +105,7 @@ target="_blank" rel="noopener noreferrer" >+ {{ count - 3 }} - more + {{ moreLabel }} + diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss b/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss index 36be12373c..8c3cf93179 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss @@ -30,14 +30,17 @@ .header { display: flex; flex-direction: row; - align-items: center; + align-items: initial; justify-content: space-between; .header-title { display: flex; - align-items: center; + align-items: initial; + max-width: 100%; h3 { + overflow: hidden; + word-wrap: break-word; font-weight: 400; margin: 0; @@ -69,10 +72,19 @@ mat-icon.margin-compensation { } mat-icon { - min-width: 22px; + min-width: 25px; margin-inline-end: 3px; + margin-top: -3px; + + img { + + margin-top: 2px; + display: block; + + } } + a { font-weight: 400; -} +} \ No newline at end of file diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts b/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts index 93e0381bb3..e0e2f582d9 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts @@ -9,6 +9,7 @@ import { ActivitySummary } from 'src/app/types/trust-summary' './summary-panel.component.scss', './summary-panel.component.scss-theme.scss', ], + preserveWhitespaces: true, }) export class SummaryPanelComponent implements OnInit { validatedSourceAriaLabel = $localize`:@@summary.validatedSource:Validated source` @@ -16,6 +17,7 @@ export class SummaryPanelComponent implements OnInit { @Input() activitySummary: ActivitySummary[] @Input() url: string = '' @Input() count: number = 0 + @Input() moreLabel: string = '' activitiesToDisplay: ActivitySummary[] acitivityCountOverflow: boolean unsubscribe = new Subject() @@ -27,7 +29,7 @@ export class SummaryPanelComponent implements OnInit { ngOnInit(): void { if (this.activitySummary) { - this.activitySummary = [...this.activitySummary, ...this.activitySummary] + this.activitySummary = [...this.activitySummary] this.activitiesToDisplay = this.activitySummary.slice(0, 3) this.acitivityCountOverflow = this.count > 3 diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html index 10b578f25c..fa0d50ac5a 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html @@ -91,7 +91,7 @@ class="underline orc-font-body-small" target="_blank" rel="noopener noreferrer" - >+ {{ count - 3 }} more Affiliations+ {{ count - 3 }} {{ moreLabel }} diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss index 607ba86870..f3a449cadb 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss @@ -24,13 +24,18 @@ flex-direction: row; align-items: center; justify-content: space-between; + height: 24px; + max-width: 100%; .header-title { + max-width: 100%; display: flex; - align-items: center; + align-items: initial; h3 { margin: 0; + overflow: hidden; + } } @@ -59,9 +64,17 @@ mat-icon.margin-compensation { mat-icon { min-width: 25px; - margin-inline-end: 8px; + margin-inline-end: 3px; + margin-top: -3px; + + img { + + margin-top: 2px; + display: block; + + } } a { font-weight: 400; -} +} \ No newline at end of file diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts index 9cd5442836..721f639cbf 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts @@ -26,6 +26,7 @@ export class SummarySimplePanelComponent implements OnInit { selftAssertedSource = $localize`:@@summary.selfAssertedSource:Self-asserted source` @Input() simpleActivities: SimpleActivityModel[] = [] @Input() count: number = 0 + @Input() moreLabel: string = '' @Input() overflowUrl: string = '' unsubscribe = new Subject() mobile: boolean diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html index 18675e8b3b..8dfefed665 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html @@ -4,6 +4,7 @@ [ngClass]="{ mobile: mobile }" + [ngClass]="insideIframe ? 'inside-iframe' : ''" >
@@ -63,9 +64,8 @@

@@ -137,7 +138,7 @@

KEY DATES

@@ -202,9 +203,10 @@

FUNDING

@@ -220,7 +222,8 @@

diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss index f3f2afdcd7..2a81cef76e 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss @@ -1,8 +1,18 @@ :host { display: flex; - align-items: center; justify-content: center; - min-height: 100vh; + + +} + +main { + margin-top: 32px; + +} + +main.inside-iframe { + margin-top: 0px; + } .panel { @@ -10,6 +20,7 @@ grid-gap: 16px; border-radius: 8px 8px 0px 0px; border: 2px solid; + } .panel-header { @@ -54,7 +65,8 @@ } .panel-body-3-cols { - grid-template-columns: 1fr 1fr 1fr; + // 3 columns with a max with of 320px each + grid-template-columns: repeat(3, minmax(auto, 340px)); } .panel-body-2-cols { @@ -62,7 +74,7 @@ } .panel-body-1-cols { - grid-template-columns: 1fr; + grid-template-columns: 340px; } .column-border { @@ -77,6 +89,12 @@ h2 { main { max-width: 100%; overflow: hidden; + + +} + +main.panel.mobile { + max-width: 340px; } .date-item { @@ -95,7 +113,11 @@ main { } ul { + list-style-type: none; + + margin: 0; margin: 0; + padding-inline-start: 29px; } ul li { @@ -106,8 +128,8 @@ ul li { ul li:after { content: url('/assets/vectors/bullet-point.svg'); position: absolute; - left: -26px; - top: 0px; + left: -29px; + top: 5px; } ul li:before { @@ -117,6 +139,8 @@ ul li:before { border-left: 1px dashed; height: 100%; width: 1px; + left: -19px; + top: 6px; } ul li:first-child:before { @@ -149,12 +173,12 @@ a { color: #fff; text-decoration: underline; - > svg > path { + >svg>path { fill: #fff; } display: flex; - align-items: centerf; + align-items: center; gap: 8px; } @@ -165,4 +189,4 @@ a { h2 { color: black; } -} +} \ No newline at end of file diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss index 16c1a12257..66042f0321 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss @@ -8,6 +8,11 @@ $foreground: map-get($theme, foreground); $background: map-get($theme, background); + :host { + background-color: map-get($background, 'ui-background-lightest'); + + } + .verified { color: mat.get-color-from-palette($accent, 400); } @@ -18,10 +23,8 @@ .panel, .panel-header { - border-color: mat.get-color-from-palette( - $background, - ui-background-darkest - ); + border-color: mat.get-color-from-palette($background, + ui-background-darkest); } .panel-header { @@ -41,4 +44,4 @@ } } -@include theme($orcid-app-theme); +@include theme($orcid-app-theme); \ No newline at end of file diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts index a951ef3fbc..01863bb93c 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts @@ -1,4 +1,4 @@ -import { Component, OnDestroy, OnInit } from '@angular/core' +import { Component, Inject, OnDestroy, OnInit } from '@angular/core' import { Router } from '@angular/router' import { TrustedSummaryService } from 'src/app/core/trusted-summary/trusted-summary.service' import { TrustedSummary } from 'src/app/types/trust-summary' @@ -8,6 +8,7 @@ import { takeUntil } from 'rxjs/operators' import { Subject } from 'rxjs' import { RobotsMetaTagsService } from 'src/app/core/robots-meta-tags/robots-meta-tags.service' import { ZendeskService } from 'src/app/core/zendesk/zendesk.service' +import { WINDOW } from 'src/app/cdk/window' @Component({ selector: 'app-trusted-summary', @@ -33,8 +34,12 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { labelSelfAssertedFundings = $localize`:@@summary.selfAssertedFundings:Self-asserted fundings` labelReviesFor = $localize`:@@summary.reviewsFor:reviews for` labelReviewFor = $localize`:@@summary.reviewFor:review for` - labelpublicationgrants = $localize`:@@summary.publicationgrantes:publication/grants` + labelpublicationgrants = $localize`:@@summary.publicationgrantes:publications/grants` labelpublicationgrant = $localize`:@@summary.publicationgrant:publication/grant` + labelMoreAffiliations = $localize`:@@summary.moreAffiliations:more Affiliations` + labelMoreProfessionalActivities = $localize`:@@summary.moreProfessionalActivities:more Professional activities` + labelMoreOtherIdentifiers = $localize`:@@summary.moreOtherIdentifiers:more Other Identifiers` + insideIframe: boolean funds: SimpleActivityModel[] = [] peerReviews: SimpleActivityModel[] = [] @@ -53,7 +58,9 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { private _router: Router, private _platform: PlatformInfoService, private _robotsMetaTags: RobotsMetaTagsService, - private _zendeskService: ZendeskService + private _zendeskService: ZendeskService, + // import window + @Inject(WINDOW) private _window: Window ) {} ngOnDestroy(): void { this.unsubscribe.next() @@ -62,6 +69,8 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { } ngOnInit(): void { + this.insideIframe = this._window.self !== this._window.top + console.log('insideIframe' , this.insideIframe) this._zendeskService.hide() this._robotsMetaTags.disallowRobots() this._platform diff --git a/src/app/types/trust-summary.ts b/src/app/types/trust-summary.ts index b9d17151e4..ea93543cfb 100644 --- a/src/app/types/trust-summary.ts +++ b/src/app/types/trust-summary.ts @@ -1,3 +1,5 @@ +import { AffiliationType } from "./record-affiliation.endpoint" + export interface TrustedSummary { name: string orcid: string @@ -23,6 +25,6 @@ export interface ActivitySummary { endDate?: string role?: string title: any - type: string + type: AffiliationType validated: boolean } diff --git a/src/locale/properties/summary/summary.en.properties b/src/locale/properties/summary/summary.en.properties index 929a3195f9..ffa696248f 100644 --- a/src/locale/properties/summary/summary.en.properties +++ b/src/locale/properties/summary/summary.en.properties @@ -21,6 +21,6 @@ summary.selfAssertedFunding=Self-asserted funding summary.selfAssertedFundings=Self-asserted fundings summary.reviewsFor=reviews for summary.reviewFor=review for -summary.publicationgrantes=publication/grants +summary.publicationgrantes=publications/grants summary.publicationgrant=publication/grant summary.nameIsPrivateOrLimited=Name is private or limited From e745bce18ce7f452dbc76b0724a5d4665e8cff53 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Date: Wed, 16 Aug 2023 16:22:24 -0600 Subject: [PATCH 2/4] aug-16-fixes --- .../component/summary-panel/summary-panel.component.html | 9 +++++++-- .../component/summary-panel/summary-panel.component.ts | 1 + .../summary-simple-panel.component.html | 5 +++-- .../summary-simple-panel.component.scss | 8 +++++++- .../summary-simple-panel.component.ts | 2 ++ .../pages/trusted-summary/trusted-summary.component.html | 3 +++ .../pages/trusted-summary/trusted-summary.component.ts | 5 ++++- src/locale/properties/summary/summary.en.properties | 6 ++++++ 8 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.html b/src/app/trusted-summary/component/summary-panel/summary-panel.component.html index f3e1531d10..e1b04b470b 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.html +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.html @@ -94,7 +94,9 @@
{{ activity.role }}
-
{{ activity.type | affiliationTypeLabel | lowercase }}
+
+ {{ activity.type | affiliationTypeLabel | lowercase }} +
@@ -105,7 +107,10 @@ target="_blank" rel="noopener noreferrer" >+ {{ count - 3 }} - {{ moreLabel }} + {{ + moreLabelSingular + }} + {{ moreLabel }} diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts b/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts index e0e2f582d9..fec89fd45f 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts @@ -18,6 +18,7 @@ export class SummaryPanelComponent implements OnInit { @Input() url: string = '' @Input() count: number = 0 @Input() moreLabel: string = '' + @Input()moreLabelSingular: string = '' activitiesToDisplay: ActivitySummary[] acitivityCountOverflow: boolean unsubscribe = new Subject() diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html index fa0d50ac5a..8366a02a37 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html @@ -22,7 +22,7 @@ > -
+
+ {{ count - 3 }} {{ moreLabel }}+ {{ count - 3 }} {{ moreLabel }} + {{ moreLabelSingular }}
diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss index f3a449cadb..fb7c7526a6 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss @@ -24,7 +24,6 @@ flex-direction: row; align-items: center; justify-content: space-between; - height: 24px; max-width: 100%; .header-title { @@ -77,4 +76,11 @@ mat-icon { a { font-weight: 400; + max-width: 100%; +} + +.text-container { + max-width: 210px; + overflow: hidden ; + word-wrap: break-word; } \ No newline at end of file diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts index 721f639cbf..93203cc209 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.ts @@ -27,6 +27,8 @@ export class SummarySimplePanelComponent implements OnInit { @Input() simpleActivities: SimpleActivityModel[] = [] @Input() count: number = 0 @Input() moreLabel: string = '' + @Input() moreLabelSingular: string = '' + @Input() overflowUrl: string = '' unsubscribe = new Subject() mobile: boolean diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html index 8dfefed665..13484aeeda 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.html @@ -87,6 +87,7 @@

[activitySummary]="trustedSummary.employmentAffiliations" [count]="trustedSummary.employmentAffiliationsCount" [moreLabel]="labelMoreAffiliations" + [moreLabelSingular]="labelMoreAffiliation" > @@ -207,6 +208,7 @@

FUNDING

[activitySummary]="trustedSummary.professionalActivities" [count]="trustedSummary.professionalActivitiesCount" [moreLabel]="labelMoreProfessionalActivities" + moreLabelSingular="labelMoreProfessionalActivitie" > @@ -224,6 +226,7 @@

[count]="externalIdentifiers?.length" [overflowUrl]="trustedSummary?.orcid + '#other-identifiers'" [moreLabel]="labelMoreOtherIdentifiers" + [moreLabelSingular]="labelMoreOtherIdentifier" > diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts index 01863bb93c..627728a7e1 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts @@ -40,6 +40,10 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { labelMoreProfessionalActivities = $localize`:@@summary.moreProfessionalActivities:more Professional activities` labelMoreOtherIdentifiers = $localize`:@@summary.moreOtherIdentifiers:more Other Identifiers` insideIframe: boolean + labelMoreAffiliation = $localize`:@@summary.moreAffiliation:more Affiliation` + labelMoreProfessionalActivitie = $localize`:@@summary.moreProfessionalActivitie:more Professional activity` + labelMoreOtherIdentifier= $localize`:@@summary.moreOtherIdentifier:more Other Identifier` + funds: SimpleActivityModel[] = [] peerReviews: SimpleActivityModel[] = [] @@ -70,7 +74,6 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { ngOnInit(): void { this.insideIframe = this._window.self !== this._window.top - console.log('insideIframe' , this.insideIframe) this._zendeskService.hide() this._robotsMetaTags.disallowRobots() this._platform diff --git a/src/locale/properties/summary/summary.en.properties b/src/locale/properties/summary/summary.en.properties index ffa696248f..25c2d98442 100644 --- a/src/locale/properties/summary/summary.en.properties +++ b/src/locale/properties/summary/summary.en.properties @@ -24,3 +24,9 @@ summary.reviewFor=review for summary.publicationgrantes=publications/grants summary.publicationgrant=publication/grant summary.nameIsPrivateOrLimited=Name is private or limited +summary.moreAffiliations=more Affiliations +summary.moreProfessionalActivities=more Professional activities +summary.moreOtherIdentifiers=more Other Identifiers + summary.moreAffiliation=more Affiliation +summary.moreProfessionalActivitie=more Professional activity +summary.moreOtherIdentifier=more Other Identifier \ No newline at end of file From 7e449fc1e92ce525727a397a040a65adc7956259 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Date: Wed, 16 Aug 2023 16:24:03 -0600 Subject: [PATCH 3/4] format --- .../pages/link-account/link-account.component.ts | 2 +- .../summary-panel/summary-panel.component.scss | 5 +---- .../summary-panel/summary-panel.component.ts | 2 +- .../summary-simple-panel.component.html | 7 +++++-- .../summary-simple-panel.component.scss | 7 ++----- .../trusted-summary/trusted-summary.component.scss | 11 ++--------- .../trusted-summary.component.scss-theme.scss | 9 +++++---- .../trusted-summary/trusted-summary.component.ts | 3 +-- src/app/types/trust-summary.ts | 2 +- 9 files changed, 19 insertions(+), 29 deletions(-) diff --git a/src/app/link-account/pages/link-account/link-account.component.ts b/src/app/link-account/pages/link-account/link-account.component.ts index 1df92b9f3f..91cd6d6199 100644 --- a/src/app/link-account/pages/link-account/link-account.component.ts +++ b/src/app/link-account/pages/link-account/link-account.component.ts @@ -42,7 +42,7 @@ export class LinkAccountComponent implements OnInit { this.signInData = session.thirdPartyAuthData.signinData this.entityDisplayName = session.thirdPartyAuthData.entityDisplayName if (!this.entityDisplayName) { - this.entityDisplayName = this.signInData.providerId; + this.entityDisplayName = this.signInData.providerId } this.loading = false }) diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss b/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss index 8c3cf93179..8d5f53b2e1 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss @@ -77,14 +77,11 @@ mat-icon { margin-top: -3px; img { - margin-top: 2px; display: block; - } } - a { font-weight: 400; -} \ No newline at end of file +} diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts b/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts index fec89fd45f..8e61e8aa29 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.ts @@ -18,7 +18,7 @@ export class SummaryPanelComponent implements OnInit { @Input() url: string = '' @Input() count: number = 0 @Input() moreLabel: string = '' - @Input()moreLabelSingular: string = '' + @Input() moreLabelSingular: string = '' activitiesToDisplay: ActivitySummary[] acitivityCountOverflow: boolean unsubscribe = new Subject() diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html index 8366a02a37..c1359a04fe 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.html @@ -91,8 +91,11 @@ class="underline orc-font-body-small" target="_blank" rel="noopener noreferrer" - >+ {{ count - 3 }} {{ moreLabel }} - {{ moreLabelSingular }}+ {{ count - 3 }} + {{ moreLabel }} + {{ + moreLabelSingular + }} diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss index fb7c7526a6..8042ae930f 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss @@ -34,7 +34,6 @@ h3 { margin: 0; overflow: hidden; - } } @@ -67,10 +66,8 @@ mat-icon { margin-top: -3px; img { - margin-top: 2px; display: block; - } } @@ -81,6 +78,6 @@ a { .text-container { max-width: 210px; - overflow: hidden ; + overflow: hidden; word-wrap: break-word; -} \ No newline at end of file +} diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss index 2a81cef76e..b51ebfb070 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss @@ -1,18 +1,14 @@ :host { display: flex; justify-content: center; - - } main { margin-top: 32px; - } main.inside-iframe { margin-top: 0px; - } .panel { @@ -20,7 +16,6 @@ main.inside-iframe { grid-gap: 16px; border-radius: 8px 8px 0px 0px; border: 2px solid; - } .panel-header { @@ -89,8 +84,6 @@ h2 { main { max-width: 100%; overflow: hidden; - - } main.panel.mobile { @@ -173,7 +166,7 @@ a { color: #fff; text-decoration: underline; - >svg>path { + > svg > path { fill: #fff; } @@ -189,4 +182,4 @@ a { h2 { color: black; } -} \ No newline at end of file +} diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss index 66042f0321..cce5c3a612 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.scss-theme.scss @@ -10,7 +10,6 @@ :host { background-color: map-get($background, 'ui-background-lightest'); - } .verified { @@ -23,8 +22,10 @@ .panel, .panel-header { - border-color: mat.get-color-from-palette($background, - ui-background-darkest); + border-color: mat.get-color-from-palette( + $background, + ui-background-darkest + ); } .panel-header { @@ -44,4 +45,4 @@ } } -@include theme($orcid-app-theme); \ No newline at end of file +@include theme($orcid-app-theme); diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts index 627728a7e1..a81730dc80 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.ts @@ -42,8 +42,7 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { insideIframe: boolean labelMoreAffiliation = $localize`:@@summary.moreAffiliation:more Affiliation` labelMoreProfessionalActivitie = $localize`:@@summary.moreProfessionalActivitie:more Professional activity` - labelMoreOtherIdentifier= $localize`:@@summary.moreOtherIdentifier:more Other Identifier` - + labelMoreOtherIdentifier = $localize`:@@summary.moreOtherIdentifier:more Other Identifier` funds: SimpleActivityModel[] = [] peerReviews: SimpleActivityModel[] = [] diff --git a/src/app/types/trust-summary.ts b/src/app/types/trust-summary.ts index ea93543cfb..d44b59f0c8 100644 --- a/src/app/types/trust-summary.ts +++ b/src/app/types/trust-summary.ts @@ -1,4 +1,4 @@ -import { AffiliationType } from "./record-affiliation.endpoint" +import { AffiliationType } from './record-affiliation.endpoint' export interface TrustedSummary { name: string From ecb5c02602c56e7ef585a2f045e4ed32329e0732 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Date: Wed, 16 Aug 2023 16:28:00 -0600 Subject: [PATCH 4/4] Fix testing --- .../pages/trusted-summary/trusted-summary.component.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.spec.ts b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.spec.ts index ec4daff961..23b3359929 100644 --- a/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.spec.ts +++ b/src/app/trusted-summary/pages/trusted-summary/trusted-summary.component.spec.ts @@ -7,6 +7,7 @@ import { HttpClientTestingModule } from '@angular/common/http/testing' import { PlatformInfoService } from 'src/app/cdk/platform-info' import { of } from 'rxjs' import { ZendeskService } from 'src/app/core/zendesk/zendesk.service' +import { WINDOW } from 'src/app/cdk/window' describe('TrustedSummaryComponent', () => { let component: TrustedSummaryComponent @@ -26,6 +27,8 @@ describe('TrustedSummaryComponent', () => { provide: ZendeskService, useValue: { hide: () => of() }, }, + { provide: WINDOW, useValue: {} }, + ], imports: [HttpClientTestingModule], }).compileComponents()