-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[Doc Enhancement] Introduce MarkdownElement #2224 #2226
Conversation
62ea2e0
to
edd7eb5
Compare
I think this is a slightly better system than what we have today. Obviously, it is easier to write a docs page as a separate markdown file vs. using |
@@ -15,6 +16,8 @@ const EditorInsertChart = require('svg-icons/editor/insert-chart'); | |||
const FileFolder = require('svg-icons/file/folder'); | |||
const MoreVertIcon = require('svg-icons/navigation/more-vert'); | |||
import { SelectableContainerEnhance } from 'material-ui/hoc/selectable-enhance'; | |||
require('github-markdown-css/github-markdown.css'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should be move to markdown-element.jsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
your right, there it belongs!
@oliviertassinari Thanks for your feedback! |
@frankf-cgn I can see people using this component in their applications. So perhaps it makes sense to document it as a new component on its own page? @oliviertassinari what say? |
@shaurya947 Strictly taken, this is not a ui-component in "material-design". It's more like |
f29aaf2
to
f368cae
Compare
I'm not sure.. Perhaps you are right, but this could be pretty useful for people making text-heavy web apps. @oliviertassinari what do you think about making this a documented component with its own page like other components? @frankf-cgn looking forward to the style changes! EDIT: just spoke to @hai-cea and seems like it's not adherent to the Material Design spec to treat this like a regular MUI component. |
I agree, let's keep this component for our doc. |
68ebca1
to
0e1ca0e
Compare
@shaurya947 @oliviertassinari After pulling my hair over the lint-rules i finally managed to get this linted. I have done the following stuff:
Just out of curiosity I played around with various possibilities on how to format the documentation of props in markdown. May ask for some feedback of you both on that? |
Sorry, but this made me laught. I have enforced more rules lately 😬. I aim to follow at least
I will have a look 👍 |
const {text} = this.props; | ||
const html = marked(text || ''); | ||
|
||
/* eslint-disable */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To allow html-tags within markdown (e.g. for definition lists) dangerouslySetInnerHTML
is needed which is prevented in .eslint
L74 no-danger.
I think this is a non-issue here, because we truts the PR of the developer anyway.
@@ -15,8 +15,10 @@ | |||
}, | |||
"dependencies": { | |||
"codemirror": "^5.5.0", | |||
"hightlight.js": "^8.9.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'hightlight.js' is not in the npm registry.
0e1ca0e
to
f6620fa
Compare
@oliviertassinari The ".js" is correct. but I have had a typo in "hightlight.js", that is now fixed and the style-loader is added, too. |
I have this following issue with webpack when running
|
f6620fa
to
a8d45b3
Compare
@oliviertassinari I have no idea, why these npm-modules are installed globally in my environment - have to check this. Sorry for the noise it generates. |
@frankf-cgn With npm@3 and node@5, it's working 👍. |
@frankf-cgn I'm gonna add your |
@frankf-cgn I'm done, could you have a look at the other PR? |
@oliviertassinari Thats awesome! I'll look into the other PR. |
First working draft to implement #2224. Result can be seen on
<ListsPage>
.In order to test,
cd /docs
, runnpm install
andnpm run start
. Visithttp://localhost:3000/#/components/lists
and scroll down to "Headline 1"