Git Product home page Git Product logo

distributeaid.org's Introduction

Distribute Aid's Landing Site

CodeSee: View Architecture Diagram Open in Gitpod

Distribute Aid's landing site provides general information about our org, specific information about our projects / operations, and public access to the materials and tools we have developed. The main goals of this project are to:

  1. Introduce Distribute Aid, the work we do, our impact to date, and the many people who have contributed over the years.

  2. Make it easy for our non-dev volunteers to directly manage content and publish changes to the site.

  3. Share relevant knowledge / data / tools that inspire visitors to take action in support of DA, our network, and grassroots aid groups in general.

Quick Links

** require an account to access, please tag @jtfairbank in a comment if you need one

Development Process

Code of Conduct

First, please read our code of conduct.

Issue Tracking

We use Github issues to manage development tasks for this repository. The issues themselves are fairly light on detail in favor of a simple description of scope (i.e. the conditions for the task being considered "done"). Most tasks will be driven by content requirements, so please coordinate with the requesting content creator for context, sample content, and additional details. We strive to include an issue-specific CodeSee Map to highlight relevant files and folders.

When you begin working on an issue, please self-assign or comment on it indicating you're beginning work to avoid duplicate effort.

Issues with triage labels are still being finalized and are not ready for work.

Pull Requests

When you're ready to submit your code, open a pull request with "Closes #X" in the description to link the relevant issue. Our automated checks will run, and then your PR will be reviewed by a maintainer. Once any pending issues are resolved, the maintainer will merge it into our production branch, saga.

We recommend creating a "draft" pull request while you are still working on the issue. This allows you to ask maintainers for help / feedback during the dev process, and allows other contributors to see what you are working on for inspiration and to prevent duplicate efforts. You can make a draft pull request by following steps:

  1. Create a new branch to work on and make at least 1 commit (ex: add your name to the /CONTRIBUTORS.md file).
  2. Push the new branch and go to pull request page on Github. Accept the prompt that appears at the top of the page asking if you want to create a new pull request.
  3. Create the pull request like normal. Before submitting it, click the dropdown arrown on the "Create Pull Request" submit button and select "Create Draft" instead.
  4. You can now share your code and collaborate with other contributors / maintainers through the draft pull request. The draft pull request will automatically include any new commits pushed to your branch, just like a normal pull request.
  5. Once you've finished working on the issue, click the "ready for review" button on the pull request page and the "draft" status will be removed and a maintainer can begin the review phase.

Reviews

DA aims to create a welcoming and encouraging environment for our contributors. It's easy for the intention of code review comments to be unclear or get misinterpreted. To help with communication, reviewers are encouraged to use conventional comments and explicitly indicate that comments are (blocking), where the discussion must be resolved for PR to be merged, or (non-blocking) where resolving the discussion is optional for the implementer.

Approval and Merging

Reviewers should grant approval if they do not feel additional review is necessary before merging. This does not necessarily mean no more changes are required before merging, but that any further changes are expected to be minor enough to not require review.

If the pull request does not require additional changes, the reviewer should merge it immediately. Otherwise, the pull request author should address all comments marked (blocking) or nit. Contributors are encouraged to at least reply to (non-blocking) and (if-minor) comments if they do not address them with code changes. After addressing the comments, the pull request author should tag the reviewer in a comment to indicate they are ready for a final review.

Dev Setup

Remote Development

Open in Gitpod

Pressing the "Open in Gitpod" button will start up a VSCode instance in the cloud, getting you up and running easily / quickly. You can share this instance with other contributors to pair remotely. Gitpod uses the .gitpod.yml settings to automatically configure your dev environment. You'll need to sign in with GitHub.

Note: When choosing VS Code desktop with Gitpod always be sure to select Linux from the dropdown as the operating system when prompted.

Note: Your Gitpod instance will expire after you stop using it. To ensure your code is saved, you MUST create a branch, commit code changes, and push the branch up to Github.

Troubleshooting: Sometimes Gitpod runs into trouble when configuring the dev environment. If you run into problems, double check the different terminals to ensure that the yarn install and npx playwright install-deps setup commands completed successfully, the dev server is running, and the storybook server is running.

Local Development

Install system dependencies:

  • Node v16
  • Yarn v1.22.5

