-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from thepolicylab-projectportals/refactor/uni…
…fy-image-interfaces refactor: unify image interfaces
- Loading branch information
Showing
48 changed files
with
151 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
"filterOn": { | ||
"status": ["completed"] | ||
}, | ||
"image": "" | ||
"image": "background.jpg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
"filterOn": { | ||
"status": ["open", "ongoing", "completed"] | ||
}, | ||
"image": "open.jpg" | ||
"image": "background.jpg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
"filterOn": { | ||
"status": ["ongoing"] | ||
}, | ||
"image": "ongoing.jpg" | ||
"image": "background.jpg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,5 @@ | |
"filterOn": { | ||
"status": ["open"] | ||
}, | ||
"image": "open.jpg" | ||
"image": "background.jpg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Example theme image files: | ||
|
||
- background.jpg | ||
- from https://commons.wikimedia.org/wiki/File:NRCSCT01022(15456)(NRCS_Photo_Gallery).jpg | ||
- Attribution: USDA Natural Resources Conservation Service |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,5 +55,5 @@ | |
} | ||
], | ||
"accessibility": "We are committed to making the Research Partnerships Portal accessible for all visitors, and we welcome your feedback on the site. If you encounter any accessibility barriers while using the Portal, please contact Jenna Wallace (email: [[email protected]](mailto:[email protected]), office phone number: 210-207-7930) for assistance.\n\nWe are currently working to make the Research Partnerships Portal fully compliant with requirements in the Web Content Accessibility Guidelines’ A and AA standard. Our final steps to meet WCAG 2.1 A and AA criteria are to fulfill 2.4.2 Page Titled, which will make pages easier to differentiate for screen reader users, 2.5.3 Label in Name, which will make project cards more descriptive for screen reader users, and 2.4.5 Multiple Ways, which will make it easier for all users to find the content most relevant to them.\nFor more detailed descriptions of how the Research Partnerships Portal meets WCAG criteria, please see our full [Accessibility Conformance Report](https://drive.google.com/file/d/1C9ohi1t6N2yFsaVW_xcKsexflZymh_82/view).", | ||
"image": "about.jpg" | ||
"image": "background.jpg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+17.6 KB
(270%)
packages/example-site/content/theme-image/social-share-image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 12 additions & 3 deletions
15
packages/gatsby-theme-project-portal/src/components/Contact.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { Contact } from "./Contact" | ||
import { emptyGatsbyImageData } from "./Story.utilities" | ||
import { loadImage } from "./Story.utilities" | ||
|
||
const meta: Meta<typeof Contact> = { | ||
component: Contact, | ||
tags: ["autodocs"], | ||
includeStories: /^[A-Z]/, | ||
} | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof Contact> | ||
|
||
export const contactImage = loadImage("image/torso.png", 100, 100, "fixed") | ||
|
||
export const contactImageYogi = loadImage("image/yogi.jpg", 100, 100, "fixed") | ||
|
||
export const Primary: Story = { | ||
args: { | ||
name: "Contact Name", | ||
title: "Title", | ||
employer: "Employer", | ||
email: "[email protected]", | ||
showEmail: true, | ||
image: emptyGatsbyImageData, | ||
defaultImage: emptyGatsbyImageData, | ||
image: contactImage, | ||
defaultImage: contactImageYogi, | ||
}, | ||
} | ||
|
||
export const NoEmail: Story = { | ||
args: { ...Primary.args, showEmail: false }, | ||
} | ||
|
||
export const NoImage: Story = { | ||
args: { ...Primary.args, image: null }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { MainContact } from "./MainContact" | ||
import { emptyGatsbyImageData } from "./Story.utilities" | ||
import { contactImage, contactImageYogi } from "./Contact.stories" | ||
|
||
const meta: Meta<typeof MainContact> = { | ||
component: MainContact, | ||
|
@@ -19,8 +19,8 @@ export const Primary: Story = { | |
email: "[email protected]", | ||
projectInterestLink: "https://ccv.brown.edu/", | ||
status: "open", | ||
image: emptyGatsbyImageData, | ||
defaultImage: emptyGatsbyImageData, | ||
image: contactImage, | ||
defaultImage: contactImageYogi, | ||
openText: "Open project – get involved.", | ||
ongoingText: "Ongoing project – watch us do something awesome.", | ||
completeText: "Completed project – look at what we did!", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { ProjectDetail } from "./ProjectDetail" | ||
import * as ContactStories from "./Contact.stories" | ||
import * as ProjectTeamStories from "./ProjectTeam.stories" | ||
import { emptyGatsbyImageData } from "./Story.utilities" | ||
import { contactImage, contactImageYogi } from "./Contact.stories" | ||
|
||
const meta: Meta<typeof ProjectDetail> = { | ||
component: ProjectDetail, | ||
|
@@ -36,7 +36,7 @@ export const Primary: Story = { | |
title: "Title", | ||
employer: "Employer", | ||
email: "[email protected]", | ||
image: emptyGatsbyImageData, | ||
image: contactImageYogi, | ||
}, | ||
openText: "Are you interested in collaborating?", | ||
ongoingText: "This project is ongoing.", | ||
|
@@ -53,6 +53,8 @@ export const Primary: Story = { | |
agency: "Sample Agency", | ||
lastModified: new Date("2022-05-27T16:34:04.000Z"), | ||
topics: [{ slug: "test", title: "Test" }], | ||
|
||
defaultContactImage: contactImage, | ||
}, | ||
} | ||
|
||
|
@@ -79,7 +81,6 @@ export const Minimum: Story = { | |
title: "Title", | ||
employer: "Employer", | ||
email: "[email protected]", | ||
image: emptyGatsbyImageData, | ||
}, | ||
|
||
status: "open", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
packages/gatsby-theme-project-portal/src/components/SiteTitle.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
import type { Meta, StoryObj } from "@storybook/react" | ||
import { SiteTitle } from "./SiteTitle" | ||
|
||
import { emptyGatsbyImageData } from "./Story.utilities" | ||
import { loadImage } from "./Story.utilities" | ||
import { IGatsbyImageData } from "gatsby-plugin-image" | ||
|
||
const meta: Meta<typeof SiteTitle> = { | ||
component: SiteTitle, | ||
tags: ["autodocs"], | ||
includeStories: /^[A-Z]/, | ||
} | ||
|
||
export const siteTitleLogo = loadImage("image/logo-square.png", 64, 74, "fixed") | ||
|
||
export default meta | ||
|
||
type Story = StoryObj<typeof SiteTitle> | ||
|
||
export const Primary: Story = { | ||
args: { | ||
image: emptyGatsbyImageData, | ||
image: siteTitleLogo, | ||
title: "The Site Title", | ||
}, | ||
} |
Oops, something went wrong.