Skip to content

Update dependencies for site#129

Merged
jil-stripe merged 5 commits into
mainfrom
jil/update-dependencies-with-styled-jsx-fix
Feb 11, 2026
Merged

Update dependencies for site#129
jil-stripe merged 5 commits into
mainfrom
jil/update-dependencies-with-styled-jsx-fix

Conversation

@jil-stripe

Copy link
Copy Markdown
Contributor

This PR makes a few changes to ensure the site's dependencies can be cleanly upgraded and the site can be developed locally.

799ead4 changes the way we import codemirror. Running npm run dev would result in an SSR error (document is not defined), indicating that codemirror was trying to access DOM elements upon import, which is not allowed in recent Next.JS versions. This changes the import to be dynamic within a useeffect so that the import code only runs client-side.

04b5821 updates our dependencies. I tried to get us as up-to-date as possible, but I didn't want to cross a major version boundary of Next.js to avoid the logic changes that might come about. I also resolved a peer dependency conflict between react-codemirror2 and codemirror that would cause npm install to fail.

During development, I noticed a weird bug with codemirror but confirmed that this bug doesn't show up in release builds. I added a comment in dbf5450 to warn others in the future so they don't go down a rabbit hole trying to solve it.

Finally, in 499c0ca, I fixed some global CSS styles that were not being applied properly. I assume that the Next.js update stopped supporting styled-jsx's global attribute; all those styles were broken. I moved those styles to global.css where they are now properly applied. While I was there, I also changed some of the border colors for the top nav and footer to be more subdued in dark mode.

@vercel

vercel Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
markdoc Ready Ready Preview, Comment Feb 11, 2026 4:25pm
markdoc-simple-nextjs Ready Ready Preview, Comment Feb 11, 2026 4:25pm

Request Review

@cla-assistant

cla-assistant Bot commented Feb 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Feb 4, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@jil-stripe

jil-stripe commented Feb 4, 2026

Copy link
Copy Markdown
Contributor Author

Still to do:

  • Revert search version upgrade; this seems to have broken the search functionality and search button styling
  • Understand why font CDN base URL environment variable is not present in the Vercel preview

@jil-stripe

Copy link
Copy Markdown
Contributor Author

Understand why font CDN base URL environment variable is not present in the Vercel preview

Environment variables only apply to the production environment. In the Vercel dashboard, I've applied the Algolia and font CDN environment variables to preproduction environments, as well.

The fonts still don't work because the Stripe CDN has a restrictive set of allowed hostnames, but the generated site output points to the correct domain and will work when deployed to markdoc.dev.

GIT_VALID_PII_OVERRIDE
New versions of Next.js aren't working with <styled jsx global> well.
Instead of debugging, this commit moves those global styles to our
global.css file.

Also changes around some border colors in dark mode to reduce their
prominence.

Tested by poking around in dev mode and release mode.

@joelzwarrington joelzwarrington left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Image

Clicked around the preview and didn't notice any issues.

I did notice a flash when clicking on search results but I found this in production as well.

Image

@joelzwarrington

Copy link
Copy Markdown

gah, the gif isn't high frame-rate enough to show the issue! 😭

@jil-stripe
jil-stripe merged commit eca22f0 into main Feb 11, 2026
6 checks passed
@jil-stripe
jil-stripe deleted the jil/update-dependencies-with-styled-jsx-fix branch February 11, 2026 18:39
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.

2 participants