Install project dependencies:

  • yarn

Run the dev server:

  • yarn dev

Finally, checkout the local site & GraphQL sandbox at:

Dev Notes

Crucial Commands

yarn dev

Run the project locally with live reload in development mode.

Live reload works when changing files in /src, but if you are changing /gatsby-node.js or files in /gatsby you will have to restart the dev server and possibly run a yarn clean to have them take effect. That's because these files control Gatsby's build process which is run once when starting the server, as opposed to /src files which control the site's UI.

yarn clean

Remove data and build artifacts from Gatsby's cache.

We recommend doing this whenever you change branches or think you may be running into issues caused by incorrect / outdated cached data. You may also need to run this between builds if you are changing /gatsby-node.js or files in /gatsby.

yarn build

Run a production build into ./public. The result is ready to be put on any static hosting you prefer.

yarn serve

Spin up a production-ready server with the site. Don't forget to build your page beforehand.

Prettify Your Code

yarn pretty

This is included in our pre-commit hook so all committed code is formatted the same.

Running the unit tests

yarn test

Running the end to end tests

First start the local server with yarn dev. Then run yarn test:e2e in another terminal.

Running TypeScript Checks

yarn test:types

This is included in our pre-commit hook so all committed code is type safe.

Component development with Storybook

Storybook is a frontend workshop for building UI components and pages in isolation. Components can have an arbitrary number of stories, gathered in files ending with .stories.tsx next to the component source file.

The documentation site has extensive guides and tutorials. The page What's a Story is a must read. In short, each story describes a specific usage of a component, rendered in isolation within the Storybook UI. Controls and knobs can be used to change the component properties dynamically.

First run the dev server with yarn dev. Then run yarn storybook in another termainal. This will start the Storybook server at the following address:

http://localhost:6006/

Code visibility with CodeSee

We recommend you create a CodeSee account, free for open source development. We use their codebase maps tool during our development and review processes to help make it easy to understand your changes or any problems you might run into along the way.

Where To Put Things

Please see these CodeSee Maps for more comprehensive signposting:

Our react src/ folder layout was inspired by this blog post but can be changed up as desired.

Data sourcing & processing code used by /gatsby-node.js should go in /gatsby.

Content is committed to /content by Forestry, our CMS. You can also place images, pdfs, and other file-based content in /static, but it's usually more appropriate to add them through Forestry.

Content management system

We use Forestry to manage our content. Forestry is a "git-based CMS", which means that all the content is stored inside this repo.

Visit the /.forestry directory to view the configuration for our site, templates, and data files.

All the content is stored inside the /content directory.

How do I edit content?

There are 2 ways to edit content:

  • edit files in the /content directory and make a pull request through github
  • make changes in Forestry's UI (requires an account, tag @jtfairbank in a comment if you need one)

Deployment & Production

Netlify auto-generates build previews when pull requests are submitted on Github (including draft pull requests). You can access them by going to the relevant PR and clicking the "details" link on the netlify/da-landing-2/deploy-preview check. Note that all other checks have to pass for a build preview to be made.

Netlify also automatically deploys the production site from our saga branch. Pushing commits or merging pull requests into saga will trigger the deploy after all checks are passed. If the checks or build process fail, Netlify will continue to serve the existing version of the site.

Technologies Used

Content Management

General Tools

  • Typescript - scripting language
  • Yarn - package manager
  • Prettier - code formatter (via the pretty-quick node module)
  • Jest - unit test framework
  • Playwright - end-to-end (E2E) test framework
  • Storybook - component and page development workshop
  • CodeSee - codebase maps and code visibility

Build Tools

Front End

Production

Previous Work & Credits

Initial commit bootstrapped off of Contentful Gatsby Starter Blog which is MIT licensed.

The original DA Landing Site project can be found at https://gitlab.com/distribute-aid/landing. <3

distributeaid.org's People

Contributors

adeledistributeaid avatar coderbyheart avatar cubes avatar deammer avatar dependabot[bot] avatar dolatapatryk avatar dorian-edwards avatar fredericbonnet avatar hola-soy-milk avatar jasonfritsche avatar jleven avatar jodeoo avatar jtfairbank avatar keshakreates avatar khendrikse avatar linds0202 avatar myrfion avatar nafisa-huda avatar noelcastillon1 avatar oluoluoxenfree avatar panzemek avatar pathholder1806 avatar pavle995 avatar preeformance avatar rabeagleissner avatar rcmtcristian avatar renovate-bot avatar renovate[bot] avatar tylergeorgealexander avatar wwwwwlwwwww avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

