Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Load Media Asset Data Model into Gatsby #571

Open
4 tasks
wwwwwlwwwww opened this issue Sep 1, 2022 · 2 comments · May be fixed by #995
Open
4 tasks

Feat: Load Media Asset Data Model into Gatsby #571

wwwwwlwwwww opened this issue Sep 1, 2022 · 2 comments · May be fixed by #995
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@wwwwwlwwwww
Copy link
Collaborator

wwwwwlwwwww commented Sep 1, 2022

The Media Asset data model is available on Forestry! We need to load it into Gatsby, and then we can consume that data to populate various website pages with images.

This will be very similar to loading the team member/role data models into Gatsby in #536. Also look at how images are linked to region and subregion data models in /gatsby/create-resolvers.js

CodeSee map of relevant files: https://app.codesee.io/maps/public/f72b1f30-3087-11ed-aabd-d3a27bef36f2

Fields:

  • image - A string describing a relative file path to the image.
  • caption - string
  • attribution - string
  • dateUploaded - date
  • date - date
  • altText - string
  • tags - array of strings? not entirely sure, might need to do some console logging here to see what it is

Checklist

  • Sign /CONTRIBUTORS.md if new contributor
  • Add the Media Asset data model in /gatsby/transform-nodes.js
  • Link the Media Asset to the actual image (or pdf) in /gatsby/create-resolvers.js
  • Test it by using the GraphQL explorer to run a graphql query to select all DAMediaAsset data and seeing the data show up
@jtfairbank jtfairbank added the triage An issue needs further analysis by a team member label Sep 6, 2022
@jtfairbank jtfairbank added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed and removed triage An issue needs further analysis by a team member labels Sep 9, 2022
@jtfairbank
Copy link
Contributor

Note: @wwwwwlwwwww will be adding media asset data to forestry (our CMS) on Monday September 12th. So you won't be able to pull data thru gatsby / in the graphql explorer until then, although you can certainly start making code changes beforehand!

@wwwwwlwwwww
Copy link
Collaborator Author

@jtfairbank and everyone else - I've added four media asset files to Forestry as promised, 3 bitmap images and 1 PDF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants