From 3be6013644a90d9a49c08a71c75fb7549d8b3e69 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Wed, 26 Apr 2023 15:54:43 +0300 Subject: [PATCH 1/5] [Library | develop & Eosc Explore | develop]: index.html: Updated favicon for beta | transferData.component.ts: Added check for client side before opening Data Transfer modal. --- utils/dataTransfer/transferData.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/dataTransfer/transferData.component.ts b/utils/dataTransfer/transferData.component.ts index e0ede1ee..699a5bd0 100644 --- a/utils/dataTransfer/transferData.component.ts +++ b/utils/dataTransfer/transferData.component.ts @@ -60,7 +60,7 @@ export class EGIDataTransferComponent { } ngAfterViewInit() { - if(this.isOpen){ + if(this.isOpen && typeof document !== 'undefined'){ this.open(); } } From bd87a47795f8f9243e0a1129d715fcb96cf9b714 Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Tue, 2 May 2023 18:08:48 +0300 Subject: [PATCH 2/5] Fix bug with UIKit sticky on page-content if header is changing width. --- .../page-content/page-content.component.ts | 36 ++++++++++++++----- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index bc1b1da9..df7428e4 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -13,7 +13,6 @@ import { import {LayoutService, SidebarItem} from "../sidebar/layout.service"; declare var UIkit; -declare var ResizeObserver; @Component({ selector: '[page-content]', @@ -99,11 +98,9 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { ngAfterViewInit() { if (typeof document !== "undefined") { - this.observeStickyFooter(); if (this.shouldSticky && typeof document !== 'undefined') { - this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), { - offset: this.offset - }); + this.initHeader(); + this.observeStickyHeader(); this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => { this.isStickyActive = true; this.cdr.detectChanges(); @@ -116,6 +113,7 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { if (this.sticky_footer) { let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement); this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset}); + this.observeStickyFooter(); } } } @@ -124,12 +122,23 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { this.subscriptions.forEach(subscription => { if (typeof ResizeObserver !== "undefined" && subscription instanceof ResizeObserver) { subscription.disconnect(); - } else if (typeof ResizeObserver !== "undefined" && subscription instanceof IntersectionObserver) { + } else if (typeof IntersectionObserver !== "undefined" && subscription instanceof IntersectionObserver) { subscription.disconnect(); } }); } + initHeader() { + this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), { + offset: this.offset + }); + + } + + initFooter() { + let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement); + this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset}); + } /** * Workaround for sticky not update bug when sidebar is toggled. @@ -200,14 +209,25 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { headerObs.observe(this.header.nativeElement); } } + + private observeStickyHeader() { + if (this.sticky.header) { + let resizeObs= new ResizeObserver(entries => { + entries.forEach(entry => { + this.initHeader(); + }) + }); + this.subscriptions.push(resizeObs); + resizeObs.observe(this.sticky.header.$el); + } + } private observeStickyFooter() { if (this.sticky_footer) { let resizeObs = new ResizeObserver(entries => { entries.forEach(entry => { setTimeout(() => { - this.sticky.footer.offset = this.calcStickyFooterOffset(entry.target); - this.cdr.detectChanges(); + this.initFooter(); }); }) }); From c321390ccbbe72515f336830c3aa54e3156379ef Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Wed, 3 May 2023 16:29:59 +0300 Subject: [PATCH 3/5] Fix bug in sidebar toggle item | Page content: Add timeout on initialization of header. --- .../page-content/page-content.component.ts | 49 ++++++------------- .../sidebar/sideBar.component.ts | 4 +- 2 files changed, 19 insertions(+), 34 deletions(-) diff --git a/dashboard/sharedComponents/page-content/page-content.component.ts b/dashboard/sharedComponents/page-content/page-content.component.ts index df7428e4..54261153 100644 --- a/dashboard/sharedComponents/page-content/page-content.component.ts +++ b/dashboard/sharedComponents/page-content/page-content.component.ts @@ -98,23 +98,25 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { ngAfterViewInit() { if (typeof document !== "undefined") { - if (this.shouldSticky && typeof document !== 'undefined') { - this.initHeader(); - this.observeStickyHeader(); - this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => { - this.isStickyActive = true; - this.cdr.detectChanges(); - })); - this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => { - this.isStickyActive = false; - this.cdr.detectChanges(); - })); - } if (this.sticky_footer) { - let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement); - this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset}); + this.initFooter(); this.observeStickyFooter(); } + if (this.shouldSticky && typeof document !== 'undefined') { + setTimeout(() => { + this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), { + offset: this.offset + }); + this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => { + this.isStickyActive = true; + this.cdr.detectChanges(); + })); + this.subscriptions.push(UIkit.util.on(document, 'inactive', '#' + this.sticky.header.$el.id, () => { + this.isStickyActive = false; + this.cdr.detectChanges(); + })); + }); + } } } @@ -127,13 +129,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { } }); } - - initHeader() { - this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), { - offset: this.offset - }); - - } initFooter() { let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement); @@ -209,18 +204,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy { headerObs.observe(this.header.nativeElement); } } - - private observeStickyHeader() { - if (this.sticky.header) { - let resizeObs= new ResizeObserver(entries => { - entries.forEach(entry => { - this.initHeader(); - }) - }); - this.subscriptions.push(resizeObs); - resizeObs.observe(this.sticky.header.$el); - } - } private observeStickyFooter() { if (this.sticky_footer) { diff --git a/dashboard/sharedComponents/sidebar/sideBar.component.ts b/dashboard/sharedComponents/sidebar/sideBar.component.ts index 2e0c8aa1..39bc1fc1 100644 --- a/dashboard/sharedComponents/sidebar/sideBar.component.ts +++ b/dashboard/sharedComponents/sidebar/sideBar.component.ts @@ -49,7 +49,9 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha } ngAfterViewInit() { - this.toggle(true); + setTimeout(() => { + this.toggle(true); + }); } ngOnChanges(changes: SimpleChanges) { From d96ee9acc80dc8b0451d4bada0dab19532ba84ae Mon Sep 17 00:00:00 2001 From: "k.triantafyllou" Date: Fri, 5 May 2023 17:05:41 +0300 Subject: [PATCH 4/5] Fix width of tabs in terminology page. --- monitor/methodology/terminology.component.less | 3 +++ monitor/methodology/terminology.component.ts | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 monitor/methodology/terminology.component.less diff --git a/monitor/methodology/terminology.component.less b/monitor/methodology/terminology.component.less new file mode 100644 index 00000000..e6212b69 --- /dev/null +++ b/monitor/methodology/terminology.component.less @@ -0,0 +1,3 @@ +.uk-width-medium { + width: 350px; +} diff --git a/monitor/methodology/terminology.component.ts b/monitor/methodology/terminology.component.ts index ded7fbcd..2e518e29 100644 --- a/monitor/methodology/terminology.component.ts +++ b/monitor/methodology/terminology.component.ts @@ -50,7 +50,7 @@ declare var ResizeObserver;
-
+
@@ -116,7 +116,8 @@ declare var ResizeObserver;
- ` + `, + styleUrls: ['terminology.component.less'] }) export class TerminologyComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentChecked { public tab: 'entities' | 'attributes' = 'entities'; From d6ec928237238cf1d0bebbf2a83e915348b8e38a Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 8 May 2023 17:50:39 +0300 Subject: [PATCH 5/5] [Monitor & Library | develop]: [Bug fix] Show quick contact button when not in contacts us and not intersecting either with contact us section (home page), nor with bottom. 1. layout.service.ts: Initialize hasQuickContactSubject to false (Don't ever show it unless it should be there). 2. quick-contact.service.ts: Initialize display to false (Assume it is intersecting, until it is proved it is not). 3. app.component.ts: Updated checks for and added public bottomNotIntersecting: boolean; and public displayQuickContact: boolean; --- dashboard/sharedComponents/sidebar/layout.service.ts | 2 +- sharedComponents/quick-contact/quick-contact.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/sharedComponents/sidebar/layout.service.ts b/dashboard/sharedComponents/sidebar/layout.service.ts index ed91e514..447d7a5f 100644 --- a/dashboard/sharedComponents/sidebar/layout.service.ts +++ b/dashboard/sharedComponents/sidebar/layout.service.ts @@ -59,7 +59,7 @@ export class LayoutService { /** * Add hasQuickContact: false on data of route config, if the quick-contact fixed button is not needed. */ - private hasQuickContactSubject: BehaviorSubject = new BehaviorSubject(true); + private hasQuickContactSubject: BehaviorSubject = new BehaviorSubject(false); /** * Add activeMenuItem: string on data of route config, if page should activate a specific MenuItem and route url does not match. */ diff --git a/sharedComponents/quick-contact/quick-contact.service.ts b/sharedComponents/quick-contact/quick-contact.service.ts index 0ddcdcc7..c31a742c 100644 --- a/sharedComponents/quick-contact/quick-contact.service.ts +++ b/sharedComponents/quick-contact/quick-contact.service.ts @@ -5,7 +5,7 @@ import { BehaviorSubject, Observable } from "rxjs"; providedIn: "root" }) export class QuickContactService { - private display: BehaviorSubject = new BehaviorSubject(true); + private display: BehaviorSubject = new BehaviorSubject(false); public get isDisplayed(): Observable { return this.display.asObservable();