From 7296e55f4902fa14b14c98936874ddd8bc700c7f Mon Sep 17 00:00:00 2001 From: corcorankt1 Date: Tue, 10 Aug 2021 11:23:15 -0400 Subject: [PATCH 1/8] remove banner from existing site --- src/components/layouts/Layout.js | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/components/layouts/Layout.js b/src/components/layouts/Layout.js index 319ae72f26..d9451d2067 100644 --- a/src/components/layouts/Layout.js +++ b/src/components/layouts/Layout.js @@ -76,21 +76,6 @@ const Layout = ({ children, initialContext, hasSideBar, location }) => { Skip to Main Content -
Date: Tue, 10 Aug 2021 11:26:11 -0400 Subject: [PATCH 2/8] add icon and link guidelines --- src/pages/using-spark/components/icon.mdx | 3 +++ src/pages/using-spark/components/link.mdx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/pages/using-spark/components/icon.mdx b/src/pages/using-spark/components/icon.mdx index 53b3f6b626..4a6cec05eb 100644 --- a/src/pages/using-spark/components/icon.mdx +++ b/src/pages/using-spark/components/icon.mdx @@ -31,6 +31,9 @@ give feedback. - Icons should only be sized to `16px`, `24px`, or `32px`. - Icons should not be used in place of artwork or illustrations. +- If used as a clickable interaction with a text label, +use first-person pronouns. For example: Use "Download My +Approval Letter," instead of "Download Your Approval Letter." Date: Tue, 10 Aug 2021 11:42:32 -0400 Subject: [PATCH 3/8] update spark logo --- src/components/site-logo.js | 157 +++++++++++++++--------------------- 1 file changed, 67 insertions(+), 90 deletions(-) diff --git a/src/components/site-logo.js b/src/components/site-logo.js index cee6c1ddf2..15449d17b7 100644 --- a/src/components/site-logo.js +++ b/src/components/site-logo.js @@ -5,99 +5,76 @@ const SiteLogo = () => ( Spark Design System - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /* eslint-enable max-len */ ); From 4e2feeecc91a18a21e503b4de3c668eac8b042b4 Mon Sep 17 00:00:00 2001 From: RVMendoza Date: Tue, 3 Aug 2021 16:52:31 -0400 Subject: [PATCH 4/8] Add a window check, and test for it --- .../isElementVisible/isElementVisible.spec.ts | 12 +++++++++++ .../isElementVisible/isElementVisible.ts | 20 ++++++++++--------- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.spec.ts b/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.spec.ts index 41ea6aa275..cb2019e19f 100644 --- a/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.spec.ts +++ b/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.spec.ts @@ -23,6 +23,7 @@ class Test1Component { describe('isElementVisible', () => { let component: Test1Component; let componentFixture: ComponentFixture; + let windowSpy; beforeEach(async(() => { TestBed.configureTestingModule({ @@ -31,11 +32,16 @@ describe('isElementVisible', () => { })); beforeEach(() => { + windowSpy = jest.spyOn(window, 'window', 'get'); componentFixture = TestBed.createComponent(Test1Component); component = componentFixture.componentInstance; componentFixture.detectChanges(); }); + afterEach(() => { + windowSpy.mockRestore(); + }); + it('should return false for element with display: none', () => { expect(isElementVisible(component.elDisplayNone)).toEqual(false); }); @@ -51,4 +57,10 @@ describe('isElementVisible', () => { it('should return true for element with visibility: visible', () => { expect(isElementVisible(component.elVisibilityVisible)).toEqual(true); }); + + it('should not use window scope if window is undefined', () => { + windowSpy.mockImplementation(() => undefined); + expect(window).toBeUndefined(); + expect(isElementVisible(component.elDisplayNone)).toEqual(undefined); + }); }); diff --git a/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.ts b/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.ts index 8aa666734c..8dffe2d5b6 100644 --- a/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.ts +++ b/angular/projects/spark-angular/src/lib/utilities/isElementVisible/isElementVisible.ts @@ -10,13 +10,15 @@ export const isElementVisible = (elRef: ElementRef): boolean => { if (!elRef) { return; } - const elementDisplayValue = window.getComputedStyle(elRef.nativeElement) - .display; - const elementVisibilityValue = window.getComputedStyle(elRef.nativeElement) - .visibility; - const elementIsVisible = - elementDisplayValue === 'none' || elementVisibilityValue === 'hidden' - ? false - : true; - return elementIsVisible; + if (typeof window !== 'undefined') { + const elementDisplayValue = window.getComputedStyle(elRef.nativeElement) + .display; + const elementVisibilityValue = window.getComputedStyle(elRef.nativeElement) + .visibility; + const elementIsVisible = + elementDisplayValue === 'none' || elementVisibilityValue === 'hidden' + ? false + : true; + return elementIsVisible; + } }; From b57b2ff9e285b4b80f9f737664b9214ecfd3e7f1 Mon Sep 17 00:00:00 2001 From: corcorankt1 Date: Tue, 10 Aug 2021 17:36:40 -0400 Subject: [PATCH 5/8] add auto to footer examples --- .../sprk-footer/sprk-footer.stories.ts | 8 ++++++++ html/components/footer.stories.js | 18 ++++++++++++++++++ .../components/footer/SprkFooter.stories.js | 9 +++++++++ 3 files changed, 35 insertions(+) diff --git a/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.stories.ts b/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.stories.ts index afc1fe12d8..8b54c630e4 100644 --- a/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.stories.ts +++ b/angular/projects/spark-angular/src/lib/components/sprk-footer/sprk-footer.stories.ts @@ -146,6 +146,14 @@ export const defaultStory = () => ({ 'https://spark-assets.netlify.app/rocket-homes-white.svg', imgAlt: 'Rocket Homes Logo', analyticsString: 'link-3' + }, + { + text: 'Find and buy the perfect car or truck from thousands of vehicles, all in one marketplace', + href: 'https://rocketauto.com', + imgSrc: + 'https://spark-assets.netlify.app/rocket_auto.svg', + imgAlt: 'Rocket Auto Logo', + analyticsString: 'link-4' } ]" diff --git a/html/components/footer.stories.js b/html/components/footer.stories.js index 645c8d5c75..99b361167e 100644 --- a/html/components/footer.stories.js +++ b/html/components/footer.stories.js @@ -111,6 +111,24 @@ export const defaultStory = () => { search the latest home listings

+ +
+
+ + Rocket Auto Logo + +
+ + +
( element: 'a', mediaHref: '#nogo', }, + { + mediaType: 'image', + src: 'https://spark-assets.netlify.app/rocket_auto.svg', + altText: 'Rocket Auto Logo', + description: + 'Find and buy the perfect car or truck from thousands of vehicles, all in one marketplace', + element: 'a', + mediaHref: 'https://rocketauto.com', + }, ], }} linkColumns={[ From d22497221492b247627476ad04bcbce938b253bc Mon Sep 17 00:00:00 2001 From: Febbraro Date: Wed, 11 Aug 2021 11:34:18 -0600 Subject: [PATCH 6/8] alpha version --- angular/projects/spark-angular/package-lock.json | 2 +- angular/projects/spark-angular/package.json | 2 +- angular/projects/spark-angular/src/environment/environment.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/angular/projects/spark-angular/package-lock.json b/angular/projects/spark-angular/package-lock.json index 7fd9c83fa4..c7f421b746 100644 --- a/angular/projects/spark-angular/package-lock.json +++ b/angular/projects/spark-angular/package-lock.json @@ -1,6 +1,6 @@ { "name": "@sparkdesignsystem/spark-angular", - "version": "14.0.0", + "version": "14.0.1-alpha.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/angular/projects/spark-angular/package.json b/angular/projects/spark-angular/package.json index d645beacb9..a42d787aa7 100644 --- a/angular/projects/spark-angular/package.json +++ b/angular/projects/spark-angular/package.json @@ -1,7 +1,7 @@ { "name": "@sparkdesignsystem/spark-angular", "description": "A collection of Spark Design System components in Angular 6+", - "version": "14.0.0", + "version": "14.0.1-alpha.0", "author": "Rocket Mortgage", "license": "MIT", "scripts": { diff --git a/angular/projects/spark-angular/src/environment/environment.ts b/angular/projects/spark-angular/src/environment/environment.ts index 289c894389..2a2b770a56 100644 --- a/angular/projects/spark-angular/src/environment/environment.ts +++ b/angular/projects/spark-angular/src/environment/environment.ts @@ -1,3 +1,3 @@ export const environment = { - version: '14.0.0', + version: '14.0.1-alpha.0', }; From 823e94861f9658c5693a8beb4c3d4b58d2708491 Mon Sep 17 00:00:00 2001 From: Febbraro Date: Wed, 11 Aug 2021 11:38:22 -0600 Subject: [PATCH 7/8] alpha version.1 --- angular/projects/spark-angular/package-lock.json | 2 +- angular/projects/spark-angular/package.json | 2 +- angular/projects/spark-angular/src/environment/environment.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/angular/projects/spark-angular/package-lock.json b/angular/projects/spark-angular/package-lock.json index c7f421b746..4e1e8602b0 100644 --- a/angular/projects/spark-angular/package-lock.json +++ b/angular/projects/spark-angular/package-lock.json @@ -1,6 +1,6 @@ { "name": "@sparkdesignsystem/spark-angular", - "version": "14.0.1-alpha.0", + "version": "14.0.1-alpha.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/angular/projects/spark-angular/package.json b/angular/projects/spark-angular/package.json index a42d787aa7..4d154a00d4 100644 --- a/angular/projects/spark-angular/package.json +++ b/angular/projects/spark-angular/package.json @@ -1,7 +1,7 @@ { "name": "@sparkdesignsystem/spark-angular", "description": "A collection of Spark Design System components in Angular 6+", - "version": "14.0.1-alpha.0", + "version": "14.0.1-alpha.1", "author": "Rocket Mortgage", "license": "MIT", "scripts": { diff --git a/angular/projects/spark-angular/src/environment/environment.ts b/angular/projects/spark-angular/src/environment/environment.ts index 2a2b770a56..2900c7af66 100644 --- a/angular/projects/spark-angular/src/environment/environment.ts +++ b/angular/projects/spark-angular/src/environment/environment.ts @@ -1,3 +1,3 @@ export const environment = { - version: '14.0.1-alpha.0', + version: '14.0.1-alpha.1', }; From 1563117975d73150e687cd8c9486f38e320af365 Mon Sep 17 00:00:00 2001 From: Febbraro Date: Thu, 12 Aug 2021 09:37:13 -0600 Subject: [PATCH 8/8] publish version --- angular/projects/spark-angular/package-lock.json | 2 +- angular/projects/spark-angular/package.json | 2 +- angular/projects/spark-angular/src/environment/environment.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/angular/projects/spark-angular/package-lock.json b/angular/projects/spark-angular/package-lock.json index 4e1e8602b0..0493db7034 100644 --- a/angular/projects/spark-angular/package-lock.json +++ b/angular/projects/spark-angular/package-lock.json @@ -1,6 +1,6 @@ { "name": "@sparkdesignsystem/spark-angular", - "version": "14.0.1-alpha.1", + "version": "14.0.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/angular/projects/spark-angular/package.json b/angular/projects/spark-angular/package.json index 4d154a00d4..aaf0ab7185 100644 --- a/angular/projects/spark-angular/package.json +++ b/angular/projects/spark-angular/package.json @@ -1,7 +1,7 @@ { "name": "@sparkdesignsystem/spark-angular", "description": "A collection of Spark Design System components in Angular 6+", - "version": "14.0.1-alpha.1", + "version": "14.0.1", "author": "Rocket Mortgage", "license": "MIT", "scripts": { diff --git a/angular/projects/spark-angular/src/environment/environment.ts b/angular/projects/spark-angular/src/environment/environment.ts index 2900c7af66..1f2e4925aa 100644 --- a/angular/projects/spark-angular/src/environment/environment.ts +++ b/angular/projects/spark-angular/src/environment/environment.ts @@ -1,3 +1,3 @@ export const environment = { - version: '14.0.1-alpha.1', + version: '14.0.1', };