query more of the text fields in markdown and make figure component#37
Open
query more of the text fields in markdown and make figure component#37
Conversation
❌ Deploy Preview for project-idea-board failed. Why did it fail? →
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the idea post template by querying and rendering additional markdown frontmatter fields that were previously not displayed, including authors, publication info, preliminary findings with figures, and next steps. A new Figure component was created to display images with captions.
Changes:
- Added type definitions for
PreliminaryFindingsandFigureto support the new data structures - Created a
FigureComponentto render images with captions in a styled card container - Updated the idea post template to display authors, publication, preliminary findings with figures, and next steps as a formatted list
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/types/index.ts | Added type exports for PreliminaryFindings and Figure |
| src/templates/idea-post.tsx | Integrated new fields into template, added Figure rendering, and updated GraphQL query |
| src/style/figure.module.css | Added styling for figure container and captions with responsive design |
| src/pages/ideas/dev-example.md | Reformatted markdown structure and updated example content |
| src/components/Figure.tsx | Created new component to render figures with GatsbyImage and captions |
| gatsby-node.js | Added schema definitions and resolvers for new frontmatter fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/types/index.ts
Outdated
| export type IdeasForTags = Queries.AllIdeasForTagsQuery["allMarkdownRemark"]["edges"]; | ||
|
|
||
| export type PreliminaryFindings = NonNullable<IdeaFrontmatter["preliminaryFindings"]>; | ||
| export type Figure = NonNullable<IdeaFrontmatter["preliminaryFindings"]>["figures"][number] No newline at end of file |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…eature/more-queries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Advances #7
Not a polished design, but it's easier to picture the final result if add better placeholders, and actually query and render the data. Then we can design around something more reasonable.