testing-library-docs icon indicating copy to clipboard operation
testing-library-docs copied to clipboard

chore: update to docusaurus v3

Open timdeschryver opened this issue 2 years ago • 18 comments

I wanted to see the impact of upgrading docusaurus, but everything seemed fined locally. This is a test to verify that our pipeline still works.

timdeschryver avatar Oct 26 '23 06:10 timdeschryver

Deploy Preview for testing-library failed.

Name Link
Latest commit 9a82b3bb18bd96af25ed12d93f8159f2586750d6
Latest deploy log https://app.netlify.com/sites/testing-library/deploys/6554885444e48700080a68a8

netlify[bot] avatar Oct 26 '23 06:10 netlify[bot]

Thanks Tim! AFAIR, the serious breaking change was upgrading to MDX v2, if our build passes I think we're good but maybe we can just verify it manually by running npx docusaurus-mdx-checker.

As far as I was able to see, there are also some visual changes, if you want I can have a look at those listed here: https://docusaurus.io/blog/preparing-your-site-for-docusaurus-v3

MatanBobi avatar Oct 26 '23 06:10 MatanBobi

You're right @MatanBobi I don't see any changes between our live version and this preview version.

timdeschryver avatar Oct 27 '23 14:10 timdeschryver

@timdeschryver i saw that they've released a new RC using MDX 3 today (or maybe that was yesterday?)

Are we waiting for the official release to merge this? I haven't had the time to review it yet so just wanted to know the urgency.

MatanBobi avatar Oct 27 '23 16:10 MatanBobi

It can wait @MatanBobi

timdeschryver avatar Oct 27 '23 16:10 timdeschryver

Thanks, I've updated to RC 1 (latest). Would it make sense to compare against the latest version of our template too?

nickserv avatar Oct 28 '23 20:10 nickserv

3.0.0 is released, I will update the PR later this week.

timdeschryver avatar Nov 02 '23 09:11 timdeschryver

I can help with updating the PR, but I'd like to block it on #1339 so we don't have to manually add pnpm to the docs.

nickserv avatar Nov 03 '23 00:11 nickserv

Thanks @MatanBobi , I'd like to wait on @nickmccurdy 's review

timdeschryver avatar Nov 03 '23 09:11 timdeschryver

Working on this a bit more by reviewing nitpicks and Docusaurus docs. Have we done any visual comparisons yet or should I try?

nickserv avatar Nov 14 '23 05:11 nickserv

Working on this a bit more by reviewing nitpicks and Docusaurus docs. Have we done any visual comparisons yet or should I try?

I made a quick browse (but haven't looked at all of the pages) and AFAIR, @timdeschryver also did.

MatanBobi avatar Nov 14 '23 07:11 MatanBobi

Great, thanks.

npx docusaurus-mdx-checker seems to be ok too, though the counts are off: https://github.com/slorber/docusaurus-mdx-checker/issues/1

nickserv avatar Nov 14 '23 08:11 nickserv

Working on this a bit more by reviewing nitpicks and Docusaurus docs. Have we done any visual comparisons yet or should I try?

@MatanBobi and myself have done some manual tests. I don't know if visual tests are worth the effort because we don't do anything special, we just use the default setup. That being said, ideally we have some tests so if you want please feel free and go ahead.

npx docusaurus-mdx-checker seems to be ok too, though the counts are off

AFAIK, we're not using MDX, just plain markdown. So this doesn't affect us too much. While upgrading another docs website I noticed we can also be explicit about this, and set the parser to markdown. https://docusaurus.io/docs/api/docusaurus-config#format

timdeschryver avatar Nov 14 '23 17:11 timdeschryver

Working on this a bit more by reviewing nitpicks and Docusaurus docs. Have we done any visual comparisons yet or should I try?

@MatanBobi and myself have done some manual tests. I don't know if visual tests are worth the effort because we don't do anything special, we just use the default setup. That being said, ideally we have some tests so if you want please feel free and go ahead.

We can use visual regression tests for this. However, it requires setting up additional infrastructure, so I'd prefer to investigate after. For now we should be fine, I forgot you both tested manually.

nickserv avatar Nov 15 '23 01:11 nickserv

AFAIK, we're not using MDX, just plain markdown. So this doesn't affect us too much. While upgrading another docs website I noticed we can also be explicit about this, and set the parser to markdown. https://docusaurus.io/docs/api/docusaurus-config#format

@timdeschryver I think we are using MDX features, I think this is an example, right?

MatanBobi avatar Nov 15 '23 09:11 MatanBobi

What's the status with this PR, do we need to take further actions?

timdeschryver avatar Nov 23 '23 09:11 timdeschryver

I'm still working on it, hopefully some more next week.

nickserv avatar Nov 24 '23 07:11 nickserv

After updates, we can do this thing at root config ^_^

  headTags: [
    {
      tagName: 'link',
      attributes: {
        rel: 'preconnect',
        href: 'https://fonts.gstatic.com'
      },
    },
  ],

denisx avatar May 14 '24 22:05 denisx