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

docs(v2): add documentation about importing code files #4974

Merged
merged 3 commits into from
Jun 15, 2021

Conversation

Josh-Cena
Copy link
Collaborator

Motivation

Resolve #4540. Yet another PR trying to migrate contents from the example MD page to the real documentation. I wonder what's the "recipes section" going to look like and whether I can help with that 🤔

I also did some minor editing to my previously written section. (#4958)

Have you read the Contributing Guidelines on pull requests?

Yes

@Josh-Cena Josh-Cena requested review from lex111 and slorber as code owners June 15, 2021 13:16
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Jun 15, 2021
@netlify
Copy link

netlify bot commented Jun 15, 2021

✔️ [V2]

🔨 Explore the source changes: 4068695

🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/60c8d34f7cd3f9000870e8a4

😎 Browse the preview: https://deploy-preview-4974--docusaurus-2.netlify.app

@github-actions
Copy link

github-actions bot commented Jun 15, 2021

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟠 Performance 71
🟢 Accessibility 97
🟢 Best practices 100
🟢 SEO 100
🟢 PWA 95

Lighthouse ran on https://deploy-preview-4974--docusaurus-2.netlify.app/

@slorber slorber marked this pull request as draft June 15, 2021 13:58
@slorber slorber marked this pull request as ready for review June 15, 2021 14:02
@slorber
Copy link
Collaborator

slorber commented Jun 15, 2021

Thanks

I'm going to merge this because some users already use it and we also use it internally, but some concerns:


You have to use `<CodeBlock>` rather than the Markdown triple-backtick ` ``` `, because the latter will ship out any of its content as-is, but you want JSX to insert the imported text here.

:::
Copy link
Collaborator

Choose a reason for hiding this comment

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

can you add a warning here and mention that this is experimental and API breaking changes are expected on this

we'll replace raw loader by https://webpack.js.org/guides/asset-modules/#replacing-inline-loader-syntax

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, will work on this in a moment

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we'll replace raw loader by https://webpack.js.org/guides/asset-modules/#replacing-inline-loader-syntax

Should I change my demo case in the documentation, or is this just a plan?

Copy link
Collaborator

Choose a reason for hiding this comment

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

we don't support ?raw syntax yet so we'll document it once we support it, for now you can keep documenting raw-loader usage

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should I add a warning then, or should we just keep it in mind and come back once the support is in place?

@slorber slorber merged commit 3d95a3e into facebook:master Jun 15, 2021
@Josh-Cena Josh-Cena deleted the document-import-code branch June 15, 2021 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include code snippets
3 participants