baianat / verte

🎨 A Color picker component. Built from the bottom to work with Vue.js.
https://baianat.github.io/verte/
MIT License
181 stars 42 forks source link

feat: color-history #27

Closed logaretm closed 5 years ago

logaretm commented 5 years ago

This PR introduces a couple of breaking changes and major enhancement to the color-history API.

Breaking Changes

as a replacement, two new props have been added:

New Features

20 Disabled the ability to provide shareable colors after the app is bootstrapped, which prevents lazy components or dynamic ones from specifying the recent colors.

The new colorHistory prop allows the user to pass an array of color strings which will be used as the source of the history, the internal store implemented in #20 will be ignored and local data will be used to control the recent colors. This means all verte components passing colorHistory will be isolated and will not share the same colors.

The use of .sync modifier will solve this problem:

<Verte :showHistory="true" :colorHistory.sync="list"></Verte>

<Verte :showHistory="true" :colorHistory.sync="list"></Verte>

This allows the developer to be able to maintain and control the recent colors as they see fit.

The docs have been updated to reflect those changes.

closes #26

codecov-io commented 5 years ago

Codecov Report

Merging #27 into master will decrease coverage by 0.33%. The diff coverage is 43.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #27      +/-   ##
==========================================
- Coverage   31.56%   31.23%   -0.34%     
==========================================
  Files           6        6              
  Lines         415      429      +14     
  Branches       68       73       +5     
==========================================
+ Hits          131      134       +3     
- Misses        273      284      +11     
  Partials       11       11
Impacted Files Coverage Δ
src/store.js 61.11% <33.33%> (ø) :arrow_up:
src/components/Verte.vue 30.61% <44.44%> (-1.54%) :arrow_down:

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 0f9922d...fad914a. Read the comment docs.

wildhart commented 5 years ago

Can the version number be bumped so I can update npm to try this?

Side note: since the API seems to be changing more rapidly than the docs, could a release notes or version history be added to the README.md so that developers can see what changing when they update? Thanks.