distributeaid / distributeaid.org Goto Github PK
View Code? Open in Web Editor NEWDistribute Aid's landing site!
Home Page: https://distributeaid.org
License: GNU Affero General Public License v3.0
Distribute Aid's landing site!
Home Page: https://distributeaid.org
License: GNU Affero General Public License v3.0
Let's match the favicon from the current website: https://distributeaid.org
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!).
Big fan of how OpenSauced first has a form for a type of issue, followed by a form for the issue itself.
I'm especially a big fan of having the Code of Conduct be a required field to check, which is something we could have for ours.
On this line, we're adding to the page the calculation of a series of shipments' values, as a totals
object.
It would be good to extract a module that accepts these shipments and returns that values object.
This would allow a consistent way of calculating shipment totals across the codebase.
Previous work done in #26, #65 as a way to resolve #24, see CodeSee recording for latest state:
https://app.codesee.io/shared/c92ab390-3289-11ec-81ae-67b50d769a2b
Previous work: MissionBanner section added to Section.tsx switch statement.
Starting Point: https://app.codesee.io/data-flow/0e490f50-11b3-11ec-88f8-bb5d3013d81c
Goal:
We need to make it easier to contribute to DA's landing site! We can do this securely by committing a read-only Contentful access token to the repo.
Perhaps using Algolia
Goals:
Let's use the media query to replace this with the previously used 2D static graphic.
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.
Previous work:
Show the logo as content from Contentful.
Starting point:
https://app.codesee.io/shared/99dc9ec0-3804-11ec-b5c4-e93c0b8edf5c
Goal:
We want to try and match the style of the proposed design:
https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page?node-id=208%3A601
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.
Be sure to remove unnecessary entries from Contentful, but save the content if it's usable.
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.
Right now, the images are side-by-side in mobile with the title.
Would be good to have them above or below the title, with one image shown at a time, but should still rotate through them.
Haven't had time to setup testing yet- making sure this combo of tools works well for the team first. Anyone can pick this up in the meantime!
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.
This will be very similar to loading the shipping data models into Gatsby: #358
Right now, our individual subregion page is largely unstyled.
These can be styled using TailwindCSS.
Get started with our codebase's region functionality by clicking on this CodeSee Map:
Previous work: ShipmentBanner section added to Section.tsx switch statement.
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:
https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page
Previous work: add content to the regions listing (index page) and to each region page (templates).
Starting Point: https://app.codesee.io/shared/eda14600-0681-11ec-bcdf-b35d3087a4b1
Goal:
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?)
2. Hardcode an index page with displays a card for each region page.
3. Create region pages in Forestry using the needs assessment regional context (Google Drive).
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@nivo/bar
, @nivo/core
, @nivo/sunburst
)@playwright/test
, playwright
)@types/react
, @types/react-dom
, react
, react-dom
)@testing-library/jest-dom
, @testing-library/react
)These updates await pending status checks before automerging. Click on a checkbox to abort the branch automerge, and create a PR instead.
@babel/core
, @babel/plugin-transform-react-jsx
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
babel-preset-gatsby
, gatsby
, gatsby-plugin-image
, gatsby-plugin-page-creator
, gatsby-plugin-postcss
, gatsby-plugin-sharp
, gatsby-plugin-typescript
, gatsby-source-filesystem
, gatsby-transformer-json
, gatsby-transformer-remark
, gatsby-transformer-sharp
)@storybook/addon-a11y
, @storybook/addon-actions
, @storybook/addon-essentials
, @storybook/addon-interactions
, @storybook/addon-links
, @storybook/builder-webpack5
, @storybook/react
).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
.node-version
node 18.20.2
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
.nvmrc
node 18
Right now, our individual region page is largely unstyled.
This can be styled using TailwindCSS.
Get started with our codebase's region functionality by clicking on this CodeSee Map:
Previous work: SideCardStack section added to Section.tsx switch statement.
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:
They were added without acquiring permission by the original author (Figma?) first.
Please add arrows to point to where the shipment is starting and ending.
This is the library that we're using to create the globe: https://www.npmjs.com/package/react-globe.gl
Here is a CodeSee Map showing relevant files: https://app.codesee.io/maps/public/78877930-2e02-11ed-aabd-d3a27bef36f2
Same as #1 . Want to keep things in sync with the shipment tracker, don't know code formatting conventions for TypeScript.
Previous work: ImageCarousel section added to Section.tsx switch statement. React component created.
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:
Previous work: add content to the regions listing (index page) and to each region page (templates).
Starting Point: https://app.codesee.io/shared/eda14600-0681-11ec-bcdf-b35d3087a4b1
Goals:
# of shipments
, commercial value
, weight
, distance
, C02
.CodeSee Recording:
https://app.codesee.io/shared/4bb1a720-5912-11ec-92c1-f7ca5b5ec43b
Can startoff with a static image, then implement the Image Carousel to show a variety of shipment / destination related images. Related to #32
Figma link for reference:
https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page?node-id=208%3A600
Haven't used it before, so this is up for grabs if you have! Would like to keep css separate from JS tho.
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
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 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 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:
I've seen projects have a "Open with Gitpod" button, such as OpenSauced
Let's integrate this!
Related to #32
CodeSee Recording:
https://app.codesee.io/shared/4bb1a720-5912-11ec-92c1-f7ca5b5ec43b
See the Figma design for reference:
https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page?node-id=208%3A600
Previous work: NumbersSummary section added to Section.tsx switch statement.
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:
In order to catch these, recommend running Lighthouse on the page, and seeing which images are missing alt text.
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:
@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.
src/components/content/PageBanner.tsx
to src/components/section/
. Make sure the imports to / from the file aren't broken!SectionPageBanner.tsx
. Make sure to update the components name within the file!/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
Built & hosted by Netlify.
CodeSee recording:
https://app.codesee.io/shared/4bb1a720-5912-11ec-92c1-f7ca5b5ec43b
Figma design for reference:
https://www.figma.com/file/Ey8xRnstZS4UYmqQwyYZdC/Landing-Page?node-id=208%3A601
NOTE: SocialIconContainer has the icons imported
@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
CodeSee Recording:
https://app.codesee.io/shared/4bb1a720-5912-11ec-92c1-f7ca5b5ec43b
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.
Would be great if we could have a link in the footer (just under the hello@ email) to take people to it.
Content:
Update link to code of ethics
For the first iteration it's OK to link to PDF files.
Could get tricky, since the code depends on these models.
Example of the issue here.
Right now, the sections are side-by-side in mobile.
Would be good to have them above or below each other.
It doesn't really make sense to show the "Donate" button on the donation page because it will just link to the current page. So we can hide it.
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.
CodeSee Recording:
https://app.codesee.io/shared/4bb1a720-5912-11ec-92c1-f7ca5b5ec43b
There are 5 sections:
Please feel free to work on all of them at once or break them up into multiple PRs.
/about
(replace the /who-we-are
route)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."
}
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.