Skip to content

Upgrade website to Docusaurus using webpack 5#2573

Merged
Simek merged 14 commits intofacebook:masterfrom
slorber:slorber/docusaurus-webpack5
May 6, 2021
Merged

Upgrade website to Docusaurus using webpack 5#2573
Simek merged 14 commits intofacebook:masterfrom
slorber:slorber/docusaurus-webpack5

Conversation

@slorber
Copy link
Contributor

@slorber slorber commented Apr 2, 2021

Summary

Test upgrade to latest canary of Docusaurus using Webpack 5 (facebook/docusaurus#4089)

This should speed up build times significantly thanks to the new persistent caching system

Test plan

preview


Seems to improve rebuild times significantly:

image

@Simek Simek added the 🦖 Docusaurus This issue or PR is related to the Docusaurus. label Apr 3, 2021
Copy link
Collaborator

@Simek Simek left a comment

Choose a reason for hiding this comment

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

Is PWA temporarily disabled for testing or there is an other reason for that?

@slorber
Copy link
Contributor Author

slorber commented Apr 3, 2021 via email

@slorber
Copy link
Contributor Author

slorber commented Apr 6, 2021

Also noticed something on the RN website, as you have pages with 2 h1 titles (usually page title + "Reference").

We have a new warning but wondering if we should not just remove it, or at least provide a way to ignore it.

Starting the development server...
Duplicate title detected in `actionsheetios.md` file
Duplicate title detected in `image-style-props.md` file
Duplicate title detected in `layout-props.md` file
Duplicate title detected in `shadow-props.md` file
Duplicate title detected in `share.md` file
Duplicate title detected in `systrace.md` file
Duplicate title detected in `text-style-props.md` file

Asking here: https://twitter.com/sebastienlorber/status/1379416531235405832

@Simek
Copy link
Collaborator

Simek commented Apr 6, 2021

Also noticed something on the RN website, as you have pages with 2 h1 titles (usually page title + "Reference").

@slorber AFAIK, since V1, it was a workaround to skip the heading entry in page ToC, but retaining the size difference between Reference and reference sections heading like Props or Methods.

@netlify
Copy link

netlify bot commented Apr 16, 2021

Deploy preview for react-native ready!

Built with commit 62de6f6

https://deploy-preview-2573--react-native.netlify.app

@slorber slorber marked this pull request as ready for review April 30, 2021 17:37
@slorber
Copy link
Contributor Author

slorber commented Apr 30, 2021

let me know if you see any issue :)

@Simek
Copy link
Collaborator

Simek commented May 5, 2021

@slorber There are two visible issues at the first glance:

  • oversized sidebar and horizontal scrolling
    Screenshot 2021-05-05 222607
  • monospace entries of ToC (right sidebar) now have a border
    Screenshot 2021-05-05 222717

Will let you know if I spot more problems.

@slorber
Copy link
Contributor Author

slorber commented May 6, 2021

Fixed the custom CSS that mess-up with the sidebar. It is better to use css vars to override the sidebar width, as we do some calc() CSS computations on it

About the TOC, yes that seems a side-effect of facebookincubator/infima#106
At the same time, wouldn't it make sense to have a border here, as the toc headers are inline code blocks anyway? Is it a problem to have this new border in practice?

@Simek
Copy link
Collaborator

Simek commented May 6, 2021

About the TOC, yes that seems a side-effect of facebookincubator/infima#106

@slorber This border also appears on all other <code> elements on the whole website, even in content:

Screenshot 2021-05-06 113124

For me, it looks like way too general CSS rule was applied without a visible reason (and as a side-change in other bugfix). Hope the PR author will explain the addition. Ideally I would prefer to see Infima styles fixed, rather than adding a bunch of overwrites to the React Native website custom CSS code.

Copy link
Collaborator

@Simek Simek left a comment

Choose a reason for hiding this comment

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

LGTM, thank you for the update @slorber! 👍

@Simek Simek merged commit 9e37a9d into facebook:master May 6, 2021
@slorber
Copy link
Contributor Author

slorber commented May 6, 2021

Thanks for merging

For me, it looks like way too general CSS rule was applied without a visible reason (and as a side-change in other bugfix). Hope the PR author will explain the addition. Ideally I would prefer to see Infima styles fixed, rather than adding a bunch of overwrites to the React Native website custom CSS code.

Unfortunately, not sure what to do, any CSS change we do can lead to people not being happy with the change, but we have to change CSS to make progress. I understand however that it is frustrating for users with customizations like RN on each upgrade to have to fix the CSS.

We'll focus on improving this in the next phase of Docusaurus. I really want to make it easier to customize, and most importantly, make it clear what is safe to customize and what is not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed 🦖 Docusaurus This issue or PR is related to the Docusaurus.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants