Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
37fd2cf
register custom widget for variable type resources
interim17 Feb 19, 2026
5e1c540
use resourceDetails in nested fields on resource markdown
interim17 Feb 19, 2026
75fbc17
query new resources collection
interim17 Feb 19, 2026
9f43b2b
Update src/cms/widgets/VariableResourceWidget/copyResourceNameHandler.ts
interim17 Feb 20, 2026
a345633
Update static/admin/config.yml
interim17 Feb 20, 2026
478c946
reference resourceDetails in relational widget
interim17 Feb 20, 2026
e0fd5b2
Merge branch 'main' of https://github.com/AllenCell/idea-board into f…
interim17 Feb 23, 2026
cc336ee
remove redundant fields from config
interim17 Feb 23, 2026
6653ea5
fix typo
interim17 Feb 23, 2026
eb6b692
run format
interim17 Feb 23, 2026
3e89540
Merge branch 'run-format' of https://github.com/AllenCell/idea-board …
interim17 Feb 23, 2026
211c55a
update comment
interim17 Feb 23, 2026
ee27bd4
Merge branch 'feature/resource' of https://github.com/AllenCell/idea-…
interim17 Feb 24, 2026
00d073e
add resources to schema
interim17 Feb 24, 2026
2bdcb98
add pages for resources
interim17 Feb 24, 2026
879d577
format resource template
interim17 Feb 24, 2026
1a50470
add ResourceDetailsField fragment
interim17 Feb 24, 2026
1e1ee25
build resource pages separately from MarkdownRemark
interim17 Feb 24, 2026
079639a
Merge branch 'main' of https://github.com/AllenCell/idea-board into f…
interim17 Feb 25, 2026
f9283a8
format and lint
interim17 Feb 25, 2026
be3ef5c
Merge branch 'feature/resource' of https://github.com/AllenCell/idea-…
interim17 Feb 25, 2026
971039c
import resources path
interim17 Feb 25, 2026
c12a1aa
add a resources index page and a second dev example tool
interim17 Feb 25, 2026
72038d2
make programs an array and next steps a markdown string
interim17 Mar 9, 2026
fc2b31f
Merge branch 'main' of https://github.com/AllenCell/idea-board into f…
interim17 Mar 9, 2026
f793be6
Merge branch 'fix/next-steps' of https://github.com/AllenCell/idea-bo…
interim17 Mar 9, 2026
89d19e2
fix duplicated fields in dev-example
interim17 Mar 9, 2026
a517a79
flatten resource details when building gatsby nodes
interim17 Mar 10, 2026
666a21a
fix typos
interim17 Mar 10, 2026
7369d06
migrate software and dataset markdown content to resources collection
interim17 Mar 11, 2026
d98830e
migrate cell lines to resource markdown
interim17 Mar 11, 2026
6104fb3
bucket resource types in resource index with compsed fragments
interim17 Mar 11, 2026
2e00e4c
use resources collection data in MaterialsAndMethods component
interim17 Mar 11, 2026
10bdf7a
remove materials and methods from markdown, schema and gatsby node api
interim17 Mar 11, 2026
a23a49f
remove data and utilities associated with old multi resourece collect…
interim17 Mar 11, 2026
2c3bf14
patch idea roll component to use resources
interim17 Mar 11, 2026
137179e
add reporter to resource resolver
interim17 Mar 11, 2026
0c37800
update tests to cover resourceQuery
interim17 Mar 11, 2026
8d88a8d
Update gatsby-node.js
interim17 Mar 11, 2026
8264972
remove tags fields from createPages calls
interim17 Mar 11, 2026
0d4765e
Merge branch 'feature/resource-query' of https://github.com/AllenCell…
interim17 Mar 11, 2026
2b14e68
Update gatsby/utils/gatsby-resolver-utils.js
interim17 Mar 11, 2026
2c25a81
Update gatsby/schema/base.gql
interim17 Mar 11, 2026
2127cba
update comments
interim17 Mar 11, 2026
8411c40
remove extra layout
interim17 Mar 11, 2026
8d3b7b9
Merge branch 'feature/resource-query' of https://github.com/AllenCell…
interim17 Mar 11, 2026
1ff999e
Merge branch 'feature/resource-query' of https://github.com/AllenCell…
interim17 Mar 11, 2026
fbe2502
fix authors schema typing
interim17 Mar 11, 2026
23a5c69
Merge branch 'main' of https://github.com/AllenCell/idea-board into f…
interim17 Mar 11, 2026
3febfd8
Merge branch 'feature/resource-query' of https://github.com/AllenCell…
interim17 Mar 11, 2026
5965024
add noopener to NameWithLink util
interim17 Mar 11, 2026
a097dae
Merge branch 'feature/resource-query' of https://github.com/AllenCell…
interim17 Mar 11, 2026
432db80
Merge branch 'migrate-resources-1' of https://github.com/AllenCell/id…
interim17 Mar 11, 2026
7b2f553
don't use constant in resolver tests
interim17 Mar 11, 2026
1c4aec8
Merge branch 'main' of https://github.com/AllenCell/idea-board into m…
interim17 Mar 19, 2026
5dfb1cd
Merge branch 'migrate-resources-1' of https://github.com/AllenCell/id…
interim17 Mar 19, 2026
0fdcd79
Update src/pages/resource/60x-timelapse-images-of-tagged-lines-after-…
interim17 Mar 19, 2026
09f471d
generalize render for resources
interim17 Mar 19, 2026
4973738
Merge branch 'main' of https://github.com/AllenCell/idea-board into m…
interim17 Mar 23, 2026
362361f
Merge branch 'main' of https://github.com/AllenCell/idea-board into m…
interim17 Mar 23, 2026
398b994
Merge branch 'migrate-resources-1' of https://github.com/AllenCell/id…
interim17 Mar 23, 2026
66d4b12
Merge branch 'main' of https://github.com/AllenCell/idea-board into m…
interim17 Mar 23, 2026
03142d5
convert hamiltonian dataset to resource collection
interim17 Mar 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 4 additions & 59 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ const { createFilePath } = require("gatsby-source-filesystem");
const {
stringWithDefault,
resolveToArray,
resolveSlug,
resolveSoftwareTools,
resourceQuery,
} = require("./gatsby/utils/gatsby-resolver-utils");
const {
DATASET_PATH,
RESOURCES_GATSBY_NODE_KEY,
MARKDOWN_REMARK_GATSBY_NODE_KEY,
TEMPLATE_KEY_TO_TYPE,
ALLENITE_TEMPLATE_KEY,
PROGRAM_TEMPLATE_KEY,
} = require("./gatsby/constants");