distributeaid.org's Issues

Document How To Restructure Contentful Models

Could get tricky, since the code depends on these models.

  • Document how storytelling volunteers can & can't change the Contentful models independently. EX: Adding a field should be fine, renaming a field would break references to it.
  • Document how storytelling volunteers & devs should pair to adjust the models in Contentful and the codebase at the same time.
  • Restructure existing site hierarchy to be less complicate to work with.

Create ImageCarousel Contentful Model and Refactor to Data Object

Previous work: ImageCarousel section added to Section.tsx switch statement. React component created.

  • The ImageCarousel displays images from an object passed into it. It is currently using a placeholder image object.

Starting Point:
Recording: https://app.codesee.io/shared/99dc9ec0-3804-11ec-b5c4-e93c0b8edf5c

Map with Tour: https://app.codesee.io/maps/public/fe74c460-3805-11ec-8cad-e75806fe4532

https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page

Goal:

  • Add Contentful model to provide needed data for the component.
  • Refactor ImageCarousel to use Contentful query object structure.

Integrate a site-wide search

Perhaps using Algolia

Goals:

  • mention Algolia in the Data Privacy section of the page
  • Integrate Algolia package
  • Index site using Algolia
  • Design/implement search bar
  • Deploy hook to rebuild Algolia index

Import fonts globally

We're currently importing fonts in the layouts/Default.tsx file. This means that pages that don't use this layout won't download the fonts.

We should import the fonts globally so that every page is consistent.

Launch Region Pages w/ Needs Assessment Results

Use Forestry to implement region pages, instead of Contentful.

  • 1. Create a Region page template in Forestry with the following fields
Region Name: string
Sub-Region Name: string
Overview: markdown
Government Response: markdown
Population: #
Population Trend: markdown
Population Description: markdown
News Updates: markdown (or list of fields?)
Stay Informed: markdown (or list of fields?)

Visualize Needs Assessment results on each region page.

Include Content from older "Where We Work" Page

  • 1. Review where-we-work & related region pages for relevant content.
  • 2. Add it to our new region pages.
  • 3. Delete the older where-we-work / region pages.

Display Shipment Totals on Region Template Pages

Previous work: add content to the regions listing (index page) and to each region page (templates).

  • Index page now displays each region, along with a thumbnail of a map of the region.
  • Template page now displays region information (name + full-image map) and a table of shipment data, including icons describing the category of the ship.

Starting Point: https://app.codesee.io/shared/eda14600-0681-11ec-bcdf-b35d3087a4b1

Goals:

  • Show the totals for relevant columns as a bottom row in the table: # of shipments, commercial value, weight, distance, C02.
  • Reach: Pull the totals out into a more stylized summary above the table, to highlight our impact.
  • Evaluate additional ways to display the totals (see issue).
  • Slight number formatting. Possibly look at browser region to format based on user locale.

Build the "About us" page

Designs are here.

There are 5 sections:

  • the hero with a video
  • the mission statement
  • the board members
  • the mission details
  • the timeline

Please feel free to work on all of them at once or break them up into multiple PRs.

Notes

  • the page route should be /about (replace the /who-we-are route)
  • the floating social links will need to be displayed on other pages, so it would be great to create a reusable component for them
  • this article might be a good starting point for building the timeline

Assets:

Timeline items as JSON:

[
  {
    "period": "Summer 2018",
    "content": "When sorting donations in Scotland Sara had the idea for Distribute Aid to make it easier for people to help"
  },
  {
    "period": "Fall 2018",
    "content": "Sara and Taylor (co-founders) spent 3 months visiting and volunteering with 50+ aid organisations in Europe to discover the most effective ways to help"
  },
  {
    "period": "January 2019",
    "content": "Distribute Aid became a registered charity in Sweden"
  },
  {
    "period": "October 2019",
    "content": "Distribute Aid facilitated its first large in-kind donation"
  },
  {
    "period": "January 2020",
    "content": "Distribute Aid received the \"Most Direct Human Impact\" award by the UN Technology and Innovation Lab"
  },
  {
    "period": "March 2020",
    "content": "Flexport.org rewarded Distribute Aid with a $50,000 grant to provide emergency aid shipments"
  },
  {
    "period": "Fall 2020",
    "content": "Distribute Aid facilitated the international response to the Moria fire, tripling its number of aid shipments to date"
  },
  {
    "period": "Spring 2021",
    "content": "Distribute Aid set up aid hubs and regular routes from the U.K. to help grassroots organisations continue to send aid after Brexit."
  }
]

