Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Gatsby 4 and fix images paths that broke builds #3021

Merged
merged 13 commits into from
Dec 2, 2021

Conversation

rogermparent
Copy link
Contributor

@rogermparent rogermparent commented Nov 15, 2021

I decided to use Gatsby 3 in #2447 since Gatsby 4 was still in beta, most plugins hadn't updated to match it, and it seemed to be a bit less stable in Heroku builds.

Since then, Gatsby 4 has left beta and most plugins have updated to work with it. Also, Gatsby Cloud's image processing has integrations specific to 4, so this PR will be used to test on Gatsby Cloud.

Also, it seems one of the upgrades since then has made it to that builds fail when an image path isn't found- this is a good thing, since we had a few images that were completely broken and just unnoticed, and some "phantom" images that worked when they shouldn't have.

This PR also updates the typescript and eslint packages, which was required because react-use uses named tuples, a feature introduced in newer TypeScript versions, and eslint needed to be upgraded alongside TypeScript.
I also upgraded stylelint, which then discovered a whole ton of CSS problems that we had before, including obvious stuff like duplicated keys. The results of stylelint --fix ended up being the bulk of the PR's diff.

@shcheklein shcheklein temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 15, 2021 18:55 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 15, 2021 19:29 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 15, 2021 19:45 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 15, 2021 19:53 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 15, 2021 20:15 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 15, 2021 21:19 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 25, 2021 03:30 Inactive
@rogermparent rogermparent marked this pull request as ready for review November 25, 2021 04:16
Copy link
Contributor

@julieg18 julieg18 left a comment

Choose a reason for hiding this comment

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

Looks great!

I noticed that the cards in the Doc's home page is styled differently:

image

I have no idea why though 🤔

@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 29, 2021 18:47 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 29, 2021 18:57 Inactive
@rogermparent
Copy link
Contributor Author

@julieg18 Great catch on the card collapsing! I'm not sure why that would have changed, I know the major upgrade on github-markdown-css caused some issues, but I don't see how it would cause this completely custom flex setup to start breaking down.

I just fixed it by using slightly more proper margin-based spacing, though I had to apply it vertically to cardWrappers and horizontally to cards, it wouldn't work otherwise.

@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c November 29, 2021 19:13 Inactive
@rogermparent
Copy link
Contributor Author

Not sure why Restyled is trying to change this, running format-all locally doesn't apply any changes, and the changes restyled is asking for cause lint-ts to break.

@julieg18
Copy link
Contributor

Not sure why Restyled is trying to change this, running format-all locally doesn't apply any changes, and the changes restyled is asking for cause lint-ts to break.

I think I had the same issue when I tried to edit that particular file that Restyled is trying to restyle. I think it had something to do with the kind of environment that Restyled is using to run code.

@rogermparent rogermparent requested a review from julieg18 December 1, 2021 18:55
@rogermparent
Copy link
Contributor Author

I took a check around all the top-level pages and usages of the cards custom component, I haven't caught anything obvious. Willing to give this time for another once-over to be extra sure, but I think we're ready to send this in (and probably deal with some link check errors 😭)

Copy link
Contributor

@julieg18 julieg18 left a comment

Choose a reason for hiding this comment

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

Looks good!

@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c December 2, 2021 17:06 Inactive
@rogermparent rogermparent temporarily deployed to dvc-org-gatsby-4-upgrad-7qem6c December 2, 2021 18:49 Inactive
@rogermparent rogermparent merged commit ef97b1b into master Dec 2, 2021
@rogermparent rogermparent deleted the gatsby-4-upgrade branch December 2, 2021 19:06
iesahin pushed a commit that referenced this pull request Apr 11, 2022
* Upgrade packages to Gatsby 4 and fix images paths that broke builds

* Update eslint and migrate from old rules

* Update stylelint and fix resulting problems

* Convert trends-chart color profile

* Use light version of github stylesheet

* Upgrade packages and configure SVGR/SVGO with external file

Recommended by plugin author

* Fix docs index cards styles to properly collapse

* stylelint --fix

* eslint --fix

* Upgrade gatsby packages
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.

3 participants