From d268a7ab4827012d18bb9a326fa781c230a8aac1 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Date: Thu, 31 Aug 2023 15:46:13 -0600 Subject: [PATCH 1/3] 8762-trust-summary-ui-locked-deprecated-or-deactivated --- .../pages/trusted-summary/trusted-summary.component.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 54f76145b5..8b9a206da2 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 @@ -32,7 +32,7 @@
From 1dc66645d4ea2063185d90cb668b2116efa3fd74 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Date: Thu, 31 Aug 2023 16:32:12 -0600 Subject: [PATCH 2/3] 8823-qa-hover-effects-and-styling-in-summary-page-not-implemented --- .../summary-panel.component.html | 11 +++- .../summary-panel.component.scss | 11 +++- .../summary-panel.component.scss-theme.scss | 22 ++++++- .../summary-panel/summary-panel.component.ts | 13 +++- .../summary-simple-panel.component.html | 7 ++- .../summary-simple-panel.component.scss | 9 +++ ...ary-simple-panel.component.scss-theme.scss | 22 ++++++- .../summary-simple-panel.component.ts | 11 +++- .../trusted-summary.component.html | 61 +++++++++++++++++-- .../trusted-summary.component.scss | 14 ++--- .../trusted-summary.component.scss-theme.scss | 22 +++++-- .../trusted-summary.component.ts | 8 +++ 12 files changed, 185 insertions(+), 26 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 ba54e4e047..822061afa0 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 @@ -1,7 +1,12 @@ -
+
{{ activity.organizationName }} + >{{ activity.organizationName }} +

