Skip to content

make new resource markdown (resource migration 2/3)#73

Open
interim17 wants to merge 48 commits intomainfrom
migrate-resources-1
Open

make new resource markdown (resource migration 2/3)#73
interim17 wants to merge 48 commits intomainfrom
migrate-resources-1

Conversation

@interim17
Copy link
Contributor

@interim17 interim17 commented Mar 11, 2026

Problem

Advances #40

Due to largeness, I split this PR:
#72

I'm requesting the same reviewers and I see these as a single feature that should be merged together.

We are migrating from multiple resource type collections, to a single resource collection.

Solution

This PR:

  • takes old resources scattered around markdown and makes new versions in /resource
  • uses new graphql fragments to query bucketed resources in resource/index.tsx
  • bit of code cleanup, using constants when referring to the templateKeys in non-gatsby TS code (can't use TS/JS constants inside the graphql, even in react files

interim17 and others added 30 commits February 19, 2026 14:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@interim17 interim17 changed the title Migrate resources 1 make new resource markdown (resource migration 2/3) Mar 11, 2026
@interim17 interim17 requested a review from Copilot March 11, 2026 18:50
@interim17 interim17 marked this pull request as ready for review March 11, 2026 18:50
@interim17 interim17 requested review from rugeli and removed request for ShrimpCryptid March 11, 2026 18:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is part of the ongoing migration to a single unified Resource collection by introducing new /resource markdown entries and updating the /resource index page to query and display resources bucketed by type.

Changes:

  • Added multiple new resource markdown files under src/pages/resource/ (software tools, datasets, cell lines).
  • Updated src/pages/resource/index.tsx to query allResource by type buckets using new GraphQL fragments.
  • Added resource-type constants and expanded GraphQL fragments/schema to support protocol file resources (file field).

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/pages/resource/index.tsx Buckets resources by type and renders grouped lists (Software/Datasets/Cell Lines/Protocols).
src/graphql/fragments.ts Splits Resource fragments by resource type and adds a composite ResourceFields fragment.
src/constants/resourceTypes.ts Introduces shared string constants for resource types.
src/cms/widgets/VariableResourceWidget/constants.ts Switches widget type values to use RESOURCE_TYPES constants.
gatsby/schema/base.gql Adds file: String to the Resource GraphQL type.
src/pages/resource/*.md Adds new unified resource-template markdown entries.
src/pages/ideas/*.md Updates idea posts to reference the new resources via frontmatter.resources.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Base automatically changed from feature/resource-query to main March 19, 2026 15:38
@netlify
Copy link

netlify bot commented Mar 19, 2026

Deploy Preview for project-idea-board ready!

Name Link
🔨 Latest commit 09f471d
🔍 Latest deploy log https://app.netlify.com/projects/project-idea-board/deploys/69bc85ff21eb530008ee74f5
😎 Deploy Preview https://deploy-preview-73--project-idea-board.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

)}
</li>
))}
{protocolFileResources?.nodes.map((node) => (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think a way to make this cleaner is to have an object that has the keys and the titles for each resource type that you then map over and call a single render function that creates the JSX since this is so much repeated code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will push that change, could also just delete this, I'm really not married to this long term

...DatasetResourceFields
}
}
softwareResources: allResource(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

similar to my comment above can you make these keys instead of strings

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need to be static like this due to graphql limitations, the other option here would be to query all fields en masse and the filter in the javascript, but I thought this was more fun and I was learning about fragments.

interim17 and others added 2 commits March 19, 2026 14:03
…emt-sandwich-dataset.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@interim17 interim17 requested a review from meganrm March 20, 2026 00:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants