{"action":"created","issue":{"url":"https://api.github.com/repos/callemall/material-ui/issues/4014","repository_url":"https://api.github.com/repos/callemall/material-ui","labels_url":"https://api.github.com/repos/callemall/material-ui/issues/4014/labels{/name}","comments_url":"https://api.github.com/repos/callemall/material-ui/issues/4014/comments","events_url":"https://api.github.com/repos/callemall/material-ui/issues/4014/events","html_url":"https://github.com/callemall/material-ui/issues/4014","id":148803492,"number":4014,"title":"[AppBar] Add AppBarContainer component providing padding and layout automatically","user":{"login":"owencm","id":279720,"avatar_url":"https://avatars.githubusercontent.com/u/279720?v=3","gravatar_id":"","url":"https://api.github.com/users/owencm","html_url":"https://github.com/owencm","followers_url":"https://api.github.com/users/owencm/followers","following_url":"https://api.github.com/users/owencm/following{/other_user}","gists_url":"https://api.github.com/users/owencm/gists{/gist_id}","starred_url":"https://api.github.com/users/owencm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owencm/subscriptions","organizations_url":"https://api.github.com/users/owencm/orgs","repos_url":"https://api.github.com/users/owencm/repos","events_url":"https://api.github.com/users/owencm/events{/privacy}","received_events_url":"https://api.github.com/users/owencm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-16T01:26:10Z","updated_at":"2016-04-16T01:50:03Z","closed_at":null,"body":"Let me know if this has been previously debated, I'd love to read the discussion!\r\n\r\nToday I think creating a simple layout with an AppBar at the top of the page is unnecessarily complex, as developers need to manually set the `AppBar` to fixed position and add padding to whatever is under it with the same height as it will be (which turns out to be `spacing.desktopKeylineIncrement`).\r\n\r\nHas it been discussed previously whether we should instead architect more around a composition model, so for example we could have an `<AppBarContainer>` (name subject to bikeshedding) component with which you would write:\r\n\r\n```\r\n<AppBarContainer>\r\n  <ThePageContents />\r\n</AppBarContainer>\r\n```\r\n\r\nas shorthand for\r\n\r\n```\r\n<AppBar style={{ position: fixed; top: 0 }} />\r\n<ThePageContents style={{ paddingTop: spacing.desktopKeylineIncrement }} />\r\n```\r\n\r\nI feel like that would make things way easier for developers and would allow for higher-level effects to be implemented like hiding-on-scroll etc."},"comment":{"url":"https://api.github.com/repos/callemall/material-ui/issues/comments/210710073","html_url":"https://github.com/callemall/material-ui/issues/4014#issuecomment-210710073","issue_url":"https://api.github.com/repos/callemall/material-ui/issues/4014","id":210710073,"user":{"login":"owencm","id":279720,"avatar_url":"https://avatars.githubusercontent.com/u/279720?v=3","gravatar_id":"","url":"https://api.github.com/users/owencm","html_url":"https://github.com/owencm","followers_url":"https://api.github.com/users/owencm/followers","following_url":"https://api.github.com/users/owencm/following{/other_user}","gists_url":"https://api.github.com/users/owencm/gists{/gist_id}","starred_url":"https://api.github.com/users/owencm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owencm/subscriptions","organizations_url":"https://api.github.com/users/owencm/orgs","repos_url":"https://api.github.com/users/owencm/repos","events_url":"https://api.github.com/users/owencm/events{/privacy}","received_events_url":"https://api.github.com/users/owencm/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T01:50:03Z","updated_at":"2016-04-16T01:50:03Z","body":"FYI I got thinking about this due to starting implementation on a BottomNavigation component (https://github.com/callemall/material-ui/issues/3712) and wondering how this will integrate with the Snackbar in terms of layout. A container model definitely seems tidier and the only feasible option if we ever support dynamic height."}}