Merge remote-tracking branch 'origin/develop'

This commit is contained in:
Konstantina Galouni 2024-02-12 14:50:33 +02:00
commit 9f53423ae3
9 changed files with 75 additions and 20 deletions

View File

@ -14,6 +14,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- *Fixed (for any bug fixes)* - *Fixed (for any bug fixes)*
- *Security (in case of vulnerabilities)* - *Security (in case of vulnerabilities)*
## [production-release-february-2024] - 2024/02/12
### Changed
* Remove "open access" as preselected filter
* Rounded numbers in search tabs
* Home page: Performance improvements on images loading
* Home page, Search page, Funders page: Performance improvements on services requests
### Fixed
* Filtering out in funding levels according to selected funder when querying 100 values
* Filters in claims & in organization landing > projects tab were always loading
* Research products landing page: Added providers in versions
* SEO fixes in landing pages
## [production-release-january-2024] - 2024/02/01 ## [production-release-january-2024] - 2024/02/01
### Changed ### Changed
* Updated FoS search filter - do not display code * Updated FoS search filter - do not display code

View File

@ -52,6 +52,8 @@
], ],
"styles": [ "styles": [
"src/styles.less", "src/styles.less",
{"input": "src/assets/deposit.less", "inject": false },
{"input": "src/assets/funders.less", "inject": false },
"src/assets/common-assets/library-css/material.scss" "src/assets/common-assets/library-css/material.scss"
], ],
"scripts": [ "scripts": [

View File

@ -1,4 +1,4 @@
import {ChangeDetectorRef, Component, ElementRef, ViewChild} from '@angular/core'; import {AfterViewInit, ChangeDetectorRef, Component, ElementRef, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
import {MenuItem} from './openaireLibrary/sharedComponents/menu'; import {MenuItem} from './openaireLibrary/sharedComponents/menu';
@ -23,20 +23,21 @@ import {QuickContactService} from './openaireLibrary/sharedComponents/quick-cont
import {LayoutService} from './openaireLibrary/dashboard/sharedComponents/sidebar/layout.service'; import {LayoutService} from './openaireLibrary/dashboard/sharedComponents/sidebar/layout.service';
@Component({ @Component({
//changeDetection: ChangeDetectionStrategy.Default,
//encapsulation: ViewEncapsulation.Emulated,
selector: 'app-root', selector: 'app-root',
template: ` template: `
<div id="modal-container"></div>
<navbar *ngIf="properties && header" [header]="header" [portal]="properties.dashboard" [properties]=properties <navbar *ngIf="properties && header" [header]="header" [portal]="properties.dashboard" [properties]=properties
[onlyTop]=false [user]="user" [onlyTop]=false [user]="user"
[communityId]="properties.adminToolsCommunity" [userMenuItems]=userMenuItems [menuItems]=menuItems></navbar> [communityId]="properties.adminToolsCommunity" [userMenuItems]=userMenuItems [menuItems]=menuItems></navbar>
<div *ngIf="loading">
<loading [full]="true"></loading>
</div>
<schema2jsonld *ngIf="properties" [URL]="properties.domain+properties.baseLink" <schema2jsonld *ngIf="properties" [URL]="properties.domain+properties.baseLink"
[logoURL]="properties.domain+properties.baseLink+'/assets/common-assets/logo-services/explore/main.svg'" [logoURL]="properties.domain+properties.baseLink+'/assets/common-assets/logo-services/explore/main.svg'"
type="home" type="home"
name="OpenAIRE | Find and Share research" name="OpenAIRE | Find and Share research"
description="OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide."></schema2jsonld> description="OpenAIRE Explore: Over 100M of research deduplicated, 170K research software, 11M research data. One of the largest open scholarly records collection worldwide."></schema2jsonld>
<div class="custom-main-content"> <div [class.uk-hidden]="loading" [ngClass]="rootClass">
<div id="modal-container"></div>
<main> <main>
<router-outlet></router-outlet> <router-outlet></router-outlet>
</main> </main>
@ -57,7 +58,9 @@ import {LayoutService} from './openaireLibrary/dashboard/sharedComponents/sideba
<modal-alert #modal [overflowBody]="false"></modal-alert> <modal-alert #modal [overflowBody]="false"></modal-alert>
` `
}) })
export class AppComponent { export class AppComponent implements AfterViewInit {
loading: boolean = false;
rootClass: string;
isClient: boolean = false; isClient: boolean = false;
userMenuItems: MenuItem[] = []; userMenuItems: MenuItem[] = [];
menuItems: MenuItem [] = []; menuItems: MenuItem [] = [];
@ -124,7 +127,7 @@ export class AppComponent {
} }
})); }));
} }
ngOnDestroy() { ngOnDestroy() {
this.subscriptions.forEach(subscription => { this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscriber) { if (subscription instanceof Subscriber) {
@ -141,6 +144,31 @@ export class AppComponent {
ngAfterViewInit() { ngAfterViewInit() {
if (typeof window !== "undefined") { if (typeof window !== "undefined") {
this.createObservers(); this.createObservers();
this.subscriptions.push(this.layoutService.rootClass.subscribe(rootClass => {
this.loading = true;
this.cdr.detectChanges();
if (rootClass && this.isClient) {
let link = <HTMLLinkElement>document.getElementById('theme');
let append = false;
if (!link) {
link = document.createElement('link');
link.rel = 'stylesheet';
link.id = 'theme';
append = true;
}
link.href = rootClass + '.css';
link.onerror = (error) => console.log(error);
if (append) {
document.head.appendChild(link);
}
}
this.rootClass = rootClass;
this.cdr.detectChanges();
setTimeout(() => {
this.loading = false;
this.cdr.detectChanges();
}, 500)
}));
} }
} }

View File

@ -19,6 +19,7 @@ import {DEFAULT_TIMEOUT, TimeoutInterceptor} from "./openaireLibrary/timeout-int
import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service"; import {ErrorInterceptorService} from "./openaireLibrary/error-interceptor.service";
import {QuickContactModule} from './openaireLibrary/sharedComponents/quick-contact/quick-contact.module'; import {QuickContactModule} from './openaireLibrary/sharedComponents/quick-contact/quick-contact.module';
import {AlertModalModule} from './openaireLibrary/utils/modal/alertModal.module'; import {AlertModalModule} from './openaireLibrary/utils/modal/alertModal.module';
import {LoadingModule} from "./openaireLibrary/utils/loading/loading.module";
@NgModule({ @NgModule({
imports: [ imports: [
@ -30,10 +31,10 @@ import {AlertModalModule} from './openaireLibrary/utils/modal/alertModal.module'
CookieLawModule, CookieLawModule,
BrowserModule, BrowserModule,
AppRoutingModule, AppRoutingModule,
BrowserAnimationsModule, PageURLResolverModule, BrowserAnimationsModule, PageURLResolverModule,
Schema2jsonldModule, Schema2jsonldModule,
QuickContactModule, QuickContactModule,
AlertModalModule AlertModalModule, LoadingModule
], ],
declarations: [AppComponent, OpenaireErrorPageComponent], declarations: [AppComponent, OpenaireErrorPageComponent],
exports: [AppComponent], exports: [AppComponent],

View File

@ -1,4 +1,5 @@
import {Component} from '@angular/core'; import {Component, OnDestroy, OnInit} from '@angular/core';
import {LayoutService} from "../openaireLibrary/dashboard/sharedComponents/sidebar/layout.service";
@Component({ @Component({
selector: 'openaire-deposit', selector: 'openaire-deposit',
@ -7,11 +8,17 @@ import {Component} from '@angular/core';
` `
}) })
export class OpenaireDepositComponent { export class OpenaireDepositComponent implements OnInit, OnDestroy {
constructor() { constructor(private layoutService: LayoutService) {
} }
public ngOnInit() {} public ngOnInit() {
this.layoutService.setRootClass('deposit');
}
ngOnDestroy() {
this.layoutService.setRootClass(null);
}
} }

View File

@ -91,6 +91,7 @@ export class FundersComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
this.layoutService.setRootClass('funders');
this.title.setTitle('OpenAIRE - Explore | Funders'); this.title.setTitle('OpenAIRE - Explore | Funders');
this.properties = properties; this.properties = properties;
this.subscriptions.push( this.piwikService.trackView(this.properties, this.pageTitle).subscribe()); this.subscriptions.push( this.piwikService.trackView(this.properties, this.pageTitle).subscribe());
@ -126,6 +127,7 @@ export class FundersComponent implements OnInit {
subscription.unsubscribe(); subscription.unsubscribe();
} }
}); });
this.layoutService.setRootClass(null);
} }
private updateDescription(description: string) { private updateDescription(description: string) {

View File

@ -0,0 +1,3 @@
.deposit {
@import (multiple) "~src/assets/openaire-theme/less/_import";
}

View File

@ -32,10 +32,6 @@
/* Landing */ /* Landing */
@landing-portal-color: @explore-color; @landing-portal-color: @explore-color;
.deposit, .funders {
@import (multiple) "~src/assets/openaire-theme/less/_import";
}
.monitor-dashboard-link { .monitor-dashboard-link {
color: @monitor-color; color: @monitor-color;
} }
@ -51,4 +47,4 @@
text-decoration: none; text-decoration: none;
color: @secondary-color; color: @secondary-color;
} }
} }

View File

@ -0,0 +1,3 @@
.funders {
@import (multiple) "~src/assets/openaire-theme/less/_import";
}