From 735908056db0193c5b2c8c38e62e13cf0fc45269 Mon Sep 17 00:00:00 2001 From: Sammy Date: Mon, 11 Dec 2023 10:48:45 -0500 Subject: [PATCH] [Issues 827, 828] Process and Research Content --- frontend/public/locales/en/common.json | 24 ++-- .../src/pages/content/IndexGoalContent.tsx | 10 +- .../src/pages/content/IndexProcessContent.tsx | 94 ---------------- .../pages/content/IndexResearchContent.tsx | 103 ------------------ .../content/ProcessAndResearchContent.tsx | 55 ++++++++++ frontend/src/pages/index.tsx | 6 +- .../IndexProcessContent.stories.tsx | 17 --- .../IndexResearchContent.stories.tsx | 17 --- .../components/IndexProcessContent.test.tsx | 14 --- .../components/IndexResearchContent.test.tsx | 14 --- .../ProcessAndResearchContent.test.tsx | 19 ++++ 11 files changed, 90 insertions(+), 283 deletions(-) delete mode 100644 frontend/src/pages/content/IndexProcessContent.tsx delete mode 100644 frontend/src/pages/content/IndexResearchContent.tsx create mode 100644 frontend/src/pages/content/ProcessAndResearchContent.tsx delete mode 100644 frontend/stories/components/IndexProcessContent.stories.tsx delete mode 100644 frontend/stories/components/IndexResearchContent.stories.tsx delete mode 100644 frontend/tests/components/IndexProcessContent.test.tsx delete mode 100644 frontend/tests/components/IndexResearchContent.test.tsx create mode 100644 frontend/tests/components/ProcessAndResearchContent.test.tsx diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json index b290f23b2..b80288d22 100644 --- a/frontend/public/locales/en/common.json +++ b/frontend/public/locales/en/common.json @@ -13,23 +13,13 @@ "paragraph_3": "If you work for a federal grantmaking agency, we’re making it easier for your communities (including underserved communities) to find the funding they need.", "cta": "Sign up for project updates" }, - "process": { - "title": "The process", - "paragraph_1": "This project is transparent, iterative, and agile. All of the code we are writing is open source and our roadmap is public. As we regularly release new versions of Simpler.Grants.gov, you'll see what we're building and prioritizing. With each iteration, you'll be able to try out functional software and give feedback to tell us what works, what can be improved, and inform what happens next. ", - "cta": "Learn about what's happening", - "title_2": "Are you code-savvy?", - "paragraph_2": "If you’re interested in exploring the details of exactly what we’re building, check out the GitHub project:", - "list": "" - }, - "research": { - "title": "The research", - "paragraph_1": "We conducted extensive research in 2023 to gather insights from applicants, potential applicants, and grantmakers. We’re using these findings to guide our work. And your ongoing feedback will inform and inspire new features as we build a simpler Grants gov together.", - "cta": "Read the research findings", - "title_2": "Applicant archetypes", - "paragraph_2": "The Novice — Applicants lacking familiarity with the grant application process, including first-time or infrequent applicants and those who never apply", - "paragraph_3": "The Collaborator — Applicants who've applied before, working with colleagues or partner organizations to increase their chances of success", - "paragraph_4": "The Maestro — Frequent applicants familiar with Grants.gov, who are often directly responsible for managing multiple applications at once", - "paragraph_5": "The Supervisor — Applicants who have a more senior role at organizations and have less frequent direct involvement with Grants.gov than Maestros." + "process_and_research": { + "title_1": "The process", + "title_2": "The research", + "paragraph_1": "This project is transparent, iterative, and agile. All of the code we’re writing is open source and our roadmap is public. As we release new versions, you can try out functional software and give us feedback on what works and what can be improved to inform what happens next.", + "paragraph_2": "We conducted extensive research in 2023 to gather insights from applicants, potential applicants, and grantmakers. We’re using these findings to guide our work. And your ongoing feedback will inform and inspire new features as we build a simpler Grants gov together.", + "cta_1": "Learn about what’s happening", + "cta_2": "Read the research findings" }, "fo_title": "Improvements to funding opportunity announcements", "fo_paragraph_1": "Funding opportunities should not only be easy to find, share, and apply for. They should also be easy to read and understand. Our objective is to simplify and organize funding opportunities announcements. ", diff --git a/frontend/src/pages/content/IndexGoalContent.tsx b/frontend/src/pages/content/IndexGoalContent.tsx index a4ffc86d0..58f3bcf85 100644 --- a/frontend/src/pages/content/IndexGoalContent.tsx +++ b/frontend/src/pages/content/IndexGoalContent.tsx @@ -14,11 +14,15 @@ const IndexGoalContent = () => { bottomBorder="light" > -

{t("goal.paragraph_1")}

- +

{t("goal.paragraph_1")}

+
diff --git a/frontend/src/pages/content/IndexProcessContent.tsx b/frontend/src/pages/content/IndexProcessContent.tsx deleted file mode 100644 index 486d1a325..000000000 --- a/frontend/src/pages/content/IndexProcessContent.tsx +++ /dev/null @@ -1,94 +0,0 @@ -import { ExternalRoutes } from "src/constants/routes"; - -import { Trans, useTranslation } from "next-i18next"; -import Link from "next/link"; -import { Button, Grid, Icon } from "@trussworks/react-uswds"; - -import ContentLayout from "src/components/ContentLayout"; - -const IndexProcessContent = () => { - const { t } = useTranslation("common", { keyPrefix: "Index" }); - - return ( - - -

{t("process.paragraph_1")}

- - - -
- -

- {t("process.title_2")} -

-

- {t("process.paragraph_2")} -

- - ), - li:
  • , - small: , - repo: ( - - ), - goals: ( - - ), - roadmap: ( - - ), - contribute: ( - - ), - adr: ( - - ), - }} - /> - - - ); -}; - -export default IndexProcessContent; diff --git a/frontend/src/pages/content/IndexResearchContent.tsx b/frontend/src/pages/content/IndexResearchContent.tsx deleted file mode 100644 index aef27ce92..000000000 --- a/frontend/src/pages/content/IndexResearchContent.tsx +++ /dev/null @@ -1,103 +0,0 @@ -import { Trans, useTranslation } from "next-i18next"; -import Image from "next/image"; -import Link from "next/link"; -import { Button, Grid, Icon } from "@trussworks/react-uswds"; - -import ContentLayout from "src/components/ContentLayout"; -import embarrassed from "../../../public/img/noun-embarrassed.svg"; -import goal from "../../../public/img/noun-goal.svg"; -import hiring from "../../../public/img/noun-hiring.svg"; -import leadership from "../../../public/img/noun-leadership.svg"; - -const IndexResearchContent = () => { - const { t } = useTranslation("common", { keyPrefix: "Index" }); - - return ( - - -

    {t("research.paragraph_1")}

    - - - -
    - -

    - {t("research.title_2")} -

    - - - embarrased - - -

    - -

    -
    -
    - - - leadership - - -

    - -

    -
    -
    - - - goal - - -

    - -

    -
    -
    - - - hiring - - -

    - -

    -
    -
    -
    -
    - ); -}; - -export default IndexResearchContent; diff --git a/frontend/src/pages/content/ProcessAndResearchContent.tsx b/frontend/src/pages/content/ProcessAndResearchContent.tsx new file mode 100644 index 000000000..059b1c349 --- /dev/null +++ b/frontend/src/pages/content/ProcessAndResearchContent.tsx @@ -0,0 +1,55 @@ +import { useTranslation } from "next-i18next"; +import Link from "next/link"; +import { Button, Grid, Icon } from "@trussworks/react-uswds"; + +import ContentLayout from "src/components/ContentLayout"; + +const ProcessAndResearchContent = () => { + const { t } = useTranslation("common", { keyPrefix: "Index" }); + + return ( + + +

    + {t("process_and_research.title_1")} +

    +

    + {t("process_and_research.paragraph_1")} +

    + + + +
    + +

    + {t("process_and_research.title_2")} +

    +

    + {t("process_and_research.paragraph_2")} +

    + + + +
    +
    + ); +}; + +export default ProcessAndResearchContent; diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index 976ad4be2..db8458069 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -8,8 +8,7 @@ import PageSEO from "src/components/PageSEO"; import FullWidthAlert from "../components/FullWidthAlert"; import Hero from "../components/Hero"; import IndexGoalContent from "./content/IndexGoalContent"; -import IndexProcessContent from "./content/IndexProcessContent"; -import IndexResearchContent from "./content/IndexResearchContent"; +import ProcessAndResearchContent from "./content/ProcessAndResearchContent"; const Home: NextPage = () => { const { t } = useTranslation("common", { keyPrefix: "Index" }); @@ -34,8 +33,7 @@ const Home: NextPage = () => { /> - - + ); }; diff --git a/frontend/stories/components/IndexProcessContent.stories.tsx b/frontend/stories/components/IndexProcessContent.stories.tsx deleted file mode 100644 index a5095d2ec..000000000 --- a/frontend/stories/components/IndexProcessContent.stories.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Meta } from "@storybook/react"; -import ProcessContent from "src/pages/content/IndexProcessContent"; - -const meta: Meta = { - title: "Components/Content/Index Process Content", - component: ProcessContent, -}; -export default meta; - -export const Default = { - parameters: { - design: { - type: "figma", - url: "https://www.figma.com/file/lpKPdyTyLJB5JArxhGjJnE/beta.grants.gov?type=design&node-id=918-1656&mode=design&t=MT9uU0mTxDgymbFg-4", - }, - }, -}; diff --git a/frontend/stories/components/IndexResearchContent.stories.tsx b/frontend/stories/components/IndexResearchContent.stories.tsx deleted file mode 100644 index 40d846067..000000000 --- a/frontend/stories/components/IndexResearchContent.stories.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { Meta } from "@storybook/react"; -import IndexResearchContent from "src/pages/content/IndexResearchContent"; - -const meta: Meta = { - title: "Components/Content/Index Research Content", - component: IndexResearchContent, -}; -export default meta; - -export const Default = { - parameters: { - design: { - type: "figma", - url: "https://www.figma.com/file/lpKPdyTyLJB5JArxhGjJnE/beta.grants.gov?type=design&node-id=918-1668&mode=design&t=MT9uU0mTxDgymbFg-4", - }, - }, -}; diff --git a/frontend/tests/components/IndexProcessContent.test.tsx b/frontend/tests/components/IndexProcessContent.test.tsx deleted file mode 100644 index 28f8827d2..000000000 --- a/frontend/tests/components/IndexProcessContent.test.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import ProcessContent from "src/pages/content/IndexProcessContent"; - -describe("Process Content", () => { - it("Renders without errors", () => { - render(); - const processH2 = screen.getByRole("heading", { - level: 2, - name: /The process?/i, - }); - - expect(processH2).toBeInTheDocument(); - }); -}); diff --git a/frontend/tests/components/IndexResearchContent.test.tsx b/frontend/tests/components/IndexResearchContent.test.tsx deleted file mode 100644 index b2e7875d7..000000000 --- a/frontend/tests/components/IndexResearchContent.test.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import { render, screen } from "@testing-library/react"; -import ResearchContent from "src/pages/content/IndexResearchContent"; - -describe("Research Content", () => { - it("Renders without errors", () => { - render(); - const researchH2 = screen.getByRole("heading", { - level: 2, - name: /The research?/i, - }); - - expect(researchH2).toBeInTheDocument(); - }); -}); diff --git a/frontend/tests/components/ProcessAndResearchContent.test.tsx b/frontend/tests/components/ProcessAndResearchContent.test.tsx new file mode 100644 index 000000000..3c51296b6 --- /dev/null +++ b/frontend/tests/components/ProcessAndResearchContent.test.tsx @@ -0,0 +1,19 @@ +import { render, screen } from "@testing-library/react"; +import ProcessAndResearchContent from "src/pages/content/ProcessAndResearchContent"; + +describe("Process Content", () => { + it("Renders without errors", () => { + render(); + const processH3 = screen.getByRole("heading", { + level: 2, + name: /The process/i, + }); + const researchH3 = screen.getByRole("heading", { + level: 2, + name: /The research/i, + }); + + expect(processH3).toBeInTheDocument(); + expect(researchH3).toBeInTheDocument(); + }); +});