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

[Feature Request]: Docs site to support Typescript live TSX #424

Closed
2 tasks done
danielrobertson opened this issue Jul 3, 2023 · 3 comments · Fixed by #436
Closed
2 tasks done

[Feature Request]: Docs site to support Typescript live TSX #424

danielrobertson opened this issue Jul 3, 2023 · 3 comments · Fixed by #436

Comments

@danielrobertson
Copy link
Contributor

danielrobertson commented Jul 3, 2023

Description

Support live TSX in addition to live JSX to enable better documentation of components, e.g. DataTable, where Typescript is pivotal in the component API
https://docusaurus.io/docs/markdown-features/code-blocks#interactive-code-editor

Examples

Code of Conduct

@danielrobertson
Copy link
Contributor Author

danielrobertson commented Jul 12, 2023

Digging into this I found that Docusuarus provides a live-codeblocks plugin that wraps react-live.

react-live@4.0.0 supports Typescript but Docusaurus' live-codeblocks is on react-live@2.3.3 (package.json) 😞

A Docusarus maintiner mentions here that live codeblocks don't receive much usage in his opinion, which would explain the outdated dependencies.

@danielrobertson
Copy link
Contributor Author

danielrobertson commented Jul 12, 2023

I attempted a quick PR to Docusaurus here updating the dependency, but the builds failed in a way that wasn't clear how to proceed. I saw some folks in the Discord also struggling to get through webpack and other errors when upgrading react-live facebook/docusaurus#9145

image image

@danielrobertson
Copy link
Contributor Author

I have created an issue in Docusaurus' feedback board https://docusaurus.io/feature-requests/p/typescript-live-code-blocks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant