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

[Doc] Convert LeftNav to use the new standard. #2507

Merged
merged 1 commit into from
Dec 14, 2015

Conversation

alitaheri
Copy link
Member

Also addresses some other issues.

  1. Deprecates the usage of menuItems ( Closes LeftNav is still using old menu -- which will be deprecated soon #2491)
  2. Adds ability to customize width of the LeftNav (Closes Styling on LeftPanel #2499 and leftNav not correctly hidden when width modified #2270)

@oliviertassinari Take a look 😁

@alitaheri alitaheri added docs Improvements or additions to the documentation PR: Needs Review labels Dec 13, 2015
@alitaheri alitaheri added this to the Improve the documentation milestone Dec 13, 2015
@@ -260,6 +369,30 @@ const LeftNav = React.createClass({

warning(!(typeof this.props.onNavOpen === 'function'),
'onNavOpen will be removed in favor of onRequestChange');

warning(!this.props.header,
Copy link
Member

Choose a reason for hiding this comment

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

Would hasOwnProperty be better that a negation?

Copy link
Member Author

Choose a reason for hiding this comment

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

yup, it would!

@alitaheri
Copy link
Member Author

done

@Tux1 Tux1 mentioned this pull request Dec 14, 2015
<RaisedButton
label="Controlled LeftNav That Opens From Right"
onTouchTap={this.handleToggle} />
<LeftNav width={450} openRight={true} open={this.state.open} >
Copy link
Member

Choose a reason for hiding this comment

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

450 or 400 is too much for a mobile phone.
I'm wondering, would 50% works?

Copy link
Member Author

Choose a reason for hiding this comment

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

hmmmm let me see if i can get that to work. good feature to have.

Copy link
Member Author

Choose a reason for hiding this comment

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

@oliviertassinari
how would we handle the number returned by this

Copy link
Member

Choose a reason for hiding this comment

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

We would need to make this number unitless. It could be px or %.
That's require some work. Same, we would have to use px or % for the transform3d property.

Copy link
Member

Choose a reason for hiding this comment

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

What about reducing the width to something like 300 instead of 400 or 450 and address this % later?

Copy link
Member Author

Choose a reason for hiding this comment

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

alright. sure 😁

@alitaheri
Copy link
Member Author

@oliviertassinari Is that ok?

I wanted it to be noticeable, so I made it very small instead.

onTouchTap={this.handleToggle} />
<LeftNav
docked={false}
width={400}
Copy link
Member

Choose a reason for hiding this comment

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

300?

Copy link
Member Author

Choose a reason for hiding this comment

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

O.O I forgot about this. nice catch 👍 👍

@oliviertassinari
Copy link
Member

@subjectix Feel free to squash down, I will merge 🎉.

@alitaheri
Copy link
Member Author

@oliviertassinari Didn't have the time, on it 😁

@alitaheri alitaheri force-pushed the docs-codgen-left-nav branch from a439c89 to 23ee58b Compare December 14, 2015 16:07
@alitaheri
Copy link
Member Author

@oliviertassinari I'll leave the merging to you, thanks 👍 👍

oliviertassinari added a commit that referenced this pull request Dec 14, 2015
[Doc] Convert LeftNav to use the new standard.
@oliviertassinari oliviertassinari merged commit aba2140 into mui:master Dec 14, 2015
@alitaheri alitaheri deleted the docs-codgen-left-nav branch December 15, 2015 06:47
@dcsan
Copy link

dcsan commented Dec 16, 2015

are there some examples of using menuItems?
I see a lot of deprec warnings:

image

but the code I'm using came from the docs site.
https://github.com/dcsan/react-hot/blob/master/app/client/layouts/MainLayout.jsx#L25-L53

I'm looking for a code example for an app bar with left navigation. I can see implementation of the components on your docs site, but can't see a master layout where it's used.
https://github.com/callemall/material-ui/blob/master/docs/src/app/components/app-left-nav.jsx

@alitaheri
Copy link
Member Author

@dcsan Well the docs are not updated, if you build the docs from the 0.14.0-rc2 yourself you will see the updated examples. or just take a look at the source.

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.

3 participants