🪟 🎉 Support docusaurus admonitions in markdown docs #15519
Merged
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.
What
Fixes #15168
Adds support for Docusaurus admonitions used in the doc markdown files so that they render in the connector docs side panel.
Additionally, fixes some markdown issues such as heading text sizes and improvements to code blocks:

Adds Markdown story to storybook to preview changes.
Lazy loads documentation panel to avoid Markdown modules from being bundled into the main app js until they're needed.
How
I researched @mdx-js/react as suggested in the #15168 comments, but it turned out that its usage is more about pre-compiling the docs over rendering them in real-time.
Looking at our existing library (react-markdown), I figured out that I could create a custom plugin with the help of remark-directive to parse out the admonitions and style them.
There was a similar plugin that did this (remark-admonitions,) but it was not up to date and did not match docusaurus (see issue 49 in that repo).
Recommended reading order
Markdown.tsx
remarkAdmonitionsPlugin.ts
Markdown.style.css
Tests