Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Releases: paypal/glamorous

v4.4.0

23 Aug 19:29
Compare
Choose a tag to compare

4.4.0 (2017-08-23)

Features

  • typescript: add type for props of glamorous component (#298) (51f70b2)

v4.3.1

22 Aug 13:28
Compare
Choose a tag to compare

4.3.1 (2017-08-22)

Bug Fixes

  • typescript: fix name of type def file (#296) (444794d)

v4.3.0

22 Aug 13:21
Compare
Choose a tag to compare

4.3.0 (2017-08-22)

Features

  • typescript: add type for built-in glamorous components (#297) (1d13982)

v4.2.1

18 Aug 14:56
Compare
Choose a tag to compare

4.2.1 (2017-08-18)

Bug Fixes

  • typescript: fix component factory typings (#291) (f35d7b2)

v4.2.0

16 Aug 17:35
Compare
Choose a tag to compare

4.2.0 (2017-08-16)

Features

  • withConfig: add (undocumented) withConfig for tooling (#290) (dd62082)

v4.1.2

14 Aug 20:36
Compare
Choose a tag to compare

<a name"4.1.2">

4.1.2 (2017-08-14)

Bug Fixes

v4.1.1

13 Aug 03:51
Compare
Choose a tag to compare

<a name"4.1.1">

4.1.1 (2017-08-13)

Bug Fixes

  • withComponent: maintain component properties (#284) (250bcec2)

v4.1.0

03 Aug 22:32
Compare
Choose a tag to compare

<a name"4.1.0">

4.1.0 (2017-08-03)

Features

v4.0.0

03 Aug 03:30
Compare
Choose a tag to compare

4.0.0 (2017-08-03)

New Features

  • propsAreCssOverrides is now officially exposed and supported allowing you to create your own version of built-in components (like glamorous.Div) that accept props as css. By @kentcdodds in #258
  • withProps API now available to allow you to specify props you want applied to your component. Give this a look! By @kentcdodds in #255
  • shouldClassNameUpdate which is accepted as part of the options in the glamorous function allows you to create a component factory which works kind of like shouldComponentUpdate except instead of skipping render, it will simply skip regenerating the className which can be a nice performance booster if you need. There is room to improve this API further so keep an eye on this. By @kentcdodds in #250.

Performance

  • @tkh44 found a great optimization in #254 by deferring styles resolution and merging to glamor. Rather than using internal APIs. Benchmarks are silly so it's hard to tell how this will impact your app, but you could see ~8% or more perf improvements when mounting and a bit of a bump for re-rendering.

Bug Fixes

  • In some cases, you could wind up with two glamor-generated classNames on a single glamorous component. Fixed by @tkh44 in #254.

Breaking Changes

  • glamorous.config is no longer available. The only configurable option was useDisplayNameInClassName and now, if you're using [email protected] or greater then you'll benefit from the new readable classnames feature automatically when NODE_ENV=development or NODE_ENV is unset. To update your code remove any usage of glamorous.config. By @oalbacha and @kentcdodds in #221 and #247
  • The theme argument is no longer available in dynamic props. Instead, theme is available on props. (Before: glamorous.div((props, theme) => ({fontSize: theme.fontSize})) After: glamorous.div((props) => ({fontSize: props.theme.fontSize})). To update your code run this codemod. By @tdeschryver in #222. Codemod by @tdeschryver and @kentcdodds in #234
  • TypeScript: There are tons of TypeScript improvements and updates. Upgrade glamorous and fix all your violations πŸ˜„ (πŸŽ‰ for static typing)

Typescript

In addition to support for all the new features and breaking changes announced, there has been significant improvements to the coverage of existing typing. With the exception of built-in components (only Div and Svg are available currently) glamorous should now be fully typed.

Glamorous component factory arguments have been improved to no longer accept style objects that are not valid css or svg property sets. #230

Renamed types

  • HTMLGlamorousInterface -> HTMLComponentFactory,
  • StyledFunction -> GlamorousComponentFactory,
  • SVGGlamorousInterface -> SVGComponentFactory

v3.25.0

27 Jul 04:13
Compare
Choose a tag to compare

<a name"3.25.0">

3.25.0 (2017-07-27)

Features

  • getGlamorClassName: use glamor's internal style caching (#254) (6f6803f1)