From 819199163fe3c23da824dd2c414382d130b509ff Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Wed, 13 Nov 2024 10:54:44 -0600 Subject: [PATCH 1/3] 9497-resolve-the-issues-integrators-are-having-when-embedding-summaries-into-iframes --- .../trusted-summary.component.scss | 1 + .../environment-banner.component.ts | 4 +- summary-iframe-implementation-sample.html | 219 ++++++++++++++++++ 3 files changed, 223 insertions(+), 1 deletion(-) create mode 100644 summary-iframe-implementation-sample.html diff --git a/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss b/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss index b1b65eadf2..c2220e8013 100644 --- a/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss +++ b/src/app/cdk/trusted-summary/component/trusted-summary/trusted-summary.component.scss @@ -17,6 +17,7 @@ main.inside-iframe { align-content: start; grid-gap: 0; box-sizing: border-box; + height: 100vh; .panel-body { padding-top: 16px; diff --git a/src/app/environment-banner/environment-banner/environment-banner.component.ts b/src/app/environment-banner/environment-banner/environment-banner.component.ts index 522b8a7a7b..2a76ce4fa7 100644 --- a/src/app/environment-banner/environment-banner/environment-banner.component.ts +++ b/src/app/environment-banner/environment-banner/environment-banner.component.ts @@ -14,12 +14,14 @@ export class EnvironmentBannerComponent implements OnInit { canDismiss = environment['CAN_DISABLE_TEST_WARNING_BANNER'] @HostBinding('style.display') display = 'none' labelWarning = $localize`:@@environmentBanner.ariaLabelWarning:Warning, testing website` + notInsideIframe: boolean constructor( @Inject(WINDOW) private window: Window, private _cookieService: CookieService ) { + this.notInsideIframe = window.self === window.top this.hostUrl = window.location.host - if (!this._cookieService.get('testWarningCookie') || !this.canDismiss) { + if ((!this._cookieService.get('testWarningCookie') || !this.canDismiss) && this.notInsideIframe) { this.display = 'auto' } } diff --git a/summary-iframe-implementation-sample.html b/summary-iframe-implementation-sample.html new file mode 100644 index 0000000000..99f7cb5d97 --- /dev/null +++ b/summary-iframe-implementation-sample.html @@ -0,0 +1,219 @@ + + + + + + Dynamic Dialogs with URL Validation + + + + +
+ + + +
+ + +
+ + + + +
+ + +
+ + +
+ + + + From 9703bdba1523c03a43e0948bf002ab097d60211c Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Wed, 13 Nov 2024 11:09:18 -0600 Subject: [PATCH 2/3] 9497-resolve-the-issues-integrators-are-having-when-embedding-summaries-into-iframes --- summary-iframe-implementation-sample.html | 152 +++++++++++++--------- 1 file changed, 91 insertions(+), 61 deletions(-) diff --git a/summary-iframe-implementation-sample.html b/summary-iframe-implementation-sample.html index 99f7cb5d97..8eca03e184 100644 --- a/summary-iframe-implementation-sample.html +++ b/summary-iframe-implementation-sample.html @@ -1,3 +1,14 @@ + + @@ -64,9 +75,30 @@ .close-button:hover { background: #ff3d3d; } + .header { + text-align: center; + margin-bottom: 30px; + } + h1 { + margin: 0; + font-size: 2em; + } + p { + margin: 10px 0 0; + font-size: 1.2em; + color: #555; + } +
+

ORCID iFrame Display Tester

+

+ This tool allows you to display ORCID IDs within iframes of various + sizes. Test how the content adapts to different iframe dimensions. +

+
+
@@ -81,7 +113,7 @@ - +
@@ -93,127 +125,125 @@ From 13c173a026dd2463943a5f7a8160e6b57dac8383 Mon Sep 17 00:00:00 2001 From: Leonardo Mendoza Fernadez Date: Wed, 13 Nov 2024 11:13:42 -0600 Subject: [PATCH 3/3] 9497-resolve-the-issues-integrators-are-having-when-embedding-summaries-into-iframes --- summary-iframe-implementation-sample.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/summary-iframe-implementation-sample.html b/summary-iframe-implementation-sample.html index 8eca03e184..27f1dfcb88 100644 --- a/summary-iframe-implementation-sample.html +++ b/summary-iframe-implementation-sample.html @@ -14,7 +14,7 @@ - Dynamic Dialogs with URL Validation + ORCID Summary iFrame Display Tester