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] GridList, IconButton, IconMenu, LeftNav, LinearPogress, List - Add title & description to examples #2967

Merged
merged 6 commits into from
Jan 19, 2016
Merged

Conversation

mbrookes
Copy link
Member

For #2927.

<PropTypeDescription code={gridListCode}/>
<PropTypeDescription code={gridTileCode}/>
<PropTypeDescription header="### Grid List Properties" code={gridListCode}/>
<PropTypeDescription header="### Grid Tile Properties" code={gridTileCode}/>
Copy link
Member

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?

Copy link
Member Author

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".

Copy link
Member

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,

@mbrookes
Copy link
Member Author

I'll circle back and review previous PRs before we close #2927.

@oliviertassinari oliviertassinari changed the title Docs] GridList, IconButton, IconMenu, LeftNav, LinearPogress, List - Add title & description to examples [Docs] GridList, IconButton, IconMenu, LeftNav, LinearPogress, List - Add title & description to examples Jan 18, 2016
@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Jan 18, 2016
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), ' +
Copy link
Member

Choose a reason for hiding this comment

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

http://localhost:

@mbrookes
Copy link
Member Author

Should be good to go.

const GridListPage = () => (
<div>
<MarkdownElement text={gridListReadmeText} />
<CodeExample code={gridListExampleSimpleCode}>
<CodeExample
title="Simple Grid List"
Copy link
Member

Choose a reason for hiding this comment

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

Simple example?

@mbrookes
Copy link
Member Author

Or maybe not! 😁

@mbrookes
Copy link
Member Author

🙏

oliviertassinari added a commit that referenced this pull request Jan 19, 2016
[Docs] GridList, IconButton, IconMenu, LeftNav, LinearPogress, List - Add title & description to examples
@oliviertassinari oliviertassinari merged commit 01d0624 into mui:master Jan 19, 2016
@oliviertassinari
Copy link
Member

🎬

@mbrookes mbrookes deleted the docs-example-title-desc-3 branch January 26, 2016 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants