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

Version 2 Release #347

Merged
merged 39 commits into from Aug 22, 2018
Merged

Version 2 Release #347

merged 39 commits into from Aug 22, 2018

Conversation

bhough
Copy link
Contributor

@bhough bhough commented Aug 22, 2018

This is a major release that introduces new modules, improvements to existing modules, bug fixes, improved TypeScript and Flow Support, and some deprecations.

Breaking Changes

We introduced one necessary breaking change in this release. In the future, we will warn a full major version ahead of time, but this one necessitated an immediate fix. (Un)luckily, it was never working properly in the first place.

  • mix color module now requires a ratio in order to work. It originally tried to default to .5 but this broke in most cases.

Deprecations

These items have been marked for deprecation in v3 of polished.

  • placeholder mixin is no longer required to address gaps in vendor prefixing in major CSS-in-JS libraries.
  • selection mixin is no longer required to address gaps in vendor prefixing in major CSS-in-JS libraries.

These items have been deprecated immediately as the change doesn't introduce any breaking changes. However, you will want to update your code accordingly.

  • normalize no longer accepts excludeOpinionated as a parameter, as opinionated rules have been removed in the latest versions of normalize.css.

New Modules

This release addresses our most popular feature requests as voted on by users. If something you were hoping for didn't make it, you can make your voice heard by 👍a module request in our issues.

Mixins

  • between mixin added to return a CSS calc formula for linear interpolation of a property between two values.
  • cover mixin added to return CSS to fully cover an area similar to background-image: cover.
  • fluidRange mixin added to returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize linearly.

Shorthands

  • border shorthand added to return shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron.

Helpers

  • getValueAndUnit helper added returns a given CSS value and its unit as elements of an array.

New Features

We have made a variety of improvements to existing modules as well.

Mixins

  • fontFace now supports font-display, font-variation-settings, and font-feature-settings.
  • triangle now supports any unit of measure instead of just px. (Thanks @lifeiscontent)
  • normalize has been upgraded to use normalize.css 8.0.

Color Modules

  • All color modules now support hex color values with alpha values (commonly referred to as 8-Digit hex colors).
  • All color modules now support string values for all parameters.
  • mix fixed an issue where mix would not curry properly.

Shorthands

  • transitions now supports applying the same transition to multiple properties in one call.

Bug Fixes

Mixins

  • ellipsis - fixed a bug to avoid potential white-space issues with display: inline-block.
  • normalize - fixed an issue where vendor prefixed values were not properly camel-cased.
  • retinaImage- fixed a bug that was causing background-image to be set to undefined (instead of not set at all) when a background image is not passed.

Flow

  • mix now properly passes flow tests in all cases, including when curried.
  • All Modules now uses the Styles type for better compatibility with CSS-In-JS libraries and their Flow type definitions. (Thanks @vhfmag)
  • All Modules - fixed various issues with typings including improperly declared optional parameters, too loose array definitions, and inadequate object property strictness.
  • All custom types are now exported separately for use elsewhere instead of being embedded with specific modules.

TypeScript

  • TypeScript build now works properly in Windows
  • Added additional TypeScript tests for all modules.
  • TypeScript definitions properly generate regardless of module export policy.
  • All Modules now uses the Styles type for better compatibility with CSS-In-JS libraries and their TypeScript definitions. (Thanks @vhfmag)

Documentation

  • Docs have been upgraded to the latest version of documentation.js and generation should no longer randomly break for contributors.
  • triangle documentation now properly displays.
  • toColorString documentation now properly displays.
  • Variety of clarifications and typo fixes.

bhough and others added 30 commits June 1, 2018 07:07
Removes typescript tests and tsgen auto typing

BREAKING CHANGE: Anyone using typescript will lose typings with this release.

fix #276 #250
Remove doc site and doc autogeneration from build to move to separate repo.

Fix #229
* feat(transitions): Transitions can now apply the same values to multiple properties.

* fix(tests): Update snapshot and linting
Border shorthand for splitting out individual border properties. Especially useful for atmoic css
libraries like Fela and Styletron.

Addresses #264
Add `display: inline-flex` for browsers that support it better handle white-space issues with
`display: inline-block`

Addresses #256
* feat(fontFace): Add missing font-face properties to mixin

Add font-display, font-feature-settings & font-variation-settings to fontDisplay mixin

closes #286

* chore(fontFace): Update fontFace snapshot
All color modules now support string inputs for their amounts(percentage, amount, etc..) and
automatically convert them to ints/floats

Fix #243
Removes typescript tests and tsgen auto typing

BREAKING CHANGE: Anyone using typescript will lose typings with this release.

fix #276 #250
Remove doc site and doc autogeneration from build to move to separate repo.

Fix #229
Border shorthand for splitting out individual border properties. Especially useful for atmoic css
libraries like Fela and Styletron.

Addresses #264
* build(typescript): Removes typescript and tsgen (#295)

Removes typescript tests and tsgen auto typing

BREAKING CHANGE: Anyone using typescript will lose typings with this release.

fix #276 #250

* feat(cover): Adds mixin for cover.

Adds mixin that provides css for fully covering an area, including an optional offset that acts as a
padding.
…iangle mixin (#314)

* Fix link url to contributors' page (#307)

Just noted that link goes wrong, while have meeting with lib, fixed with a cap of tea :)

* docs(babel): add plugin (#308)

* Revert "docs(babel): add plugin (#308)" (#309)

This reverts commit 6083967.

* docs(Roadmap): Update ROADMAP.md to reflect current plan

* docs(Roadmap.md): Fixes for Roadmap.md

* feat(triangle): Add ability to use any units instead of only px to triangle mixin

closes #313

* refactor(triangle): Remove important from css declaration

BREAKING CHANGE: No longer adds important declaration

closes #313
Upgrade to normalize.css 8.0 and fix bug with abbr[title] fallback.

re #315
* feat(color): Add support for 8 CSS hexcolor values (#RRGGBBAA)

* chore(color): Color 8-Digit Hex Tests

Update tests for color modules to test more 8-Digit Hex cases.

* chore(Color): Properly round 8-Digit Hex

Properly round alpha values returned when processing 8-Digit Hex colors.

* chore(colors): Update 8-Digit tests

Updated 8-Digit Hex tests to ensure they match associated rgba values.
* feat(fluidRange): Add css-lock inspired fluidRange

Adds fluidRange mixin that allows the user to leverage css-locks.

* feat(fluidRange): Improved fluidRange

* feat(fluidRange): fluidRange

* chore(fluidRange): more fluidRange work

* chore(fluidRange): Separate between from fluidRange

* chore(fluidRange): Update tests for fluidRange
* chore(deps): Upgrade safe deps

* chore(deps): Upgrade warning deps

* chore(deps): Upgrade unsafe deps

Upgrade unsafe deps except for eslint 5

* chore(eslint): Upgrade eslint

Upgrade eslint and fix rollup config
Fix issues with flow types from module changes and flow upgrade.
* chore(TypeScript): Re-enable tsgen

Re-enabled tsgen to generate TypeScript bindings.

fix #276

* build(build): Use yarn instead of npm

* test(transitions): Add error test to transitions
* docs(documentation.js): Upgrade documentation.js

Upgraded to latest release of documentation.js including fixing/updating the build.

* docs(Docs): Minor doc build fixes

Minor doc template fixes, move build away from `new Buffer`, and update toc.

* docs(docs): Cleanup docs config file
Introducing a breaking change with mix that now requires the weight in order to function. The
previous version that tried to make the first param optional with a fallback broke with Babel
compilation and currying, and also did not provide the original intended API.

BREAKING CHANGE: Mix no longer has a default weight, it must always be provided.
* chore(normalize): Update prefixed properties to camel case.

Fix #332

* chore(Flow): Fix flow errors with fluid range

* chore(Package): Update dependencies
* feat(library): Deprecation warning support

* build(package.json): Add alpha versionining to package.json
* feat(library): Deprecation warning support

* docs(docs): Updated Roadmap and Contributing, Travis config.

* fix(Travis): Move to single node version build
* Alpha release 1 (#340)

* feat(library): Deprecation warning support

* docs(docs): Updated Roadmap and Contributing, Travis config.

* fix(Travis): Move to single node version build

* fix(Typescript): Fix typescript test for normalize
Adds rounding to several color mixins, fixes a bug with retinaImage that was causing backgroundSize
to be set as undefined, and updates deps.
@codecov
Copy link

codecov bot commented Aug 22, 2018

Codecov Report

Merging #347 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #347   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files          70     75    +5     
  Lines         392    424   +32     
  Branches      104    111    +7     
=====================================
+ Hits          392    424   +32
Impacted Files Coverage Δ
src/color/invert.js 100% <ø> (ø) ⬆️
src/shorthands/margin.js 100% <ø> (ø) ⬆️
src/color/desaturate.js 100% <ø> (ø) ⬆️
src/shorthands/buttons.js 100% <ø> (ø) ⬆️
src/color/setSaturation.js 100% <ø> (ø) ⬆️
src/color/adjustHue.js 100% <ø> (ø) ⬆️
src/shorthands/position.js 100% <ø> (ø) ⬆️
src/shorthands/size.js 100% <ø> (ø) ⬆️
src/shorthands/backgroundImages.js 100% <ø> (ø) ⬆️
src/shorthands/textInputs.js 100% <ø> (ø) ⬆️
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 078e920...d439365. Read the comment docs.

@bhough bhough merged commit 82d4362 into master Aug 22, 2018
@bhough bhough deleted the version-2 branch August 24, 2018 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants