Releases: UdaySravanK/RNSwipeButton
Custom title component support
What's Changed
- Added the ability to use a component for the title field same as thum… by @MuratDemirel in #150
New Contributors
- @MuratDemirel made their first contribution in #150
Full Changelog: v3.0.0...v3.0.1
Improved performance, bug fixes, web support and new props
What's Changed
screenReaderEnabledvalue is always being set to true when running the web app. This is breaking the swipe functionality. Removed the 'disable swipe move' gesture when a11y enabled.- Detecting the screen reader status across platforms is inconsistent and unreliable. So, exposing this value to give control to higher level components. New prop:
screenReaderEnabled. This will override the internal code written to detect screen reader enabled or not. - Every container width change goes through an animation with a duration. This is because of listening to width changes through the useEffect. This is also asynchronously updating the width even after pan release. This is causing defects when running in real devices.So, now we have divide width changes into 2 parts.
- While swipe is in progress, we use 0 duration all the time
- For the all other animations we use the provided or default duration value i.e. 400ms.
This will also fix the swipe thumb frozen in the middle on real devices.
PRs
Full Changelog: v2.1.0...v3.0.0
Improved performance & TypeScript
What's Changed
- Update the code to use Memoization APIs such useMemo and useCallback
- Converted the entire source code to TypeScript
- Also, removed the accidentally published tar file from the package
Full Changelog: v2.0.3...v2.1.0
Improved a11y support
- Updated the entire button to receive and act as a normal button instead of just dragable thumb.
- Switching from a11y to normal or vice-versa is not detecting the isA11yEnabled value correctly. So, reading the value again in on Focus.
- Made changes to make the button work better in a11y mode. However, testing with iOS simulator is not going well. A11y status listener event name 'change' has been deprecated. So, updated it to the latest value.
forceCompleteSwipe & reduced package size
-
Added 2 new props to support the force complete functionality.
By using the callback approach, now the swipe gesture can be completed programmatically. This will be helpful to persist the button state a completed operation. When there is a orientation change, the button state will be updated. By using the force complete, we can now show the button as in completed state. Updated the documentation. -
Pass a boolean to indicate how the swipe completed.
Passing a boolean to onSwipeSuccess callback to indicate whether the swipe completed with a real gesture or programmatically using forceCompleteSwipe. -
This would give us more control to differentiate certain operations in the swipe complete callback.
-
Reduced the npm published package size by excluding a lot of unnecessary files.
| v2.0.0 | v2.0.2 | |
|---|---|---|
| Unpacked Size | 42.6 kB | 32.7 kB |
| Total Files | 25 | 10 |
Warning Fixes, Dependency upgrades and 2 lines title support
- Upgraded the react and react-native min required dependencies
- Fixed code analysis warnings. Deprecated defaultProps and thumIconComponent type error.
- Added support to set the max number of lines
Handle the deprecated removeEventListener
Patch release v1.3.8 fixes issue #92
New prop titleMaxFontScale
#68 Supporting large font size
- Introduced a new prop "titleMaxFontScale" to support large font scaling
New prop thumbIconWidth
New prop disableResetOnTap
Fixed git issue #49: Prevent returning to initial state
- Adding a new prop called disableResetOnTap. After swipe success, tap on button resets it. This behavior can be disabled by setting this prop to true.

