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

chore: upgrade docusaurus to 2.3.1 & react 18.2 #3618

Merged
merged 1 commit into from
Mar 15, 2023

Conversation

blakef
Copy link
Contributor

@blakef blakef commented Mar 10, 2023

Upgrade these dependencies, so we can support deep-linking in Tabs.

@netlify
Copy link

netlify bot commented Mar 10, 2023

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit b57521b
🔍 Latest deploy log https://app.netlify.com/sites/react-native/deploys/6411e2eb454977000891daa8
😎 Deploy Preview https://deploy-preview-3618--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Simek
Copy link
Collaborator

Simek commented Mar 10, 2023

Thanks for looking at Docusaurus upgrade! 👍

There are few things which need to be done, besides bumping the packages versions in package.json:

Broken things I have spotted on quick check:

blakef added a commit to blakef/cli that referenced this pull request Mar 10, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
@blakef blakef force-pushed the upgrade-docusaurus-react branch from 196b514 to 21846bf Compare March 13, 2023 20:46
@blakef
Copy link
Contributor Author

blakef commented Mar 13, 2023

Push for the Showcase issue coming soon.

I wrote some visual diff tooling to give me a better chance of catching these things.
CleanShot 2023-03-13 at 20 47 06@2x

@blakef blakef force-pushed the upgrade-docusaurus-react branch 2 times, most recently from 04f5dbc to 4f2bf39 Compare March 13, 2023 23:09
@blakef
Copy link
Contributor Author

blakef commented Mar 13, 2023

@Simek I think this LGTM now. When you have a moment would you mind looking over it again. I've incorporated the swizzle changes and fixed the issue with showcase.

@Simek
Copy link
Collaborator

Simek commented Mar 14, 2023

Thank you for all the work put into the upgrade! 🙏 Besides the comment about Showcase issue, this LGTM! 👍

Also, it looks like we have broken content container on versions page - https://deploy-preview-3618--react-native.netlify.app/versions - but surprisingly, this already seems to be an issue for PROD deployment, so we can address this in a separate PR.

@blakef blakef force-pushed the upgrade-docusaurus-react branch 3 times, most recently from 8d7e57f to bdb9be6 Compare March 14, 2023 11:22
@blakef
Copy link
Contributor Author

blakef commented Mar 14, 2023

I'm spamming netifly atm because the issue doesn't reproduce on my locally hosted version. Apologies for the noise.

@blakef blakef force-pushed the upgrade-docusaurus-react branch 2 times, most recently from 430989a to b9b852d Compare March 15, 2023 12:40
const imgSource = !app.icon.startsWith('http')
? useBaseUrl('img/showcase/' + app.icon)
: app.icon;
const renderApp = (app, i) => <AppBox app={app} key={`app-${app.name}-${i}`} />;
Copy link
Contributor Author

@blakef blakef Mar 15, 2023

Choose a reason for hiding this comment

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

Separated the hooks in here from the Showcase component made it simpler to call hooks consistently in Showcase (otherwise we'd get invariant errors).

@blakef blakef requested a review from Simek March 15, 2023 13:57
@Simek
Copy link
Collaborator

Simek commented Mar 15, 2023

Showcase looks good, glad you figure it out! To fix the announcement bar styling we will need to change CSS selectors in this section:

/* Announcement banner */
:root {
--docusaurus-announcement-bar-height: auto !important;
}
div[class^="announcementBar"][role="banner"] {
border-bottom-color: var(--deepdark);
button.close {
svg {
fill: white;
}
}
}
div[class^="announcementBarContent"] {
line-height: 40px;
font-size: 20px;
font-weight: bold;
padding: 8px 30px;
a {
text-decoration: underline;
display: inline-block;
color: var(--brand) !important;
&:hover {
color: var(--ifm-color-primary) !important;
}
}
}
@media only screen and (max-width: 768px) {
div[class^="announcementBarContent"] {
font-size: 18px;
}
}
@media only screen and (max-width: 500px) {
div[class^="announcementBarContent"] {
font-size: 15px;
line-height: 22px;
padding: 6px 30px;
}
}

Since the class names changed between versions, now we need to use div[class*= (includes) instead of div[class^= (startsWith), which should bring the correct styling back. It is really needed only for announcementBarContent, but we can apply this change to the rest of announce bar classes to be a bit more future-proof.

@blakef blakef force-pushed the upgrade-docusaurus-react branch from b9b852d to b57521b Compare March 15, 2023 15:23
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.

Thank you for all the updates and great comments on the process, LGTM! 🚀

@blakef blakef merged commit 936b16f into facebook:main Mar 15, 2023
@blakef blakef deleted the upgrade-docusaurus-react branch March 15, 2023 16:15
blakef added a commit to blakef/cli that referenced this pull request Mar 16, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
blakef added a commit to blakef/cli that referenced this pull request Mar 16, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
blakef added a commit to blakef/cli that referenced this pull request Mar 17, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
blakef added a commit to blakef/cli that referenced this pull request Mar 20, 2023
These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620
adamTrz pushed a commit to react-native-community/cli that referenced this pull request Mar 20, 2023
* feat: add deeplinks to our documentation

These changes will only start to work once our documentation is updated
to support this feature:
- facebook/react-native-website#3618
- facebook/react-native-website#3619
- facebook/react-native-website#3620

* refactor: decouple our version checks

There was a single version check that would log an available stable
version of React Native that was greater than the current version in a
project.

The change breaks that up into:
- what is the current version
- what is the next stable upgrade if available
- log any stable upgrade if available
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants