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

Addon-docs: Move DocsRenderer back to addon-docs #18708

Merged
merged 9 commits into from
Jul 19, 2022

Conversation

tmeasday
Copy link
Member

What I did

Refactored lib/blocks to remove dependencies and improved external docs so it uses theme.

How to test

Run react-ts and the external-docs app

@tmeasday tmeasday requested a review from shilman July 14, 2022 05:46
@nx-cloud
Copy link

nx-cloud bot commented Jul 14, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 3ff9b31. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

Comment on lines +125 to +130
const toJSXString =
typeof reactElementToJSXString === 'function'
? reactElementToJSXString
: // @ts-ignore
reactElementToJSXString.default;
let string = applyBeforeRender(toJSXString(child, opts as Options), options);
Copy link
Member Author

Choose a reason for hiding this comment

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

I had to make this change to deal with an inconsistency in react-element-to-jsx-string's exports in different build contexts. I'd suggest we should fix that upstream (also maybe we should maintain that package?)

@tmeasday tmeasday force-pushed the tom/sb-453-dependencies-ensure-react-dom-mdx branch from 7d6f3d9 to 59a2892 Compare July 15, 2022 00:31
@tmeasday tmeasday added dependencies maintenance User-facing maintenance tasks addon: docs labels Jul 15, 2022
@tmeasday
Copy link
Member Author

@shilman we might need to discuss these mdx-in-story stories. I'm pretty sure they are testing a situation that is no longer possible, but I want to double check.

@tmeasday
Copy link
Member Author

Add <MDXProvider> to the mdx-in-docs story decorator + explanation of the purpose.

@shilman shilman self-assigned this Jul 18, 2022
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM except for my comment

lib/blocks/src/blocks/Docs.tsx Outdated Show resolved Hide resolved
@shilman shilman changed the title Move DocsRenderer back to addon-docs Addon-docs: Move DocsRenderer back to addon-docs Jul 18, 2022
@tmeasday tmeasday merged commit e925226 into future/base Jul 19, 2022
@tmeasday tmeasday deleted the tom/sb-453-dependencies-ensure-react-dom-mdx branch July 19, 2022 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: docs maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants