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 4.0.0 Beta Release #543

Merged
merged 35 commits into from
Oct 4, 2020
Merged

Version 4.0.0 Beta Release #543

merged 35 commits into from
Oct 4, 2020

Conversation

bhough
Copy link
Contributor

@bhough bhough commented Sep 20, 2020

Introducing polished.js v4 beta!

We're super stoked to announce that polished.js v4 is officially in beta! It is available via your package manager of choice:

npm install polished@next
yarn add polished@next

Release Highlights

New Modules

  • New Module: important: Helper for targeting rules in a style block generated by polished modules that need !important-level specificity. Can optionally specify a rule (or rules) to target specific rules.
  • New Modules: easeIn, easeOut, easeInOut: Will replace timingFunctions to allow for smaller modules for specific use cases instead of the larger, more general original implementation. ([Feature Request] Alias timing functions with 'ease' and allow percentage based easing #402)

Improvements & Bug Fixes

Future Deprecations

  • timingFunctions: This will be deprecated in v5 in favor of easeIn, easeOut, easeInOut.

Breaking Changes

  • fontFace: default is now to look for a local font of the same family-name before downloading. Can be turned
    off by passing null to localFonts. Previously, if localFonts was not passed explcitily, it would never check.
  • cssVar: deprecated passThrough in favor of being able to pass a defaultValue to better mimic CSS variable functionality.
  • math: square root, factorial, and exponent have been moved to a separate symbol preset found at math/presets/exponentialSymbols/. This can be passed a second parameter to math to restore this functionality.
  • readableColor: now defaults strict to true be default.

Contributor Improvements

  • Testing: We've moved away from snapshot testing to explicit expects. This should be understanding if your tests are truly passing much easier.
  • prettier: We've implemented .prettierrc and .prettierignore to better control formatting in development environments.
  • Build Speed: Build speed has been improved my removing extraneous linting scripts.

Beta Period

We are releasing this as a beta to allow the community to test the changes, and make any last-minute accommodations for the breaking changes. In the past, our biggest challenge with any new release has been typings. We are hoping this beta will allow those issues to be addressed before a full release. We expect this beta period to last around 2 weeks.

Coming In v5

v5 will be focused completely on size, speed, and documentation. The biggest change will be the move to submodules. Polished has grown into a large library of helpers, mixins, and color functions. We find ourselves limiting functionality in order to keep bundle size down. By moving to submodules we will be able to expand functionality without worrying about the size of the library and provide small bundle impacts for projects that don't implement tree-shaking. As part of this we will finally be revamping the docs to provide dedicated sections for each module with better usage examples.

bhough and others added 26 commits September 16, 2020 07:18
Update dependencies and fix new flow error in triangle.test.js
Fully deprecate returnUnit functionality and refactor return.
Make strict mode default when passing custom colors.
Enable bugfix:true in build and target explicit browser list
Default is now to look for a local font of the same family-name before downloading. Can be turned
off by passing null to localFonts.

BREAKING CHANGE: localFont will now be populated by default and may have unexpected behavior.
important helper for targeting specific rules in module returns for adding `!important`-level
specificity.
triangle now returns properties in a way that allows inherit to work by declaring an individual side
for the triangle color.
Allow the user to pass a default value to cssVar for when a variable is not found.
…max (#511)

* chore(library): update dependencies

Update dependencies and fix new flow error in triangle.test.js

* refactor(stripunit): fully deprecate returnUnit

Fully deprecate returnUnit functionality and refactor return.

* refactor(readablecolor): make strict mode default

Make strict mode default when passing custom colors.

* build(babel): enable bugfix: true

Enable bugfix:true in build and target explicit browser list

* build(lint-staged): remove superfulous git add

* build(lerna): lerna init

* feat(normalize): upgrade to normalize 8.0.1

* build(docs): removed documentation.js auto generation

* feat(fontface): now defaults to looking for local font first

Default is now to look for a local font of the same family-name before downloading. Can be turned
off by passing null to localFonts.

BREAKING CHANGE: localFont will now be populated by default and may have unexpected behavior.

* feat(important): important helper for module rule specificity

important helper for targeting specific rules in module returns for adding `!important`-level
specificity.

* chore(important): update to not mutate original parameter

* chore(important): add to index.js

* fix(triangle): triangle now properly supports inherit

triangle now returns properties in a way that allows inherit to work by declaring an individual side
for the triangle color.

* feat(cssvar): allow a default value for cssVar

Allow the user to pass a default value to cssVar for when a variable is not found.

* fix(between): added error case when to/from unit is different than min/max

Added an error case when the unit for to/fromSize is different than min/maxScreen. This was causing
bad calculations based on the differing scales.

BREAKING CHANGE: If you were using a mix of unit and unitless measure or working with different
units with similar scales (em/rem) you will now get an error where you may have been getting a
seemingly valid calculation.

fix #445
@bhough bhough changed the title Version 4 0 release Version 4.0.0 Beta Release Sep 20, 2020
@codecov
Copy link

codecov bot commented Sep 20, 2020

Codecov Report

Merging #543 into main will increase coverage by 0.12%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main      #543      +/-   ##
===========================================
+ Coverage   99.87%   100.00%   +0.12%     
===========================================
  Files          83        88       +5     
  Lines         832       831       -1     
  Branches      317       305      -12     
===========================================
  Hits          831       831              
+ Misses          1         0       -1     
Flag Coverage Δ
#unittests 100.00% <100.00%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/color/parseToRgb.js 100.00% <ø> (ø)
src/color/getLuminance.js 100.00% <100.00%> (ø)
src/color/hsl.js 100.00% <100.00%> (ø)
src/color/hslToColorString.js 100.00% <100.00%> (ø)
src/color/hsla.js 100.00% <100.00%> (ø)
src/color/meetsContrastGuidelines.js 100.00% <100.00%> (ø)
src/color/mix.js 100.00% <100.00%> (ø)
src/color/readableColor.js 100.00% <100.00%> (ø)
src/color/rgb.js 100.00% <100.00%> (ø)
src/color/rgba.js 100.00% <100.00%> (ø)
... and 36 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 5a5a020...4ffd4b0. Read the comment docs.

@bhough bhough merged commit 10636bd into main Oct 4, 2020
@bhough bhough deleted the version-4-0-release branch October 17, 2020 16:33
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.

2 participants