Switch From NPM & Yarn

Same deal as #1 . I haven't used Yarn before and didn't want to goof it up! If someone can set it up I should be able to read the docs and figure out how to work with it just fine.

Set up path aliases

It would be nice to import components using path aliases. For example: import Nav from '@components/Nav'.

Gatsby has a plugin for it, and we'll also need to set up a tsconfig.json file to make TypeScript aware of the paths.

Setup & Document Deployment

Built & hosted by Netlify.

  • Document this setup & other deployment / production related notes in the README.

Spring Cleaning

It's been a minute since I had a chance to code, so now's a good time to do some maintenance work as I get back up to speed.

Remove Unused Components

(CodeSee Map)

  • DropdownMenu
  • Animation
  • Card
  • Badge

Review & Refactor Static Pages

  • Home
  • About Us
  • Donate

Review & Refactor Route Pages

  • Simplify the Design, Convert CSS to Tailwind
    Moved to #772

Remove unused Contentful-powered functionality:

Be sure to remove unnecessary entries from Contentful, but save the content if it's usable.

  • Taylor's over-architected site / pages / menu setup.
  • Unused content types.
  • Stale content types / data (i.e. previous round of needs assessment).
  • Check for duplicate entries & resolve.

Review Docs & Dev Experience

  • README
  • Document the many config files. Loom? CodeSee Maps?

Style the Region Template Page

Previous work: add content to the regions listing (index page) and to each region page (templates).

  • Index page now displays each region, along with a thumbnail of a map of the region.
  • Template page now displays region information (name + full-image map) and a table of shipment data, including icons describing the category of the ship.

Starting Point: https://app.codesee.io/shared/eda14600-0681-11ec-bcdf-b35d3087a4b1

Goal:

  • Add cell spacing. Alternate row background colors.

Add Fort Pickett and In-kind donations sections to the "How we help" section in the main page

CodeSee Recording:
https://app.codesee.io/shared/4bb1a720-5912-11ec-92c1-f7ca5b5ec43b

Screenshot of In-kind donations Figma design

Figma link:
https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page?node-id=208%3A601

Text content for "In-kind Donations":

Distribute Aid runs a successful in-kind donation programme where we connect companies with aid organisations. Through our network of hundreds of charities we can handle coordinating large volumes of donations. To date we have secured over 5 million items through our in-kind donor programme. Email [email protected] if you can donate in-kind.
  • TODO: @jtfairbank add images and text copy for Fort Pickett section

Refactor: Move PageBanner Component From Content to Section

