All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added a
noShadow
property that disables the inset drop shadow (which is in fact a gradient) on the inside of the flipping pages.
- Fixed the method to get the mouse/touch position.
- Fixed an event confusion in the
swipeImmune
feature.
- Fixed the
swipeImmune
detection condition.
- Added a
swipeImmune
property thanks to @slevy85. This property is an arary of CSS classes that makes the elements targeted by those classes immune to the swipe. This means the user can not initiate a swipe gesture from those elements.
- The
flipOnTouch
buttons were not working anymore due to some asynchronous refactoring.
- Added a
reverse
property thanks to @slevy85. The property allows the user to swipe pages in reverse order: the first page is visible, to see the second page, he has to swipe down instead of up.
- Tests were not working anymore. Added
babel-core@^7.0.0-bridge.0
andbabel-jest
indevDependencies
.
- Fixed the swiping not being correctly registered.
- Fixed
gotoPreviousPage
&gotoNextPage
method spam. - Fixed right side of component being cut off.
- Condition in
gotoPage
method for checking inbounds of index was wrong, did not allow to go to first page (index0
).
- Call
onStartSwiping
after treshold is reached.
- Added
onStartPageChange
event. This event is triggered when the move gesture begins, in opposition toonPageChange
event which is triggered after the gesture is complete.
- Added the list of contributors to the project, finalizing v1.0.0.
- Added a
gotoPage
method that takes an index of page in parameter. Places the component to the correct page.
- Changed the way page components are rendered. To limit number of renders, the component now uses
PureComponent
s wrapper (higher-order components) for actual pages.
- New property
startAt
.
- Fixed
onPageChange
not passing the correct page number.
- Improve code coverage for
<FlipPage />
from74%
to99%
. onStartSwiping
andonEndSwiping
callback.
- Improve code coverage for
<FlipPage />
from59%
to74%
:mouseLeave()
: 100% coveredreset()
: 100% coveredprops.orientation
: 100% coveredmoveGesture()
: 90% covered (WIP)
- Change
eslintrc
run config, as it was given different error outputs based on the OS of the developer. It was basically changeeslint src/**/*.js* --quiet
toeslint --ext .jsx --ext .js --quiet src/
.
button
s anda
were not clickable.
responsive
property (default tofalse
) to enable responsive mode.- Improve code coverage for
<FlipPage />
:getHeight()
: 100% coveredgetHalfHeight()
: 100% coveredgetWidth()
: 100% coveredgetHalfWidth()
: 100% coveredisLastPage()
: 100% coveredisFirstPage()
: 100% coveredincrementPage()
: 100% covereddecrementPage()
: 100% covereddoNotMove()
: 100% coveredstartMoving()
: 100% covered
- Fix some lint issues on
index.jsx
- Add codecov to the project (@darenju still needs setup it to his github repository)
- Replace the code style badge url fron
standardjs
toairbnb
.
- Added mask on previous/next parts. This way if you go to the drop area, you will see the shadow of the page. This only happened when lifting the page.
- Shadows were not displayed on some parts when swiping. The fix for non-clickable links had caused this.
showTouchHint
property that shows a pointer indicating where to click or touch to switch pages.
flipOnTouchAllowDrag
has been renamed todisableSwipe
. By default, the swipe is always allowed withflipOnTouch
, unlessdisableSwipe
is specified.showTouchHint
has been renamed toshowSwipeHint
to avoid confusion.- Changed default
flipOnTouchZone
from20
to10
.
- Removed
touchHintTimeout
,touchHintTimeoutTimer
,showTouchHint
,hintVisible
as they were useless.
flipOnTouchAllowDrag
propery allowing the user to keep the dragging feature even thoughflipOnTouch
is active.
- Class names on touch zones.
- Add
flipOnTouch
feature. Zones to touch/click are defined by theflipOnTouchZone
property.
- Add
.gitattributes
for windows developers - Add Jest setup
- Add Enzyme setup
- Add
code coverage
report file - Add
check-dependencies
toprebuild
andpretest
lifecycle. This lib checks if the developer has the up-to-date dependencies inside its node_modules directory, as described in thepackage.json
file. - Add TravisCI and Greenkeeper initial setup (@darenju still needs to setup each of these in his repository)
- Add
pre-commit
which runs lint before each commit
- Remove generated code from VCS, as a good practice. The generated code should not be versioned, as it can be checked at Best Practices for Node.js Development
- Temporaly disables lint for a specific line:
src/index.jsx:577:3
. Style is a pretty generic prop, receiving any style the user needs. Ideally, this eslint should be disable if you still have the intent of using this props. Or, the code should be refactored, to match the proper eslint rule
- Issue causing the package to switch back to first page all the time. Issue was because package was not updated to react@16.
- Adjusted properties types.
- Now using eslint as code style.
- Fixed
showTouchHint
always displaying despite property being defined tofalse
.