{"action":"created","issue":{"url":"https://api.github.com/repos/rebassjs/rebass/issues/474","repository_url":"https://api.github.com/repos/rebassjs/rebass","labels_url":"https://api.github.com/repos/rebassjs/rebass/issues/474/labels{/name}","comments_url":"https://api.github.com/repos/rebassjs/rebass/issues/474/comments","events_url":"https://api.github.com/repos/rebassjs/rebass/issues/474/events","html_url":"https://github.com/rebassjs/rebass/pull/474","id":358327639,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MTE0MzUy","number":474,"title":"Next v3","user":{"login":"jxnblk","id":3451712,"node_id":"MDQ6VXNlcjM0NTE3MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/3451712?v=4","gravatar_id":"","url":"https://api.github.com/users/jxnblk","html_url":"https://github.com/jxnblk","followers_url":"https://api.github.com/users/jxnblk/followers","following_url":"https://api.github.com/users/jxnblk/following{/other_user}","gists_url":"https://api.github.com/users/jxnblk/gists{/gist_id}","starred_url":"https://api.github.com/users/jxnblk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxnblk/subscriptions","organizations_url":"https://api.github.com/users/jxnblk/orgs","repos_url":"https://api.github.com/users/jxnblk/repos","events_url":"https://api.github.com/users/jxnblk/events{/privacy}","received_events_url":"https://api.github.com/users/jxnblk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2018-09-08T21:01:09Z","updated_at":"2018-10-28T16:11:44Z","closed_at":"2018-09-09T21:41:41Z","author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/rebassjs/rebass/pulls/474","html_url":"https://github.com/rebassjs/rebass/pull/474","diff_url":"https://github.com/rebassjs/rebass/pull/474.diff","patch_url":"https://github.com/rebassjs/rebass/pull/474.patch"},"body":"Rebass v3 is a complete rewrite with the intent of making this UI component library useful to an even wider audience. Instead of trying to provide an off-the-shelf solution to styling UI (there are several other libraries out there for that), it tries to provide a solid base for extending these components into a highly customized UI component library. Rebass is intended to be useful in *any* React application and is so small it shouldn't make a huge impact on your overall bundle size.\r\n\r\n- Much smaller (~1KB)\r\n- 8 components: Box, Flex, Text, Heading, Button, Link, Image, and Card\r\n- Built with styled-components v4\r\n- Intended to be extended\r\n- Only one dependency: styled-system\r\n- No default theme or colors\r\n- No Provider component required\r\n- Variant theme support for Button and Card\r\n- Demo: https://rebass.now.sh\r\n\r\n```sh\r\nnpm i rebass@next\r\n```\r\n\r\n## Changes\r\n\r\n- Removes 61 components\r\n- Removes `system-components` (`@rebass/components`), `grid-styled` (`@rebass/grid`), and `polished` dependencies\r\n- Removes the `is` prop in favor of styled-components' `as` prop\r\n- All components extend the base `Box` component\r\n- v3 should still be compatible with previous versions of styled-components and emotion\r\n\r\n###  Where'd all the components go?\r\n\r\nThey're still here in spirit :ghost: They might come back to haunt you in separate, more modular packages.\r\n\r\nThe overall reduction in size of this codebase and splitting Rebass up into more modular packages will give users much more control over the size of their application bundles and allow a lot more flexibility in terms of building out custom libraries.\r\n\r\n### Why has system-components (`@rebass/components`) been removed?\r\n\r\nIt adds a lot of overhead and complexity to the codebase, and most end-users don't benefit from it being used in Rebass.\r\n\r\n### Why are style props showing in the HTML\r\n\r\nThis is a [long standing issue with styled-components][sc-issue] and is due to the way the `styled` higher-order component is implemented. I was hopeful that styled-components v4 would have addressed this issue to avoid some of the less-than-ideal solutions used in the previous version of Rebass, but that will have to wait. And, due to the introduction of the `as` prop in styled-components, attempting to work around this issue while keeping up with the changing landscape of CSS-in-JS libraries doesn't seem worth it for a simple library like Rebass. That said, there *might* be a Babel plugin introduced in the future to help with this issue.\r\n\r\nRelated:\r\n\r\n- https://github.com/styled-components/styled-components/issues/1981#issuecomment-419287003\r\n\r\n### What's happening with @rebass/grid (formerly grid-styled)?\r\n\r\nThe `@rebass/grid` package will be updated to match the APIs of the Box and Flex component here (which is virtually the same) and will be available as an even smaller alternative to this library.\r\n\r\n### Why has the Provider and theme been removed?\r\n\r\nIn order to remain as unopinionated as possible, themes are now optional, giving you complete control over what your application looks like. Separate theme packages might be introduced to provide some smart defaults.\r\n\r\n### Version 2\r\n\r\nv2 will still be available in a branch to continue development while v3 is in beta. Any pull requests for v2 should point to that branch.\r\n\r\n[sc-issue]: https://github.com/styled-components/styled-components/issues/439\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/rebassjs/rebass/issues/comments/433718888","html_url":"https://github.com/rebassjs/rebass/pull/474#issuecomment-433718888","issue_url":"https://api.github.com/repos/rebassjs/rebass/issues/474","id":433718888,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzcxODg4OA==","user":{"login":"jxnblk","id":3451712,"node_id":"MDQ6VXNlcjM0NTE3MTI=","avatar_url":"https://avatars2.githubusercontent.com/u/3451712?v=4","gravatar_id":"","url":"https://api.github.com/users/jxnblk","html_url":"https://github.com/jxnblk","followers_url":"https://api.github.com/users/jxnblk/followers","following_url":"https://api.github.com/users/jxnblk/following{/other_user}","gists_url":"https://api.github.com/users/jxnblk/gists{/gist_id}","starred_url":"https://api.github.com/users/jxnblk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jxnblk/subscriptions","organizations_url":"https://api.github.com/users/jxnblk/orgs","repos_url":"https://api.github.com/users/jxnblk/repos","events_url":"https://api.github.com/users/jxnblk/events{/privacy}","received_events_url":"https://api.github.com/users/jxnblk/received_events","type":"User","site_admin":false},"created_at":"2018-10-28T16:11:44Z","updated_at":"2018-10-28T16:11:44Z","author_association":"COLLABORATOR","body":"@bessey Thanks for the feedback, and I think I understand where you're coming from, but my priorities for this project are to make sure it reflects the latest thinking into how I'd recommend building out UI component libraries. While some people do use many of the components available in v2, there are other libraries out there that provide similar number of components that could be used instead of Rebass.\r\n\r\n**If you are really invested in the v2 API, this project is open source, and I'd highly recommend forking it.**\r\n\r\nAlternatively, you can keep some of those components in your own application's source code, which would give you full control over the implementation. This is similar to how I sense that most people are using styled-system, and I think it's a fine approach. \r\n\r\nI do not have the time to maintain the previous version of Rebass. If anyone would like to help port some of the old components over to separate packages that reflect the current implementation, I'd consider linking to them. Additionally, for where I'd like the library to go in the future, I don't think the previous v2 API makes sense to keep around or promote as a way of building out component libraries.\r\n\r\nThat said, I do plan to add a migration doc to clearly state the changes and provide options for how to migrate to v3"}}
{"actor":{"display_login":"jxnblk"}}