3 } } + goToUrl(url?: string) { + if (!url) { + return + } + console.log(url) + this._window.open(url, '_blank') + } } 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 23531718ab..9421d62904 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 @@ -1,4 +1,8 @@ -
+
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 1efcf317d0..1f0fe2e0e5 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 @@ -10,6 +10,15 @@ background-color: white; } +.activity-container:hover { + cursor: pointer; + a { + text-decoration: underline; + cursor: pointer; + } +} + + .activity-container.padding-botton { padding-bottom: 16px; } diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss index e50e10673e..ddcaf2c8eb 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss @@ -8,6 +8,26 @@ $foreground: map-get($theme, foreground); $background: map-get($theme, background); + .card-container.hover { + border-color: mat.get-color-from-palette($primary, 500); + } + + .activity-container:hover { + a { + text-decoration: underline; + cursor: pointer; + color: map-get($foreground, 'brand-primary-dark'); + + + } + + svg { + path { + fill: map-get($foreground, 'brand-primary-dark'); + } + } + } + .verified { color: mat.get-color-from-palette($accent, 400); } @@ -37,4 +57,4 @@ } } -@include theme($orcid-app-theme); +@include theme($orcid-app-theme); \ 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 4c24760ec6..0db3d4b708 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 @@ -1,7 +1,8 @@ -import { Component, Input, OnDestroy, OnInit } from '@angular/core' +import { Component, Inject, Input, OnDestroy, OnInit } from '@angular/core' import { Subject } from 'rxjs' import { takeUntil } from 'rxjs/operators' import { PlatformInfoService } from 'src/app/cdk/platform-info' +import { WINDOW } from 'src/app/cdk/window' export interface SimpleActivityModel { verified?: boolean @@ -28,14 +29,22 @@ export class SummarySimplePanelComponent implements OnInit { @Input() count: number = 0 @Input() moreLabel: string = '' @Input() moreLabelSingular: string = '' + @Input() hoverEffect = false @Input() overflowUrl: string = '' unsubscribe = new Subject() mobile: boolean acitivityCountOverflow = false + constructor(@Inject(WINDOW) private _window: Window) {} ngOnInit(): void { this.acitivityCountOverflow = this.simpleActivities.length > 3 this.simpleActivities = this.simpleActivities.slice(0, 3) } + goToUrl(url?: string) { + if (!url) { + return + } + this._window.open(url, '_blank') + } } 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 8b9a206da2..9ec0e98765 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 @@ -118,8 +118,14 @@

href="{{ trustedSummary.orcid }}#affiliations" target="_blank" rel="noopener noreferrer" + (mouseenter)="affiliationsHover = true" + (mouseleave)="affiliationsHover = false" > -

+

AFFILIATIONS

@@ -129,6 +135,7 @@

[count]="trustedSummary.employmentAffiliationsCount" [moreLabel]="labelMoreAffiliations" [moreLabelSingular]="labelMoreAffiliation" + [hoverEffect]="affiliationsHover" > @@ -187,10 +194,21 @@

href="{{ trustedSummary.orcid }}#works" target="_blank" rel="noopener noreferrer" + (mouseenter)="worksHover = true" + (mouseleave)="worksHover = false" > -

WORKS

+

+ WORKS +

@@ -199,12 +217,21 @@

WORKS

href="{{ trustedSummary.orcid }}#peer-reviews" target="_blank" rel="noopener noreferrer" + (mouseenter)="peerReviewsHover = true" + (mouseleave)="peerReviewsHover = false" > -

+

PEER REVIEWS

@@ -213,11 +240,22 @@

href="{{ trustedSummary.orcid }}#funding" target="_blank" rel="noopener noreferrer" + (mouseenter)="fundsHover = true" + (mouseleave)="fundsHover = false" > -

FUNDING

+

+ FUNDING +

@@ -234,15 +272,21 @@

FUNDING

href="{{ trustedSummary.orcid }}#professional-activities" target="_blank" rel="noopener noreferrer" + (mouseenter)="professionalActivitiesHover = true" + (mouseleave)="professionalActivitiesHover = false" >

PROFESSIONAL ACTIVITIES

FUNDING

href="{{ trustedSummary.orcid }}#other-identifiers" target="_blank" rel="noopener noreferrer" + (mouseenter)="externalIdentifiersHover = true" + (mouseleave)="externalIdentifiersHover = false" > -

+

OTHER IDENTIFIERS

@@ -266,6 +316,7 @@

[overflowUrl]="trustedSummary?.orcid + '#other-identifiers'" [moreLabel]="labelMoreOtherIdentifiers" [moreLabelSingular]="labelMoreOtherIdentifier" + [hoverEffect]="externalIdentifiersHover" >

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 b51ebfb070..7c8f4b088c 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 @@ -3,6 +3,8 @@ justify-content: center; } + + main { margin-top: 32px; } @@ -166,7 +168,7 @@ a { color: #fff; text-decoration: underline; - > svg > path { + >svg>path { fill: #fff; } @@ -175,11 +177,9 @@ a { gap: 8px; } - h1 { - color: #fff; - } - h2 { - color: black; + h2.hover-effect { + text-decoration: underline; } -} + +} \ 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 6e5d8b242b..49211ef7f5 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,20 @@ $foreground: map-get($theme, foreground); $background: map-get($theme, background); + a { + h2.hover-effect { + color: mat.get-color-from-palette($primary, 500); + } + + h1 { + color: #fff; + } + + h2 { + color: black; + } + } + .day-title { color: map-get($foreground, 'text-dark-mid'); } @@ -26,10 +40,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 { @@ -49,4 +61,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 3547c99321..b9a78c11c6 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 @@ -24,6 +24,13 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { orcid: string works: SimpleActivityModel[] = [] unsubscribe = new Subject() + affiliationsHover = false + worksHover = false + peerReviewsHover = false + fundsHover = false + externalIdentifiersHover = false + professionalActivitiesHover = false + labelValidatedWorks = $localize`:@@summary.validatedWorks:Validated works` labelValidatedWork = $localize`:@@summary.validatedWork:Validated work` labelSelfAssertedWorks = $localize`:@@summary.selfAssertedWorks:Self-asserted works` @@ -209,4 +216,5 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { const offsettedDate = new Date(date.getTime() + offset * 60 * 1000) return offsettedDate } + } From 26676802def3751652091f79d3eedf0c7d7b79c5 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Date: Thu, 31 Aug 2023 16:33:59 -0600 Subject: [PATCH 3/3] fix testing --- .../component/summary-panel/summary-panel.component.scss | 2 +- .../summary-panel/summary-panel.component.scss-theme.scss | 4 +--- .../summary-panel/summary-panel.component.spec.ts | 3 ++- .../component/summary-panel/summary-panel.component.ts | 1 - .../summary-simple-panel.component.scss | 1 - .../summary-simple-panel.component.scss-theme.scss | 4 +--- .../summary-simple-panel.component.spec.ts | 2 ++ .../pages/trusted-summary/trusted-summary.component.scss | 8 ++------ .../trusted-summary.component.scss-theme.scss | 8 +++++--- .../pages/trusted-summary/trusted-summary.component.ts | 4 +--- 10 files changed, 15 insertions(+), 22 deletions(-) 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 ca030ce4eb..6742ffee9c 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 @@ -88,4 +88,4 @@ mat-icon { a { font-weight: 400; -} \ No newline at end of file +} diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss-theme.scss b/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss-theme.scss index ddcaf2c8eb..797585412f 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss-theme.scss +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.scss-theme.scss @@ -17,8 +17,6 @@ text-decoration: underline; cursor: pointer; color: map-get($foreground, 'brand-primary-dark'); - - } svg { @@ -57,4 +55,4 @@ } } -@include theme($orcid-app-theme); \ No newline at end of file +@include theme($orcid-app-theme); diff --git a/src/app/trusted-summary/component/summary-panel/summary-panel.component.spec.ts b/src/app/trusted-summary/component/summary-panel/summary-panel.component.spec.ts index 7c1361fbc8..6b4729456e 100644 --- a/src/app/trusted-summary/component/summary-panel/summary-panel.component.spec.ts +++ b/src/app/trusted-summary/component/summary-panel/summary-panel.component.spec.ts @@ -1,6 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' import { SummaryPanelComponent } from './summary-panel.component' +import { WINDOW_PROVIDERS } from 'src/app/cdk/window' describe('SummaryPanelComponent', () => { let component: SummaryPanelComponent @@ -9,7 +10,7 @@ describe('SummaryPanelComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [SummaryPanelComponent], - providers: [], + providers: [WINDOW_PROVIDERS], }).compileComponents() fixture = TestBed.createComponent(SummaryPanelComponent) 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 bda7538d92..e031e36e0b 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 @@ -45,7 +45,6 @@ export class SummaryPanelComponent implements OnInit { if (!url) { return } - console.log(url) this._window.open(url, '_blank') } } 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 1f0fe2e0e5..40b60bedbf 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 @@ -18,7 +18,6 @@ } } - .activity-container.padding-botton { padding-bottom: 16px; } diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss index ddcaf2c8eb..797585412f 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.scss-theme.scss @@ -17,8 +17,6 @@ text-decoration: underline; cursor: pointer; color: map-get($foreground, 'brand-primary-dark'); - - } svg { @@ -57,4 +55,4 @@ } } -@include theme($orcid-app-theme); \ No newline at end of file +@include theme($orcid-app-theme); diff --git a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.spec.ts b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.spec.ts index 15255373ae..8e9adc20c4 100644 --- a/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.spec.ts +++ b/src/app/trusted-summary/component/summary-simple-panel/summary-simple-panel.component.spec.ts @@ -1,6 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing' import { SummarySimplePanelComponent } from './summary-simple-panel.component' +import { WINDOW_PROVIDERS } from 'src/app/cdk/window' describe('SummarySimplePanelComponent', () => { let component: SummarySimplePanelComponent @@ -9,6 +10,7 @@ describe('SummarySimplePanelComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [SummarySimplePanelComponent], + providers: [WINDOW_PROVIDERS], }).compileComponents() fixture = TestBed.createComponent(SummarySimplePanelComponent) 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 7c8f4b088c..05cf7e2c1f 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 @@ -3,8 +3,6 @@ justify-content: center; } - - main { margin-top: 32px; } @@ -168,7 +166,7 @@ a { color: #fff; text-decoration: underline; - >svg>path { + > svg > path { fill: #fff; } @@ -177,9 +175,7 @@ a { gap: 8px; } - h2.hover-effect { text-decoration: underline; } - -} \ 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 49211ef7f5..3c04a855ac 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 @@ -40,8 +40,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 { @@ -61,4 +63,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 b9a78c11c6..36e5db2ff7 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 @@ -30,7 +30,7 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { fundsHover = false externalIdentifiersHover = false professionalActivitiesHover = false - + labelValidatedWorks = $localize`:@@summary.validatedWorks:Validated works` labelValidatedWork = $localize`:@@summary.validatedWork:Validated work` labelSelfAssertedWorks = $localize`:@@summary.selfAssertedWorks:Self-asserted works` @@ -101,7 +101,6 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { this.creationDateWithOffset = this.dateWithOffset( this.trustedSummary.creation ) - console.log('this.creationDateWithOffset', this.creationDateWithOffset) // if record was created today if ( this.creationDateWithOffset.toDateString() === @@ -216,5 +215,4 @@ export class TrustedSummaryComponent implements OnInit, OnDestroy { const offsettedDate = new Date(date.getTime() + offset * 60 * 1000) return offsettedDate } - }