Skip to content

add DOI to ideas - #140

Merged
interim17 merged 2 commits into
mainfrom
doi
Sep 21, 2026
Merged

interim17 merged 2 commits into
mainfrom
doi

Conversation

@interim17

Copy link
Copy Markdown
Contributor

Problem

This closes #134 and also does a little styling adjustment at the top of idea pages, which are getting a bit cluttered.

Author and date are bumped up below the title.
Screenshot 2026-09-17 at 6 10 29 PM

@netlify

netlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for project-idea-board ready!

Name Link
🔨 Latest commit 103b916
🔍 Latest deploy log https://app.netlify.com/projects/project-idea-board/deploys/6aac8ff5a5eacb0008a8dece
😎 Deploy Preview https://deploy-preview-140--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.

@interim17
interim17 requested review from meganrm and a lite review from Copilot and removed request for Copilot September 18, 2026 01:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Long valid DOI values can cause horizontal overflow on narrow layouts; the DOI metadata needs wrapping support.

Pull request overview

Adds optional DOI support for ideas and refreshes idea-page metadata styling.

Changes:

  • Adds CMS validation, sample content, and Gatsby schema/resolver support.
  • Renders clickable DOI links with an updated author/date byline.
  • Adds resolver coverage and revises metadata styling.
File summaries
File Reviewed changes Findings
static/admin/config.yml Adds optional DOI field and validation. None
src/templates/idea-post.tsx Renders DOI and updates the byline/metadata. Moderate: long DOI values may cause mobile horizontal overflow; add wrapping. (1 vote)
src/style/idea-post.module.css Styles the revised header and metadata layout. Moderate: allow long DOI metadata to shrink and wrap on mobile. (1 vote)
src/pages/ideas/dev-example.md Adds sample DOI content. None
gatsby/schema/base.gql Defines the DOI field. None
gatsby/resolvers/test/resolvers.test.js Tests DOI resolution. None
gatsby/resolvers/resolvers.js Resolves DOI values. None
Review details

Suppressed comments (2)

src/style/idea-post.module.css:84

  • Because the DOI field accepts an arbitrary non-whitespace suffix and this layout keeps each metadata item as an inline-flex item, a long valid DOI can make .metaGroup wider than the viewport in the mobile layout and cause horizontal scrolling. The metadata link does not inherit the overflow-wrap used for links in the body; allow the group/value to shrink and wrap here.
.metaGroup {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding-right: 16px;
    margin-right: 16px;
    border-right: 1px solid var(--border-color);
    line-height: 1.4;

src/templates/idea-post.tsx:139

  • This link is rendered in the metadata strip, outside the .container rule that enables overflow-wrap, while the CMS pattern permits an arbitrarily long non-whitespace DOI suffix. On narrow screens a valid long DOI can therefore force horizontal overflow instead of wrapping. Add overflow-wrap: anywhere (or equivalent) to this DOI value/link via the stylesheet.
                                    href={`https://doi.org/${doi}`}
                                    target="_blank"
                                    rel="noreferrer"
                                >
                                    {doi}
  • Files reviewed: 7/7 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@meganrm

meganrm commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

in the long run, it would be nicer to have this be a true/false, and then use the zenodo API to publish (if that's possible). it's something to look into, but not a high priority at the moment https://developers.zenodo.org/?javascript#quickstart-upload

@interim17 interim17 mentioned this pull request Sep 21, 2026
@interim17
interim17 merged commit 7ab6282 into main Sep 21, 2026
10 checks passed
@interim17
interim17 deleted the doi branch September 21, 2026 17:06
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.

add doi field

3 participants