@ramonh and @jtfairbank created the PageBanner component ( PR #35 ). We originally thought it would be a Content component but during the implementation it made more sense as a Section component with Content components in it. Now we need to refactor the code by moving the component to the right part of the codebase.

  • Move src/components/content/PageBanner.tsx to src/components/section/. Make sure the imports to / from the file aren't broken!
  • Rename the component to SectionPageBanner.tsx. Make sure to update the components name within the file!
  • Please add your name to the /Contributors.md file if this is your first time contributing to the project!

Starting Point: https://app.codesee.io/shared/a1a61c20-278e-11ec-8a7b-bd57c9eaa54f

Setup "Generic" Pages & Content Components

There are plenty of "generic" pages we need to get onto the site, such as "About Us", "How We Work", or informational pages to help our partners understand the complexities of global aid logistics. Each of these pages has unique content, so we can't create a reusable template with custom fields. And there are a decent number of them, so it doesn't make sense to create a specialized template for each page.

Our desired approach is to create a "generic" page template that can incorporate a standard set of content components. This will allow DA's admin & logistics team members to create a new page in forestry and select the content blocks they need, in the order they need them.

We should take a front-to-back approach here: start by hard-coding content into a hard-coded page, and then refactor that into react templates + components, before finally setting up a forestry template and pulling the data down from forestry into our react page / components.

CodeSee Map w/ Tour: https://app.codesee.io/maps/public/0837df10-1efa-11ed-9245-992c0d264c17

Page Template

Each page can have some standard fields, such as a title. Pages will also receive an array of content sections, each of which contains it's own content blocks.

Content Sections

Content sections can have some standard fields, such as a title, as well as an array of content blocks. Content sections span the full width of the screen and their height is based on the amount of content they contain. They are responsible for the layout, background color, and other section-wide styling decisions.

EX: Full width, columns, grid, etc.

Content Blocks

Content blocks have fields based on the type of content that they are displaying. They expand to fill the width that their wrapping section has allocated to them, and are as high as the content requires. They are responsible for rendering the content appropriately.

EX:

  • Body text
    • Markdown field
  • Image with Caption
    • Image
    • Caption Title (only sometimes applicable)
    • Caption Text
    • Attribution
  • Youtube Embed
    • Youtube URL
    • Title to appear above the video
    • Possibly some parameters from these: https://developers.google.com/youtube/player_parameters. Alternatively, Forestry could ask for the full Youtube embed link instead of just the URL, and the user would need to specify these parameters when creating the embed link.
      • cc_load_policy - 1 means captions will be shown by default
      • controls - do video player controls appear in the frame?
      • disablekb - 1 means keyboard controls are disabled
      • modestbranding - removes the Youtube logo from the bottom left)
      • loop - loops the video
      • playsinline - This parameter controls whether videos play inline or fullscreen on iOS. 0 means fullscreen. 0 is default. 1 means inline.
      • rel - If parameter is set to 0, the related videos shown at the end will only be from the same channel as the video. If 1, could be related videos from any channel.
  • General Card(s)
    • Each card
      • Image
      • Image Shape (rectangle or circle)
      • Title
      • Subtitle
      • Body Text
      • Border Color (option for transparent)
      • Body Color (option for transparent)
      • Dropdown
      • Behavior when you hover mouse over it
        • Color change?
        • Text that appears with the hover?
  • Dropdown
    • Title, color of box it appears in, etc. (this is the stuff to show initially).
    • Content block(s) to appear within the dropdown when it’s clicked on.
    • For example, imagine a “What we do” page that lists three different projects, and if you click on one, the box expands with content blocks inside to explain more about that project.
  • Prezi Embed (lower priority)
    • Embed link

Create NumbersSummary Component and Contentful Model

Previous work: NumbersSummary section added to Section.tsx switch statement.

  • No functional code created yet for this feature.

Starting Point:
Recording: https://app.codesee.io/shared/99dc9ec0-3804-11ec-b5c4-e93c0b8edf5c

Map with Tour: https://app.codesee.io/maps/public/fe74c460-3805-11ec-8cad-e75806fe4532

https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page

Goal:

  • Add component to display a 3x2 grid of images with short captions summarizing the year's metrics.
  • Add Contentful model to provide needed data for the component.

Create ShipmentBanner Component and Contentful Model

Previous work: ShipmentBanner section added to Section.tsx switch statement.

  • No functional code created yet for this feature.

Starting Point:
Recording: https://app.codesee.io/shared/99dc9ec0-3804-11ec-b5c4-e93c0b8edf5c

Map with Tour: https://app.codesee.io/maps/public/fe74c460-3805-11ec-8cad-e75806fe4532

Goal:

  • Add component to display a short summary of shipment routes, with truncated image carousel included.
  • Add Contentful model to provide needed data for the component.

