From 83984ddf79b04a7bad70cac7a44d33ba365654db Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 4 May 2022 18:09:35 +0300 Subject: [PATCH 1/2] [Explore & Library & common-assets | new-theme]: No animation in sticky tabs | Tabs stop being sticky when bottom component is in viewport | Updates in powered by bottom message | Updates in statistics in datasource landing. 1. landing-utils.css: Commented transition ease-out in #main-tabs-div. 2. app.component.ts: Added id="bottom" in . 3. newSearchPage.component.html: Updated "Powered by OpenAIRE Research Graph" to make the link underlined on hover. 4. metrics.component.ts: Add classes "uk-text-small uk-text-meta" in "Powered by". 5. resultLanding.component.html & project.component.html & dataProvider.component.html: a. Updated "Powered by OpenAIRE Research Graph" to make the link underlined on hover. b. Add uk-sticky attribute in id="main-tabs-div" only if shouldSticky is true (bottom is not in the viewport). 6. resultLanding.component.ts & project.component.ts & dataProvider.component.ts: Added fields shouldSticky and observer, check in ngAfterViewInit() if bottom is intersecting and kill the observer in ngOnDestroy(). 7. statisticsTab.component.ts: Added customContainerClass="uk-background-default" customIframeClass="uk-blend-multiply" in . 8. showAuthors.component.ts: [Bug fix] In "View less authors" make only the link clickable, not the whole row. --- .../dataProvider/dataProvider.component.html | 8 ++++---- .../dataProvider/dataProvider.component.ts | 16 ++++++++++++++++ .../dataProvider/dataProvider.service.ts | 2 -- .../dataProvider/statisticsTab.component.ts | 15 ++++++++++----- .../landing-utils/metrics/metrics.component.ts | 2 +- landingPages/project/project.component.html | 8 ++++---- landingPages/project/project.component.ts | 16 ++++++++++++++++ .../result/resultLanding.component.html | 8 ++++---- landingPages/result/resultLanding.component.ts | 17 ++++++++++++++++- .../searchUtils/newSearchPage.component.html | 5 +++-- utils/authors/showAuthors.component.ts | 4 ++-- 11 files changed, 76 insertions(+), 25 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.component.html b/landingPages/dataProvider/dataProvider.component.html index 4c42e5e8..fcecfd70 100644 --- a/landingPages/dataProvider/dataProvider.component.html +++ b/landingPages/dataProvider/dataProvider.component.html @@ -49,9 +49,9 @@
- - Powered by OpenAIRE Research Graph - + + Powered by OpenAIRE Research Graph + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} @@ -125,7 +125,7 @@
diff --git a/landingPages/dataProvider/dataProvider.component.ts b/landingPages/dataProvider/dataProvider.component.ts index 79ea718b..b4e19223 100644 --- a/landingPages/dataProvider/dataProvider.component.ts +++ b/landingPages/dataProvider/dataProvider.component.ts @@ -124,6 +124,9 @@ export class DataProviderComponent { public graph_offset: number = 0; @ViewChild("graph_and_feedback") graph_and_feedback; + public shouldSticky: boolean = true; + private observer: IntersectionObserver; + subscriptions = []; properties: EnvProperties = properties; public openaireEntities = OpenaireEntities; @@ -185,6 +188,15 @@ export class DataProviderComponent { ngAfterViewInit() { if (typeof document !== 'undefined') { this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height')); + let bottom = document.getElementById('bottom'); + if(bottom) { + this.observer = new IntersectionObserver(entries => { + entries.forEach(entry => { + this.shouldSticky = !entry.isIntersecting; + }) + }); + this.observer.observe(bottom); + } } } @@ -242,6 +254,10 @@ export class DataProviderComponent { this.fetchPublications.clearSubscriptions(); this.fetchDataproviders.clearSubscriptions(); this.fetchProjects.clearSubscriptions(); + + if(this.observer) { + this.observer.disconnect(); + } } private getDataProviderInfo(id: string) { diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts index 28c150ad..92ad7fcb 100644 --- a/landingPages/dataProvider/dataProvider.service.ts +++ b/landingPages/dataProvider/dataProvider.service.ts @@ -153,8 +153,6 @@ export class DataProviderService { } } - console.log(this.dataProviderInfo.provenance); - this.dataProviderInfo.subjects = []; length = Array.isArray(data[0]['subjects']) ? data[0]['subjects'].length : 1; for(let i=0; i
Produced {{openaireEntities.RESULTS}} per year
- +
{{openaireEntities.RESULTS}} Types
- +
@@ -36,7 +38,8 @@ import {OpenaireEntities} from "../../utils/properties/searchFields";
{{openaireEntities.RESULTS}} per funder
- +
@@ -44,7 +47,8 @@ import {OpenaireEntities} from "../../utils/properties/searchFields"; class="uk-padding uk-padding-remove-top">
{{openaireEntities.PROJECTS}} with most {{openaireEntities.PUBLICATIONS}}
- +
@@ -52,7 +56,8 @@ import {OpenaireEntities} from "../../utils/properties/searchFields"; class="uk-padding uk-padding-remove-top">
{{openaireEntities.PROJECTS}} with most {{openaireEntities.DATASETS}}
- +
diff --git a/landingPages/landing-utils/metrics/metrics.component.ts b/landingPages/landing-utils/metrics/metrics.component.ts index 51d57651..a746ae07 100644 --- a/landingPages/landing-utils/metrics/metrics.component.ts +++ b/landingPages/landing-utils/metrics/metrics.component.ts @@ -116,7 +116,7 @@ import {OpenaireEntities} from "../../../utils/properties/searchFields";
- Powered by + Powered by usage counts diff --git a/landingPages/project/project.component.html b/landingPages/project/project.component.html index 5bc20c71..52b390e6 100644 --- a/landingPages/project/project.component.html +++ b/landingPages/project/project.component.html @@ -88,9 +88,9 @@
- - Powered by OpenAIRE Research Graph - + + Powered by OpenAIRE Research Graph + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} @@ -235,7 +235,7 @@
diff --git a/landingPages/project/project.component.ts b/landingPages/project/project.component.ts index 58b2cfdc..1de8bdea 100644 --- a/landingPages/project/project.component.ts +++ b/landingPages/project/project.component.ts @@ -151,6 +151,9 @@ export class ProjectComponent { public graph_offset: number = 0; @ViewChild("graph_and_feedback") graph_and_feedback; + public shouldSticky: boolean = true; + private observer: IntersectionObserver; + subscriptions = []; properties: EnvProperties; public openaireEntities = OpenaireEntities; @@ -227,6 +230,15 @@ export class ProjectComponent { ngAfterViewInit() { if (typeof document !== 'undefined') { this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height')); + let bottom = document.getElementById('bottom'); + if(bottom) { + this.observer = new IntersectionObserver(entries => { + entries.forEach(entry => { + this.shouldSticky = !entry.isIntersecting; + }) + }); + this.observer.observe(bottom); + } } } @@ -314,6 +326,10 @@ export class ProjectComponent { this.fetchSoftware.clearSubscriptions(); this.fetchOrps.clearSubscriptions(); this.fetchDmps.clearSubscriptions(); + + if(this.observer) { + this.observer.disconnect(); + } } private createClipboard() { diff --git a/landingPages/result/resultLanding.component.html b/landingPages/result/resultLanding.component.html index cb0368d7..b61e4e3a 100644 --- a/landingPages/result/resultLanding.component.html +++ b/landingPages/result/resultLanding.component.html @@ -78,9 +78,9 @@
- - Powered by OpenAIRE Research Graph - + + Powered by OpenAIRE Research Graph + . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} @@ -160,7 +160,7 @@
diff --git a/landingPages/result/resultLanding.component.ts b/landingPages/result/resultLanding.component.ts index 0a568a84..163f6aab 100644 --- a/landingPages/result/resultLanding.component.ts +++ b/landingPages/result/resultLanding.component.ts @@ -1,4 +1,4 @@ -import {ChangeDetectorRef, Component, Input, ViewChild} from '@angular/core'; +import {ChangeDetectorRef, Component, EventEmitter, Input, Output, ViewChild} from '@angular/core'; import {ActivatedRoute, Router} from '@angular/router'; import {Meta, Title} from '@angular/platform-browser'; @@ -129,6 +129,9 @@ export class ResultLandingComponent { public graph_offset: number = 0; @ViewChild("graph_and_feedback") graph_and_feedback; + public shouldSticky: boolean = true; + private observer: IntersectionObserver; + public viewAll: string = ""; public noCommunities: boolean = false; @@ -219,6 +222,15 @@ export class ResultLandingComponent { ngAfterViewInit() { if (typeof document !== 'undefined') { this.offset = Number.parseInt(getComputedStyle(document.documentElement).getPropertyValue('--navbar-height')); + let bottom = document.getElementById('bottom'); + if(bottom) { + this.observer = new IntersectionObserver(entries => { + entries.forEach(entry => { + this.shouldSticky = !entry.isIntersecting; + }) + }); + this.observer.observe(bottom); + } } } @@ -290,6 +302,9 @@ export class ResultLandingComponent { } }); this._vocabulariesService.clearSubscriptions(); + if(this.observer) { + this.observer.disconnect(); + } } public pidInit(event) { diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index d3264e69..af8c60a9 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -340,8 +340,9 @@
- - Powered by OpenAIRE Research Graph + + Powered by OpenAIRE Research Graph +
diff --git a/utils/authors/showAuthors.component.ts b/utils/authors/showAuthors.component.ts index 36bae34a..4beae32e 100644 --- a/utils/authors/showAuthors.component.ts +++ b/utils/authors/showAuthors.component.ts @@ -85,8 +85,8 @@ import {properties} from "../../../../environments/environment";
-
- View less authors + From 06e8eb29dd411ce035cde27e13ff0cd474439348 Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Thu, 5 May 2022 09:32:18 +0300 Subject: [PATCH 2/2] progress on org landing and some other tweaks --- .../organization/organization.component.html | 187 +++++++++--------- .../organization/organization.component.ts | 49 ++--- .../searchUtils/newSearchPage.component.html | 4 +- .../searchUtils/quick-selections.component.ts | 2 +- 4 files changed, 117 insertions(+), 125 deletions(-) diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index ca76ea43..0a6418a6 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -21,21 +21,11 @@ - +
  • - - - - - -
  • - -
  • - + @@ -53,8 +43,8 @@
    - - Powered by OpenAIRE Research Graph + + Powered by OpenAIRE Research Graph . Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} @@ -113,28 +103,28 @@
    - + [tabTitle]="openaireEntities.PUBLICATIONS" [tabId]="'publications'"> + [tabTitle]="openaireEntities.DATASETS" [tabId]="'datasets'"> + [tabTitle]="openaireEntities.SOFTWARE" [tabId]="'software'"> + [tabTitle]="openaireEntities.OTHER" [tabId]="'other'">
    @@ -187,6 +177,13 @@
  • +
    + +
    + + +
    @@ -212,89 +209,93 @@ - - + +
    -
    -
      -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    • - -
    • -
    -
    - No reports available -
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
      -
    • +
      +
      +
      + Content report +
      +
        +
      • -
      • -
      • + +
      • +
      • + +
      • +
      • + +
      • +
      • +
      +
      + No reports available +
      +
      +
      + Funder report +
      +
      +
      +
      +
        +
      • + +
      • +
      • + +
      • +
      +
      +
      +
    diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index d94fbf76..d03a3596 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -24,6 +24,7 @@ import {FetchDataproviders} from "../../utils/fetchEntitiesClasses/fetchDataprov import {IndexInfoService} from "../../utils/indexInfo.service"; import {Subscriber} from "rxjs"; import {properties} from "../../../../environments/environment"; +import {OpenaireEntities} from '../../utils/properties/searchFields'; @Component({ selector: 'organization', @@ -52,7 +53,7 @@ export class OrganizationComponent { public fetchDatasets: FetchResearchResults; public fetchSoftware: FetchResearchResults; public fetchOrps: FetchResearchResults; - public fetchDataproviders: FetchDataproviders + public fetchDataproviders: FetchDataproviders; public searchNumber: number = 5; // Request results of each tab only the one time (first time tab is clicked) @@ -64,7 +65,8 @@ export class OrganizationComponent { // Active tab variable for responsiveness public activeTab: string = ""; - + + @ViewChild('downloadReportsModal') downloadReportsModal; @ViewChild('downloadReportModal') downloadReportModal; @ViewChild('downloadFunderReportModal') downloadFunderReportModal; @ViewChild('addThisModal') addThisModal; @@ -82,11 +84,11 @@ export class OrganizationComponent { // Helper variables to specify funder in downloadPublicationsFile function public contentTypes: [string, string][] = [ - ['results', 'all research outcomes'], - ['publications', 'publications'], - ['datasets', 'research data'], - ['software', 'software'], - ['other', 'other research products'], + ['results', 'all ' + OpenaireEntities.RESULTS], + ['publications', OpenaireEntities.PUBLICATIONS], + ['datasets', OpenaireEntities.DATASETS], + ['software', OpenaireEntities.SOFTWARE], + ['other', OpenaireEntities.OTHER], ]; public funderContentType: string = ''; public funder: any = ""; @@ -101,6 +103,7 @@ export class OrganizationComponent { subscriptions = []; innerReportSubscriptions = []; properties: EnvProperties; + public openaireEntities = OpenaireEntities public indexUpdateDate: Date; public showFeedback: boolean = false; public feedbackFields: string [] = ['Name', 'Country', 'Other']; @@ -545,8 +548,7 @@ export class OrganizationComponent { } private openLoading() { - this.closeDownloadReportModal(); - this.closeDownloadFunderReportModal(); + this.closeDownloadReportsModal(); if (this.loading) { this.loading.open(); @@ -626,27 +628,16 @@ export class OrganizationComponent { console.log(value); } - openDownloadReportModal() { - this.downloadReportModal.cancelButton = false; - this.downloadReportModal.okButton = false; - this.downloadReportModal.alertTitle = "Download content report"; - this.downloadReportModal.open(); - } + openDownloadReportsModal() { + this.funder = this.fetchProjects.funders[0]; + this.downloadReportsModal.cancelButton = false; + this.downloadReportsModal.okButton = false; + this.downloadReportsModal.alertTitle = "Download"; + this.downloadReportsModal.open(); + } - closeDownloadReportModal() { - this.downloadReportModal.cancel(); - } - - openDownloadFunderReportModal() { - this.funder = this.fetchProjects.funders[0]; - this.downloadFunderReportModal.cancelButton = false; - this.downloadFunderReportModal.okButton = false; - this.downloadFunderReportModal.alertTitle = "Download funder report"; - this.downloadFunderReportModal.open(); - } - - closeDownloadFunderReportModal() { - this.downloadFunderReportModal.cancel(); + closeDownloadReportsModal() { + this.downloadReportsModal.cancel(); } public openAddThisModal() { diff --git a/searchPages/searchUtils/newSearchPage.component.html b/searchPages/searchUtils/newSearchPage.component.html index af8c60a9..78f44256 100644 --- a/searchPages/searchUtils/newSearchPage.component.html +++ b/searchPages/searchUtils/newSearchPage.component.html @@ -155,7 +155,7 @@
    -
    +
    @@ -211,7 +211,7 @@ search
    -
    +
    +
    {{quickFilter.value}}