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

[MenuItem][Table][Tabs] Hide internal properties in docs #3589

Merged
merged 1 commit into from
Mar 8, 2016

Conversation

heetvachhani
Copy link
Contributor

  • PR has tests / docs demo, and is linted.
  • Commit and PR titles begin with [ComponentName], and are in imperative form: "[Component] Fix leaky abstraction".
  • Description explains the issue / use-case resolved, and auto-closes the related issue(s) (http://tr.im/vFqem).

A number of props that are controlled by a parent component are visible in the docs. This PR hides them.

Some of the table click / hover in particular cause confusion, as they appear to offer functionality that doesn't exist. While this should be fixed at some point (parent component should attach to a separate internal use callback prop), for now hiding them will reduce confusion.

The associated issue lists all the components that have been checked.
Closes #3588.

@mbrookes mbrookes self-assigned this Mar 3, 2016
@mbrookes mbrookes changed the title [Docs] Hide internal Props [Docs] Hide internal props Mar 3, 2016
@mbrookes mbrookes changed the title [Docs] Hide internal props [Table][Tabs] Hide internal properties in docs Mar 3, 2016
@heetvachhani heetvachhani force-pushed the hideInternalProps branch 2 times, most recently from d0f61ea to 8296afb Compare March 4, 2016 16:37
@mbrookes
Copy link
Member

mbrookes commented Mar 4, 2016

@heetvachhani - please don't squash until we're ready to merge, it makes it hard to see what's changed.

@heetvachhani
Copy link
Contributor Author

okay sure will take care of it next time 😁

@@ -82,11 +83,13 @@ const MenuItem = React.createClass({

/**
* Override the inline-styles of the root element.
* @ignore
*/
style: React.PropTypes.object,
Copy link
Member

Choose a reason for hiding this comment

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

Why?

@mbrookes mbrookes changed the title [Table][Tabs] Hide internal properties in docs [MenuItem][Table][Tabs] Hide internal properties in docs Mar 4, 2016
@mbrookes
Copy link
Member

mbrookes commented Mar 4, 2016

I hope so! Please squash.

@mbrookes mbrookes added PR: Review Accepted docs Improvements or additions to the documentation and removed PR: Needs Review labels Mar 5, 2016
@mbrookes
Copy link
Member

mbrookes commented Mar 6, 2016

@callemall/material-ui - please take a look and merge if you're happy.

@alitaheri
Copy link
Member

Some tags are before the description and some are after. Please be consistent. Guys do you think it should be after or before? I'm not sure myself O.o

@mbrookes
Copy link
Member

mbrookes commented Mar 6, 2016

Good catch, I spotted this and meant to come back to it after we were done chasing and tracing to figure out which ones to @ignore.

I just had a look at what's been done previously, and most of the existing ones are before, but some are after, so there is no consistency. Also Stepper has just introduced a ton of internal props, and they're all after.

It would be good to be consistent, but I don't mind which. Before is perhaps a little more explicit.

@alitaheri
Copy link
Member

Yeah might not be a bad idea to keep after only for function signature. so signature and @ignore won't get mixed up 👍

@alitaheri
Copy link
Member

Better have a PR making all consistent afterward 👍

@alitaheri
Copy link
Member

@newoga @oliviertassinari Any objections? If none merge, thanks 👍 👍

@mbrookes
Copy link
Member

mbrookes commented Mar 6, 2016

might not be a bad idea to keep after only for function signature. so signature and @ignore won't get mixed up

Can we get a custom eslint rule for that? 😄

@heetvachhani
Copy link
Contributor Author

@mbrookes I have made all the @ignore tag consistent so merge it if there isn't any problem. Thanks 👍

@newoga
Copy link
Contributor

newoga commented Mar 7, 2016

@heetvachhani Can you squash this? Thanks!

Added @ignore tag to hide public child component from documentation
@heetvachhani
Copy link
Contributor Author

Done @newoga !

@oliviertassinari
Copy link
Member

@heetvachhani Good work 👍.

@alitaheri
Copy link
Member

Thanks @heetvachhani 👍 👍

alitaheri added a commit that referenced this pull request Mar 8, 2016
[MenuItem][Table][Tabs] Hide internal properties in docs
@alitaheri alitaheri merged commit e3934d3 into mui:master Mar 8, 2016
@ngbrown
Copy link
Contributor

ngbrown commented May 26, 2016

@heetvachhani I think you overdid the @ignore on the Table components.

For TableHeaderColumn, there's no way to know if a column header was clicked except for the onClick which was hidden from the documentation.

The same applies to all TableRowColumn that are in a TableFooter. If the developer wants to detect a click or hover on a footer cell, then they would need use event handlers directly on the TableRowColumn and they should be in the documentation..

Why is adjustForCheckbox hidden in the documentation for TableFooter if it's not hidden for TableHeader? Nothing internally sets it.

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.

6 participants