https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency @tailwindcss/typography to v0.5.13
  • chore(deps): update dependency node to v18.20.3
  • chore(deps): update dependency ts-jest to v29.1.4
  • fix(deps): update dependency @types/lodash to v4.17.5
  • fix(deps): update dependency csv-parse to v5.5.6
  • fix(deps): update dependency gatsby to v4.25.9
  • fix(deps): update dependency sharp to v0.33.4
  • fix(deps): update dependency tailwindcss to v3.4.4
  • fix(deps): update dependency react-router-dom to v6.23.1
  • fix(deps): update nivo monorepo to ^0.87.0 (@nivo/bar, @nivo/core, @nivo/sunburst)
  • fix(deps): update playwright monorepo to v1.44.1 (@playwright/test, playwright)
  • fix(deps): update react monorepo (@types/react, @types/react-dom, react, react-dom)
  • chore(deps): update dependency node to v20
  • chore(deps): update dependency prettier to v3
  • chore(deps): update peter-evans/create-pull-request action to v6
  • chore(deps): update testing-library monorepo (major) (@testing-library/jest-dom, @testing-library/react)
  • fix(deps): update dependency @fontsource/lato to v5
  • fix(deps): update dependency cross-fetch to v4
  • fix(deps): update dependency husky to v9
  • fix(deps): update dependency pretty-quick to v4
  • fix(deps): update dependency react-markdown to v9
  • 🔐 Create all rate-limited PRs at once 🔐

Pending Branch Automerge

These updates await pending status checks before automerging. Click on a checkbox to abort the branch automerge, and create a PR instead.

  • chore(deps): update babel monorepo to v7.24.7 (@babel/core, @babel/plugin-transform-react-jsx)

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/code-style-pr.yaml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
.github/workflows/code-style.yaml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • peter-evans/create-pull-request v4
.github/workflows/codesee-arch-diagram.yml
  • Codesee-io/codesee-action v2
.github/workflows/test.yaml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/upload-artifact v3
nodenv
.node-version
  • node 18.20.2
npm
package.json
  • @fontsource/lato 4.5.10
  • @nivo/bar ^0.85.0
  • @nivo/core 0.85.1
  • @nivo/sunburst 0.85.1
  • @playwright/test 1.43.1
  • @tailwindcss/forms ^0.5.3
  • @tailwindcss/line-clamp 0.4.4
  • @types/lodash 4.17.0
  • @types/react 18.2.79
  • @types/react-dom 18.2.25
  • @types/react-modal 3.16.3
  • @types/tailwindcss 3.1.0
  • classnames 2.5.1
  • cross-fetch 3.1.8
  • csv-parse ^5.4.0
  • gatsby 4.25.8
  • gatsby-alias-imports 1.0.6
  • gatsby-plugin-image 2.25.0
  • gatsby-plugin-page-creator ^4.24.1
  • gatsby-plugin-sharp 4.25.1
  • gatsby-plugin-typescript 4.25.0
  • gatsby-source-filesystem 4.25.0
  • gatsby-transformer-json 4.25.0
  • gatsby-transformer-remark 5.25.1
  • gatsby-transformer-sharp 4.25.0
  • husky 8.0.3
  • lodash 4.17.21
  • minimatch 5.1.6
  • playwright 1.43.1
  • pretty-quick 3.3.1
  • react 18.2.0
  • react-dom 18.2.0
  • react-globe.gl 2.27.2
  • react-markdown 8.0.7
  • react-modal 3.16.1
  • react-multi-carousel 2.8.5
  • react-router-dom 6.22.3
  • react-select ^5.5.4
  • react-table 7.8.0
  • sharp 0.33.3
  • slugify 1.6.6
  • tailwindcss 3.4.3
  • typescript 4.9.5
  • @babel/core ^7.19.3
  • @babel/plugin-transform-react-jsx 7.21.0
  • @codesee/babel-plugin-instrument 0.587.0
  • @codesee/tracker 0.587.0
  • @storybook/addon-a11y ^6.5.12
  • @storybook/addon-actions ^6.5.12
  • @storybook/addon-essentials ^6.5.12
  • @storybook/addon-interactions ^6.5.12
  • @storybook/addon-links ^6.5.12
  • @storybook/builder-webpack5 ^6.5.12
  • @storybook/manager-webpack5 ^6.5.12
  • @storybook/react ^6.5.12
  • @storybook/testing-library ^0.2.0
  • @tailwindcss/typography 0.5.12
  • @testing-library/jest-dom 5.17.0
  • @testing-library/react 14.3.1
  • @testing-library/user-event ^14.4.3
  • autoprefixer 10.4.19
  • babel-jest 29.7.0
  • babel-loader ^9.0.0
  • babel-preset-gatsby 2.25.0
  • gatsby-plugin-postcss ^5.24.0
  • identity-obj-proxy 3.0.0
  • jest 29.7.0
  • jest-environment-jsdom 29.7.0
  • jest-extended 3.2.4
  • postcss 8.4.38
  • prettier 2.8.8
  • prettier-plugin-organize-imports 3.2.4
  • ts-jest 29.1.2
  • ts-node ^10.9.1
  • node >=16.0.0
  • yarn >= 1.22
nvm
.nvmrc
  • node 18

  • Check this box to trigger a request for Renovate to run again on this repository

Switch to TypeScript

@jtfairbank has never used TypeScript before. Pretty sure I can figure it out since I understand JS well even if I'm a bit rusty to the ecosystem at the moment. But I didn't want to set it up for a new project so I've bootstrapped this one in JS for the time being.

Ideally everything looks pretty similar to the shipment tracker

Create SideCardStack Component and Contentful Model

Previous work: SideCardStack section added to Section.tsx switch statement.

  • No functional code created yet for this feature.

Starting Point:
Recording: https://app.codesee.io/shared/99dc9ec0-3804-11ec-b5c4-e93c0b8edf5c

Map with Tour: https://app.codesee.io/maps/public/fe74c460-3805-11ec-8cad-e75806fe4532

https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page

Goal:

  • Add component to display multiple page-wide horizontal cards, alternating the side that the image in the card is displayed on in the stack.
  • Add Contentful model to provide needed data for the component.

Fix issue with duplicate graphql instances

Currently the build is failing at the "Generate types" step.
I'm also getting an issue at the same step when I run yarn dev locally so I'd guess it's the same problem:

  ✔ Parse configuration
  ❯ Generate outputs
    ❯ Generate ./src/types/gatsby-graphql-types.gen.ts
      ✖ Load GraphQL schemas
        → Failed to load schema
        Load GraphQL documents
        Generate


 Found 1 error

  ✖ ./src/types/gatsby-graphql-types.gen.ts
    Failed to load schema from http://localhost:8000/___graphql:

            Cannot use GraphQLObjectType "File" from another module or realm.

    Ensure that there is only one instance of "graphql" in the node_modules
    directory. If different versions of "graphql" are the dependencies of other
    relied on modules, use "resolutions" to ensure only one version is installed.

    https://yarnpkg.com/en/docs/selective-version-resolutions

    Duplicate "graphql" modules cannot be used at the same time since different
    versions may have different capabilities and behavior. The data from one
    version used in the function from another could produce confusing and
    spurious results.
            Error: Cannot use GraphQLObjectType "File" from another module or realm.

I did an npm list graphql and there are indeed two different versions...
Output:

├─┬ @graphql-codegen/[email protected]
│ ├─┬ @graphql-tools/[email protected]
│ │ └─┬ @graphql-tools/[email protected]
│ │   └── [email protected]  extraneous
│ ├─┬ @graphql-tools/[email protected]
│ │ └─┬ @graphql-tools/merge@6 2.14
│ │   └─┬ @graphql-tools/[email protected]
│ │     └── [email protected]  extraneous
│ └─┬ @graphql-tools/[email protected]
│   ├─┬ @graphql-tools/[email protected]
│   │ └── [email protected]  extraneous
│   ├─┬ @graphql-tools/[email protected]
│   │ └── [email protected]  extraneous
│   ├─┬ [email protected]
│   │ └── [email protected]  extraneous
│   └─┬ [email protected]
│     └── [email protected]  extraneous
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ └── [email protected]
└── [email protected]

Not sure how to resolve this other than trying to update some of the dependencies that are using the older graphql version maybe? I tried to downgrade version 15.7.2 to 15.5.0 but that didn't fix it (also, probably not great to downgrade stuff... better to upgrade stuff!).

Feat: Load Team Data Models into Gatsby

The Team & Role data models are available on Forestry! We need to load them into Gatsby, and then consume that data to generate team pages.

  • Create issue for team pages UI dev

This will be very similar to loading the shipping data models into Gatsby: #358

Draft design for regions page

Currently, we have a card-based design for the regions page, which we'd like to bring home and/or improve.

Things we'd love to add:

  • Icons for services rendered in those regions, such as:
    • Import
    • Export
    • Shipping
      • Pallet shipping
      • Trucks
      • Containers
    • Needs assessments
  • Impact overview
    • Number of people
    • Needs met

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.