-
-
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
[Docs] GridList, IconButton, IconMenu, LeftNav, LinearPogress, List - Add title & description to examples #2967
[Docs] GridList, IconButton, IconMenu, LeftNav, LinearPogress, List - Add title & description to examples #2967
Conversation
<PropTypeDescription code={gridListCode}/> | ||
<PropTypeDescription code={gridTileCode}/> | ||
<PropTypeDescription header="### Grid List Properties" code={gridListCode}/> | ||
<PropTypeDescription header="### Grid Tile Properties" code={gridTileCode}/> |
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.
What do you think about using the name of the component: ### GridTile Properties
?
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.
Yes, I was undecided, since we use the feature name in some places, and the component name in others. It would be good to have clarity, and therefore consistency in when to use one or the other.
Also, for features with only one component, should it be "SomeComponent Properties", or just "Properties". Obviously where there are sub components, disbiguation is essential.
Similarly, should the example titles, for example: "Controlled example", "Controlled Left Nav", or "Controlled LeftNav".
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 clarify my point of view, I think that:
- For feature with only one component
Properties
is enough. We are already in the context of this specific component. - For feature with more than one component, we need to specify the component name the properties are linked to. Hence, I think that the
component.displayName
will be better. - For examples, I don't think that
Controlled example
is better for the same reason that we should use:
/**
* The css class name of the root element.
*/
className: React.PropTypes.string,
and not:
/**
* Applied to the app bar's root element.
*/
className: React.PropTypes.string,
I'll circle back and review previous PRs before we close #2927. |
simple: 'An Icon Button using an icon specified with the `iconClassName` property, and a `disabled` example.', | ||
tooltip: 'Icon Buttons showing the available `tooltip` positions.', | ||
touch: 'The `touch` property adjusts the tooltip size for better visibility on mobile devices.', | ||
other: 'An Icon Button using a nested [Font Icon](http://localhost:3000/#/components/font-icon), ' + |
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.
http://localhost:
Should be good to go. |
const GridListPage = () => ( | ||
<div> | ||
<MarkdownElement text={gridListReadmeText} /> | ||
<CodeExample code={gridListExampleSimpleCode}> | ||
<CodeExample | ||
title="Simple Grid List" |
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.
Simple example
?
Or maybe not! 😁 |
🙏 |
[Docs] GridList, IconButton, IconMenu, LeftNav, LinearPogress, List - Add title & description to examples
🎬 |
For #2927.