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.
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 React-Native website to Docusaurus v3 #3780
Upgrade React-Native website to Docusaurus v3 #3780
Changes from all commits
8d71bdc
5491c27
b40501f
ad86759
0886ab5
083b2da
81a7558
5f76cfa
7acf051
b1d4362
752645a
bb85a55
8b19c61
ade771a
3a558b1
ef7fc8d
acf26a8
89da046
3172db9
7e57c2a
21cfdef
a973057
2b6c768
4c3aa3c
17e89c6
5f98f1c
4ba1096
9080fc9
d4c5abf
15bcb64
58a9c7a
032529e
a0c1971
a5143f8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this change made by a formatter or manually?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are manual and intentional.
With MDX v2, using new lines now create extra paragraphs, cf the MDX playground:
And RN website adds padding-bottom to all paragraphs of the website, so this extra
<p>
tag visually changes the way this is rendered.I'm not sure the intent is to create a
<a><p>Read more</p></a>
here so refactored to avoid that and keep<a>Read more</a>
as the final output.There are only 4 similar cases and they are only found in very old blog posts, so I thought it was better to adjust those 4 blog posts rather than fixing it with CSS.
Somehow it's the exact same case as the
<figcaption>
case that you commented here: #3780 (comment)But there are much more recent multiline usage cases of
<figcaption>
on the RNW site, like this one:That's the reason I decided to use CSS for
<figcaption>
instead of refactoring many MDX docs:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need to be escaped?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docusaurus v3 now uses https://github.com/remarkjs/remark-directive to provide support for admonitions, and other things using syntax such as
:textDirective
,::leafDirective
and:::containerDirective
.Re:invent
is parsed asRe
+:invent
text directive.This is what happens in the MDX playground if you turn the remark-directive option on:
This regression was captured by the visual regression tests:
https://app.argos-ci.com/slorber/rnw-visual-tests/builds/32/56012838
Technically it should probably be possible to add some code in Docusaurus v3 so that this escaping becomes un-necessary, and the unhandled AST directive nodes get serialized back as raw text. For now it's not implemented, and not even sure who should implement that 😅. Will think about it. I hope in the meantime it's not a blocker for you to merge this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a little React hydration issue. The issue was already there, and is not a blocker, but is now logged thanks to React 18 new hydration callback
onRecoverableError(error)
(https://react.dev/blog/2022/03/29/react-v18)The SSR/SSG render and the first CSR render outputs should match, so things such as
typeof window !== "undefined"
etc should be avoided.This file was deleted.