const read = (p) => fs.readFileSync(path.join(__dirname, p), "utf8");
Expand All @@ -25,33 +24,12 @@ const read = (p) => fs.readFileSync(path.join(__dirname, p), "utf8");
* and are referenced by other markdown files.
*/

// TODO: use constants here when this gets revised when we migrate old resources
// to new collection
const DATA_ONLY_PAGES = ["software", "dataset", "allenite", "program"];
const DATA_ONLY_PAGES = [ALLENITE_TEMPLATE_KEY, PROGRAM_TEMPLATE_KEY];

exports.createSchemaCustomization = ({ actions }) => {
const { createTypes } = actions;
const typeDefs = [
`"""
Nested materials and methods block for idea posts.
"""
type MaterialsAndMethods {
dataset: MarkdownRemark @link(by: "fields.slug")
protocols: [ProtocolItem!]!
cellLines: [CellLineItem!]!
software: [SoftwareTool!]!
}

type ProtocolItem {
protocol: String!
}

type CellLineItem {
name: String!
link: String
}

type PreliminaryFindings {
`type PreliminaryFindings {
summary: String!
figures: [ImgWithCaption!]!
}
Expand All @@ -63,13 +41,6 @@ exports.createSchemaCustomization = ({ actions }) => {
caption: String
}

"""
Software tool reference with optional custom description.
"""
type SoftwareTool {
softwareTool: MarkdownRemark @link(by: "fields.slug")
customDescription: String
}
`,
];
createTypes(read("gatsby/schema/base.gql"));
Expand Down Expand Up @@ -122,32 +93,6 @@ exports.createResolvers = ({ reporter, createResolvers }) => {
return results.filter(Boolean);
},
},
materialsAndMethods: {
resolve: (source) => {
const raw = source.materialsAndMethods;
const current = {
dataset: null,
cellLines: [],
protocols: [],
software: [],
};

if (!raw || typeof raw !== "object") {
return current;
}

const resolvedDatasetSlug = resolveSlug(
raw.dataset,
DATASET_PATH,
);
current.dataset = resolvedDatasetSlug;
current.cellLines = resolveToArray(raw.cellLines);
current.protocols = resolveToArray(raw.protocols);
current.software = resolveSoftwareTools(raw.software);

return current;
},
},
nextSteps: {
resolve: (source) => source.nextSteps ?? null,
},
Expand Down
9 changes: 4 additions & 5 deletions gatsby/constants.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const DATASET_PATH = `dataset`;
const SOFTWARE_PATH = `software`;

const ALLENITE_TEMPLATE_KEY = `allenite`;
const PROGRAM_TEMPLATE_KEY = `program`;
const RESOURCES_TEMPLATE_KEY = `resource`;

const RESOURCES_GATSBY_NODE_KEY = `Resource`;
Expand All @@ -17,8 +16,8 @@ const TEMPLATE_KEY_TO_TYPE = {
[RESOURCES_TEMPLATE_KEY]: RESOURCES_GATSBY_NODE_KEY,
};
module.exports = {
DATASET_PATH,
SOFTWARE_PATH,
ALLENITE_TEMPLATE_KEY,
PROGRAM_TEMPLATE_KEY,
RESOURCES_TEMPLATE_KEY,
MARKDOWN_REMARK_GATSBY_NODE_KEY,
TEMPLATE_KEY_TO_TYPE,
Expand Down
1 change: 0 additions & 1 deletion gatsby/schema/base.gql
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ type Frontmatter {
description: String
draft: Boolean
tags: [String!]
materialsAndMethods: MaterialsAndMethods!
authors: [String!]!
nextSteps: String
program: [String!]
Expand Down
30 changes: 0 additions & 30 deletions gatsby/utils/gatsby-resolver-utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const {
SOFTWARE_PATH,
RESOURCES_TEMPLATE_KEY,
TEMPLATE_KEY_TO_TYPE,
} = require("../constants");
Expand Down Expand Up @@ -30,34 +29,6 @@ function resolveToArray(value) {
return [];
}

/**
* Prepares software tool references for Gatsby's @link directive.
* Transforms tool names into slug paths that @link(by: "fields.slug") uses
* to resolve the actual MarkdownRemark nodes. Filters out invalid entries
* and preserves custom descriptions.
* @param {Array<{softwareTool?: string, customDescription?: string}>|unknown} rawSoftware - Array of software tool objects from frontmatter
* @returns {Array<{softwareTool: string|null, customDescription: string|null}>} Array with slug keys for @link resolution
*/
const resolveSoftwareTools = (rawSoftware) => {
if (!Array.isArray(rawSoftware)) {
return [];
}
return rawSoftware
.map((item) => {
if (item && typeof item === "object" && item.softwareTool) {
return {
softwareTool: resolveSlug(item.softwareTool, SOFTWARE_PATH),
customDescription: stringWithDefault(
item.customDescription,
null,
),
};
}
return null;
})
.filter((item) => item !== null);
};

/**
* Builds slugs from directory paths and ids/names.
* Uses slugs in place of names to prevent namespace
Expand Down Expand Up @@ -94,6 +65,5 @@ module.exports = {
stringWithDefault,
resolveToArray,
resolveSlug,
resolveSoftwareTools,
resourceQuery,
};
39 changes: 27 additions & 12 deletions src/components/IdeaRoll.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,37 @@
import React from "react";



import { Link, graphql, useStaticQuery } from "gatsby";



import { MessageOutlined, StarOutlined } from "@ant-design/icons";
import { useLocation } from "@reach/router";
import { Avatar, List, Space } from "antd";

import { MaterialsAndMethods } from "../types";


import { ResourceNode } from "../types";
import { IconText } from "./IconText";
import { TagPopover } from "./TagPopover";

















const { container } = require("../style/idea-roll.module.css");

interface PostNode {
Expand All @@ -28,7 +50,7 @@ interface PostNode {
authors?: string[];
tags?: string[];
type: string;
materialsAndMethods?: MaterialsAndMethods;
resources: ResourceNode[];
};
};
}
Expand All @@ -51,7 +73,7 @@ const IdeaRollTemplate = (props: {
authors: post.frontmatter.authors || [],
concerns: post.frontmatter.concerns || "",
dataset: {
...post.frontmatter.materialsAndMethods?.dataset?.frontmatter,
...post.frontmatter.resources.find((r) => r.type === "dataset"),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This file has an outdated approach to typing and querying, but it's not essential to do more than patch in this PR.

},
Comment on lines 75 to 77
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

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

resources.find((r) => r.type === "dataset") hard-codes the resource type string. Since the codebase already defines RESOURCE_TYPES.DATASET, using the constant here will prevent drift if the underlying type values ever change.

Copilot uses AI. Check for mistakes.
}));
if (props.count) {
Expand Down Expand Up @@ -174,15 +196,8 @@ export default function IdeaRoll({
type
authors
concerns
materialsAndMethods {
dataset {
frontmatter {
name
description
link
status
}
}
resources {
...ResourceFields
}
}
}
Expand Down
Loading
Loading