-
-
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
[AppBar] New and composable #1817
Conversation
@@ -2,6 +2,7 @@ node_modules | |||
npm-debug.log | |||
build | |||
coverage | |||
muiReadmeMaster |
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.
Do we need it?
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.
Oh my bad. It was this extra thing in my repo that I should get rid of. Thanks for noticing!
It's close to this API http://facebook.github.io/react-native/docs/toolbarandroid.html#content. I like it 👍 |
That's some good feedback. Glad you like it. Thanks @oliviertassinari! |
So React 0.14.0 is out and that is what Travis is using now. |
|
||
actionIconsGroup: { | ||
position: 'absolute', | ||
right: 48, |
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.
Absolute positioning may not work in all cases. Try it out for AppBar in the material-ui docs, I think tabs will be displaced and then you need to tweak top property.
It would be nice to see here a flexbox based positioning.
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.
👍 Yeah, I think that we should you flexbox
722689f
to
fa1cac7
Compare
Can just use divs for different sections of the appbar. Hopefully, a situation won't arise where the AppBarSubComponent wrapper is needed.
Example use in docs site. Still need to put code for example, and update documentation.
Now user doesn't have to specify default height / width / padding in their JSX.
- Used React.Children utilities to refactor code and reduce nesting of if's - Changed data-position attribute values to "navIconsGroup", "container", "actionIconsGroup" and "menuIconsGroup"
@shaurya947 Is this a work in progress? |
Yeah needs some finishing .. I gotta find time to come back to it. |
@shaurya947 any status? |
@ayhankuru sometime next week hopefully! |
I did something simillar few weeks ago, using props instead of tagged childrens. doc: https://github.com/vizath/material-ui/blob/appbar-redefinition/docs/src/app/components/pages/components/app-bar.jsx#L115 |
Any updates on this? |
@oliviertassinari thanks! |
I'm going to close this for now in an effort to clean up our PRs. A composable Appbar is definitely planned for Thanks! |
Not sure this should be closed until absolute positioning edge cases are fixed? |
Source code for new AppBar component here: https://github.com/shaurya947/material-ui/blob/new-app-bar/src/app-bar-new.jsx
Usage here: https://github.com/shaurya947/material-ui/blob/new-app-bar/docs/src/app/components/pages/components/app-bar.jsx#L140
Looking forward to your guys' feedback @hai-cea @oliviertassinari @quanglam2807 @cgestes. Once we're good with the code, I'll add new commits to update the documentation.