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

WIP: markdown to custom components #90

Closed
wants to merge 11 commits into from

Conversation

m7kvqbe1
Copy link
Member

@m7kvqbe1 m7kvqbe1 commented Jun 25, 2019

Related Jira issue:

https://rn-nelson.atlassian.net/browse/EN-688

Overview

Implement a pre-parser for the component library README.md files to convert MD into MDX.

Reason

The README.md files need to stay as pure markdown, but in order to display them on the docs-site some markdown structures need to be converted to their corresponding docs-site JSX representation (presentational components).

Work carried out

  • Implement pre-parser and translators (CodeHighlighter & DataTable)
  • Fix issues with Gatsby MDX parser errors (need to escape some prop values)
  • Implement transformTableData for DataTable translator
  • Use JSX instead of createElement (need to transpile - maybe use @babel/node CLI)
  • Pass code examples as tree of React nodes (use props.children for render)
  • Deal with yarn audit security error (marked ^0.6.2 required)

Screenshot

Screenshot 2019-06-26 at 13 24 17

Developer notes

There is a known issue with Yarn workspaces and resolutions: yarnpkg/yarn#5039

This is currently blocking me from dealing with the audit error.

Potential solution: yarnpkg/yarn#6669 (comment)

@m7kvqbe1 m7kvqbe1 requested a review from antictor June 25, 2019 15:17
@m7kvqbe1 m7kvqbe1 self-assigned this Jun 25, 2019
@@ -0,0 +1,3 @@
.post-article {
width: 0;
Copy link
Member Author

@m7kvqbe1 m7kvqbe1 Jun 26, 2019

Choose a reason for hiding this comment

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

This is a temporary layout fix (hack). The post-article component needs styling from the ground up.

@m7kvqbe1 m7kvqbe1 force-pushed the feature/markdown-to-custom-components branch 2 times, most recently from 057ddc0 to 904ad20 Compare June 26, 2019 14:16
@m7kvqbe1 m7kvqbe1 closed this Jun 26, 2019
@m7kvqbe1 m7kvqbe1 deleted the feature/markdown-to-custom-components branch June 26, 2019 14:33
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 this pull request may close these issues.

None yet

1 participant