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

Load Additional Region Data Model Fields into Gatsby #812

Open
6 of 7 tasks
wwwwwlwwwww opened this issue Oct 28, 2022 · 0 comments
Open
6 of 7 tasks

Load Additional Region Data Model Fields into Gatsby #812

wwwwwlwwwww opened this issue Oct 28, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest help wanted Extra attention is needed

Comments

@wwwwwlwwwww
Copy link
Collaborator

wwwwwlwwwww commented Oct 28, 2022

Description

The Region and Sub-Region data models on our CMS, Forestry, have some new fields designed to increase consistency and compatibility! We need to load them into Gatsby so we can consume that data to generate more finalized region pages. This is in the same vein as #358 and #508.

Please see this CodeSee Map of relevant files.

Note that option fields are indicated by a ? at at the end of the field name. This means that they may be undefined.

Region fields to add:

  • population? - object
    • count? - number
    • trend? - enumeration ("Increasing", "Decreasing", "Stable", "Unknown")
    • description? - markdown string
  • longText? - markdown string

Subregion fields to add:

  • governmentResponse? - markdown string

  • stayInformed - object

    • title - string
    • links - array of objects
      • label - string
      • url - string
      • description - string
  • longText? - markdown string

You'll also want to add those fields to the type in /src/components/regions/RegionComponentTypes.ts

Checklist

  • Add fields to Region gatsby transformer and typescript type.
  • Added fields to Subregion gatsby transformer & typescript type.
  • Add fields to the Region page's graphql query. Update the population counter on the Region page to show it's population count instead of summing the subregion population counts. You can likely remove the population portions from the subregion portion of the page's graphql query.
  • Add fields to the Subregion page's graphql query, and include the government overview and a LinkList component on the Subregion. See the Region page for an example implementation.
  • Move the region / subregion type definition file to /src/types/
  • Ensure E2E tests for the region & subregion pages work. Add tests verifying the new page content is properly included on the page if you feel it's necessary.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@wwwwwlwwwww wwwwwlwwwww added enhancement New feature or request triage An issue needs further analysis by a team member labels Oct 28, 2022
@jtfairbank jtfairbank added good first issue Good for newcomers help wanted Extra attention is needed hacktoberfest and removed triage An issue needs further analysis by a team member labels Oct 31, 2022
@jtfairbank jtfairbank self-assigned this Jan 8, 2023
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 hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants