Skip to content

Commit 944b925

Browse files
authored
Merge pull request #1449 from ASU/uds-1930-un-unsplash
fix(unity-react-core): fix broken images
2 parents 61ff716 + 89567f5 commit 944b925

File tree

20 files changed

+62
-50
lines changed

20 files changed

+62
-50
lines changed

packages/unity-react-core/src/components/Accordion/Accordion.stories.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ export default {
1010
docs: {
1111
description: {
1212
component: `The Accordion component can be used to generate an accordion of editable content cards.
13-
## Usage
13+
## Usage
1414
15-
Accordion users are responsible to meet all UDS design guidelines with their menu,
16-
including rules on the use of Call-to-Action buttons and tags.
15+
Accordion users are responsible to meet all UDS design guidelines with their menu,
16+
including rules on the use of Call-to-Action buttons and tags.
1717
18-
View component examples and source code below.
18+
View component examples and source code below.
1919
20-
This story includes another components for demostration purposes.
20+
This story includes another components for demostration purposes.
2121
`,
2222
},
2323
},

packages/unity-react-core/src/components/AnchorMenu/AnchorMenu.stories.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ export default {
1212
docs: {
1313
description: {
1414
component: `The Anchor Menu component can be used to generate a responsive anchor menu.
15-
## Usage
15+
## Usage
1616
17-
Anchor menu users are responsible to meet all UDS design guidelines with their menu,
18-
including rules on the use of Call-to-Action buttons and tags.
17+
Anchor menu users are responsible to meet all UDS design guidelines with their menu,
18+
including rules on the use of Call-to-Action buttons and tags.
1919
20-
View component examples and source code below.
20+
View component examples and source code below.
2121
22-
This story includes another components for demostration purposes.
22+
This story includes another components for demostration purposes.
2323
`,
2424
},
2525
},

packages/unity-react-core/src/components/Article/Article.stories.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint react/jsx-props-no-spreading: "off" */
22
import React from "react";
33

4+
import img from "../../../../../shared/assets/img/named/hero01.jpg";
45
import { Article } from "./Article";
56

67
export default {
@@ -44,7 +45,7 @@ export const News = Template.bind({});
4445
News.args = {
4546
type: "news",
4647
articleUrl: "https://example.com",
47-
headerImageUrl: "https://source.unsplash.com/WLUHO9A_xik/1920x512",
48+
headerImageUrl: img,
4849
title:
4950
"Clarisse Machanguana takes her skill set to the next level at ASU Thunderbird",
5051
publicationDate: "March 18, 2021",

packages/unity-react-core/src/components/Article/Article.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import { render, cleanup } from "@testing-library/react";
44
import React from "react";
55
import { expect, describe, it, afterEach, beforeEach } from "vitest";
66

7+
import img from "../../../../../shared/assets/img/named/hero01.jpg";
78
import { Article } from "./Article";
89

910
const defaultArgs = {
1011
type: "news",
1112
articleUrl: "https://example.com",
12-
headerImageUrl: "https://source.unsplash.com/random/1920x512",
13+
headerImageUrl: img,
1314
title:
1415
"Clarisse Machanguana takes her skill set to the next level at ASU Thunderbird",
1516
publicationDate: "March 18, 2021",

packages/unity-react-core/src/components/Card/Card.stories.jsx

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import classNames from "classnames";
33
import React from "react";
44

5+
import img1 from "../../../../../shared/assets/img/named/hero01.jpg";
56
import { Card } from "./Card";
67

78
export default {
@@ -49,7 +50,7 @@ export const Default = Template.bind({});
4950
Default.args = {
5051
type: "default",
5152
horizontal: false,
52-
image: "https://source.unsplash.com/WLUHO9A_xik/300x200",
53+
image: img1,
5354
imageAltText: "An example image",
5455
title: "Default title",
5556
body: "<span style='font-weight: bold;'>(Bold!) Body copy goes here.</span> Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
@@ -103,7 +104,7 @@ export const Degree = Template.bind({});
103104
Degree.args = {
104105
type: "degree",
105106
horizontal: false,
106-
image: "https://source.unsplash.com/WLUHO9A_xik/300x200",
107+
image: img1,
107108
imageAltText: "An example image",
108109
title: "Default title",
109110
body: "<span style='font-weight: bold;'>(Bold!) Body copy goes here.</span> Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
@@ -115,7 +116,7 @@ Degree.parameters = {
115116
116117
<Card
117118
body="<span style='font-weight: bold;'>(Bold!) Body copy goes here.</span> Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo."
118-
image="https://source.unsplash.com/WLUHO9A_xik/300x200"
119+
image=img1
119120
imageAltText="An example image"
120121
title="Default title"
121122
type="degree"
@@ -128,7 +129,7 @@ export const Event = Template.bind({});
128129
Event.args = {
129130
type: "event",
130131
horizontal: false,
131-
image: "https://source.unsplash.com/WLUHO9A_xik/300x200",
132+
image: img1,
132133
imageAltText: "An example image",
133134
title:
134135
"Event title Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore exercitationem ad voluptatem dolore dolores nulla ipsam quo distinctio expedita doloribus nisi similique obcaecati velit illo autem numquam iusto, rem nesciunt repellendus laborum. Rerum quisquam, soluta aspernatur a harum dolor ducimus nulla. Itaque aliquam cum fugiat error esse ipsam rerum consectetur!",
@@ -164,7 +165,7 @@ The event props, \`eventLocation\` and \`eventTime\` are allowed to contain basi
164165
eventFormat="stack"
165166
eventLocation="Downtown Phoenix campus"
166167
eventTime="Wed, November 21st, 2021<br>11:30 a.m - 12:30 p.m."
167-
image="https://source.unsplash.com/WLUHO9A_xik/300x200"
168+
image=img1
168169
imageAltText="An example image"
169170
title="Event title"
170171
type="event"
@@ -177,7 +178,7 @@ export const Story = Template.bind({});
177178
Story.args = {
178179
type: "story",
179180
horizontal: false,
180-
image: "https://source.unsplash.com/WLUHO9A_xik/300x200",
181+
image: img1,
181182
imageAltText: "An example image",
182183
title: "Story title",
183184
body: "<span style='font-weight: bold;'>(Bold!) Body copy goes here.</span> Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
@@ -212,7 +213,7 @@ Story.parameters = {
212213
size: 'default'
213214
}
214215
]}
215-
image="https://source.unsplash.com/WLUHO9A_xik/300x200"
216+
image=img1
216217
imageAltText="An example image"
217218
linkLabel="Default link"
218219
linkUrl="http://google.com"
@@ -244,7 +245,7 @@ export const HorizontalStoryCard = HorizontalTemplate.bind({});
244245
HorizontalStoryCard.args = {
245246
type: "story",
246247
horizontal: true,
247-
image: "https://source.unsplash.com/WLUHO9A_xik/300x200",
248+
image: img1,
248249
imageAltText: "An example image",
249250
title: "Horizontal story",
250251
body: "<span style='font-weight: bold;'>(Bold!) Body copy goes here.</span> Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
@@ -262,7 +263,7 @@ HorizontalStoryCard.parameters = {
262263
<Card
263264
body="<span style='font-weight: bold;'>(Bold!) Body copy goes here.</span> Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo."
264265
horizontal
265-
image="https://source.unsplash.com/WLUHO9A_xik/300x200"
266+
image=img1
266267
imageAltText="An example image"
267268
tags={[
268269
{
@@ -292,7 +293,7 @@ export const AsuNewsStory = Template.bind({});
292293
AsuNewsStory.args = {
293294
type: "story",
294295
horizontal: false,
295-
image: "https://source.unsplash.com/WLUHO9A_xik/300x200",
296+
image: img1,
296297
imageAltText: "An example image",
297298
title: "ASU News Story title",
298299
body: "<span style='font-weight: bold;'>(Bold!) Body copy goes here.</span> Limit to 5 lines max. Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua eiusmod tempo.",
@@ -318,7 +319,7 @@ AsuNewsStory.parameters = {
318319
size: 'default'
319320
}
320321
]}
321-
image="https://source.unsplash.com/WLUHO9A_xik/300x200"
322+
image=img1
322323
imageAltText="An example image"
323324
title="ASU News Story title"
324325
type="story"

packages/unity-react-core/src/components/Hero/Hero.stories.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// @ts-check
33
import React from "react";
44

5+
import img1 from "../../../../../shared/assets/img/named/hero01.jpg";
56
import { Hero } from "./Hero";
67

78
/**
@@ -48,7 +49,7 @@ export const HeroSmall = Template.bind({});
4849

4950
HeroSmall.args = {
5051
image: {
51-
url: "https://source.unsplash.com/WLUHO9A_xik/800x400?a=1",
52+
url: img1,
5253
altText: "Hero image",
5354
size: "small",
5455
},
@@ -72,7 +73,7 @@ export const HeroLongTitle = Template.bind({});
7273

7374
HeroLongTitle.args = {
7475
image: {
75-
url: "https://source.unsplash.com/WLUHO9A_xik/800x400?a=1",
76+
url: img1,
7677
altText: "Hero image",
7778
size: "small",
7879
},
@@ -97,7 +98,7 @@ export const HeroMedium = Template.bind({});
9798

9899
HeroMedium.args = {
99100
image: {
100-
url: "https://source.unsplash.com/WLUHO9A_xik/800x400?a=1",
101+
url: img1,
101102
altText: "Hero image",
102103
size: "medium",
103104
},
@@ -128,7 +129,7 @@ export const HeroLarge = Template.bind({});
128129

129130
HeroLarge.args = {
130131
image: {
131-
url: "https://source.unsplash.com/WLUHO9A_xik/800x400?a=1",
132+
url: img1,
132133
altText: "Hero image",
133134
size: "large",
134135
},

packages/unity-react-core/src/components/Hero/Hero.test.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import { render, cleanup } from "@testing-library/react";
44
import React from "react";
55
import { expect, describe, it, afterEach, beforeEach, test } from "vitest";
66

7+
import img1 from "../../../../../shared/assets/img/named/hero01.jpg";
78
import { Hero } from "./Hero";
89

910
const defaultArgs = {
1011
image: {
11-
url: "https://source.unsplash.com/random/800x400?a=1",
12+
url: img1,
1213
altText: "Hero image",
1314
size: "large",
1415
},
@@ -18,7 +19,7 @@ const defaultArgs = {
1819
contents: [
1920
{
2021
text: `Lorem ipsum dolor sit amet, consectetur adipiscing elit,
21-
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.`,
22+
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.`,
2223
},
2324
],
2425
};
@@ -56,7 +57,7 @@ describe("#Hero without content and subtitle", () => {
5657
it("should render the title only", () => {
5758
const props = {
5859
image: {
59-
url: "https://source.unsplash.com/random/800x400?a=1",
60+
url: img1,
6061
altText: "Hero image",
6162
size: "small",
6263
},

packages/unity-react-core/src/components/Image/Image.stories.jsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
// @ts-check
22
import React from "react";
33

4+
import img1 from "../../../../../shared/assets/img/named/img001.jpg";
5+
import img2 from "../../../../../shared/assets/img/named/img002.jpg";
6+
import img3 from "../../../../../shared/assets/img/named/img003.jpg";
7+
import img4 from "../../../../../shared/assets/img/named/img004.jpg";
48
import { Image } from "./Image";
59

610
export default {
@@ -20,21 +24,21 @@ const Template = args => <Image {...args} />;
2024

2125
export const ImageWithNoCaption = Template.bind({});
2226
ImageWithNoCaption.args = {
23-
src: "https://source.unsplash.com/WLUHO9A_xik/800x600",
27+
src: img1,
2428
alt: "Placeholder image",
2529
border: true,
2630
};
2731

2832
export const ImageWithNoCaptionBorderless = Template.bind({});
2933
ImageWithNoCaptionBorderless.args = {
30-
src: "https://source.unsplash.com/WLUHO9A_xik/800x600",
34+
src: img1,
3135
alt: "Placeholder image",
3236
border: false,
3337
};
3438

3539
export const ImageWithCaption = Template.bind({});
3640
ImageWithCaption.args = {
37-
src: "https://source.unsplash.com/WLUHO9A_xik/800x600",
41+
src: img2,
3842
alt: "Placeholder image",
3943
caption: "This is a <a href='#'>caption</a>.",
4044
captionTitle: "Caption title",
@@ -43,7 +47,7 @@ ImageWithCaption.args = {
4347

4448
export const ImageWithCaptionAndDropshadow = Template.bind({});
4549
ImageWithCaptionAndDropshadow.args = {
46-
src: "https://source.unsplash.com/WLUHO9A_xik/800x600",
50+
src: img3,
4751
alt: "Placeholder image",
4852
caption: "This is a <a href='#'>caption</a>.",
4953
captionTitle: "Caption title",
@@ -72,5 +76,5 @@ export const GridImages = GridTemplate.bind({});
7276
GridImages.args = {
7377
alt: "Placeholder image",
7478
width: "100%",
75-
src: "https://source.unsplash.com/WLUHO9A_xik/800x600",
79+
src: img4,
7680
};

packages/unity-react-core/src/components/Image/Image.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { render, cleanup } from "@testing-library/react";
22
import React from "react";
33
import { expect, describe, it, afterEach, beforeEach } from "vitest";
44

5+
import img from "../../../../../shared/assets/img/named/img001.jpg";
56
import { Image } from "./Image";
67

78
const renderImage = props => {
@@ -13,7 +14,7 @@ describe("#Image", () => {
1314

1415
beforeEach(() => {
1516
component = renderImage({
16-
src: "https://source.unsplash.com/WLUHO9A_xik/800x600",
17+
src: img,
1718
alt: "Placeholder image",
1819
});
1920
});

packages/unity-react-core/src/components/Pagination/Pagination.stories.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ export default {
1111
docs: {
1212
description: {
1313
component: `The Pagintaion component can be used to generate pagination.
14-
## Usage
14+
## Usage
1515
16-
All props are valid options for all pagination types.
17-
Pagination users are responsible to meet all UDS design guidelines with their Pagination,
18-
including rules on the use of Call-to-Action buttons and tags.
16+
All props are valid options for all pagination types.
17+
Pagination users are responsible to meet all UDS design guidelines with their Pagination,
18+
including rules on the use of Call-to-Action buttons and tags.
1919
20-
View component examples and source code below.
21-
`,
20+
View component examples and source code below.
21+
`,
2222
},
2323
},
2424
},

0 commit comments

Comments
 (0)