Open
Conversation
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.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
|
1 similar comment
|
|
Author
|
Still to do:
|
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.
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 devwould 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-codemirror2andcodemirrorthat would causenpm installto 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
globalattribute; all those styles were broken. I moved those styles toglobal.csswhere 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.