Skip to content

Releases: mahozad/wavy-slider

v1.3.0

20 Mar 08:51
0d16541
Compare
Choose a tag to compare

Changelog

  • Add support for Kotlin/Wasm target platform
  • Update Compose Multiplatform to 1.6.1
  • Update Kotlin to 1.9.23
  • Update Dokka to 1.9.20

For your convenience, an archive of the library artifacts is also available below.

v1.2.0

15 Mar 15:49
052cc9a
Compare
Choose a tag to compare

Changelog

  • Add a spread / expansion animation on start (along with a new animation spec property to customize it)

    start-animation-demo

    If you want the previous behavior, either keep using wavy slider version 1.1.0 or use a snap animation spec:

    WavySlider(
      animationSpecs = defaultAnimationSpecs.copy(
        waveStartSpreadAnimationSpec = snap()
      ),
      // ...
    )

For your convenience, an archive of the library artifacts is also available below.

v1.1.0

28 Feb 17:53
b301b87
Compare
Choose a tag to compare

Changelog

  • Updated to Compose Multiplatform 1.6.0
  • Added the new overloads that take SliderState as argument
  • Deprecated the Track that accepted value and onValueChange arguments

You may need to annotate your Composable function that uses the WavySlider with @OptIn(ExperimentalMaterial3Api::class).
Also, please update your Compose Multiplatform to 1.6.0 or newer.
If you encounter problems, keep using WavySlider 1.0.0.

For your convenience, an archive of the library artifacts is also available below.

v1.0.0

14 Feb 13:27
8253f91
Compare
Choose a tag to compare

✨ Check out this new multiplatform library for taking screenshot of Composables and Views: Comshot

Changelog

For your convenience, an archive of the library artifacts is also available below.

v1.0.0-rc

01 Feb 17:52
54f718d
Compare
Choose a tag to compare

Changelog

  • Apply the modifier argument of the WavySlider composable functions
  • Add an alias for type of wave velocity (i.e. WaveVelocity for Pair<Dp, WaveDirection>)
    Makes it more readable if you want to use it for function parameters or variable declarations. For example:
    import ir.mahozad.multiplatform.wavyslider.WaveVelocity
    
    fun doSomething(
     // velocity: Pair<Dp, WaveDirection>
        velocity: WaveVelocity
    ) {
     // var newVelocity: Pair<Dp, WaveDirection>? = null
        var newVelocity: WaveVelocity? = null
        newVelocity = 10.dp to TAIL // OR WaveVelocity(10.dp, TAIL)
    }
  • Update Kotlin to 1.9.22
  • Update Compose Multiplatform to 1.5.12 (which is based on Compose 1.5.4)

For your convenience, an archive of the library artifacts is also available below.

v0.10.0

29 Jan 12:31
c8cc64f
Compare
Choose a tag to compare

If you know how, please help optimize the library by creating an issue or a pull request
(the core of the library is the Base.kt file with just about 200 lines of code).

Changelog

  • Fix the bug with wave velocity when its direction is relative (HEAD or TAIL)
    When layout direction changed, the wave did not properly change direction according to its animation spec
  • Fix height calculation when waveHeight is negative (less than 0.dp)
    Reminder: A negative waveHeight is treated like a positive one except with a change in initial wave shift
  • Add KDoc for default properties (SliderDefaults.*)

For your convenience, an archive of the library artifacts is also available below.

v0.9.0

26 Jan 13:49
e2b5e16
Compare
Choose a tag to compare

Changelog

  • Merge wavePeriod and waveMovement parameters into a single waveVelocity parameter
    • It is now more intuitive: a higher Dp means faster, a lower Dp means slower. 0 means stop
    • The speed and direction is now specified as a single argument (like 15.dp to TAIL)
    • The speed unit is Dp per second
    • To stop the movement, set speed to zero or a negative value
    • WaveMovement was renamed to WaveDirection, its STOPPED option removed, and other options renamed
    • The amount of movement is now independent of waveLength
      To make it depend on waveLength, simply set the speed to waveLength or a product of it
    • Dp (in contrast to Duration) can be animated with animateDpAsState (but you don't need to animate it; see the below entry)
  • Add ability to provide custom animation spec for wave velocity (using the new waveVelocityAnimationSpec of animationSpecs parameter)
    • Makes it possible to gracefully/gradually change speed/direction of wave movement
    • It is applied when the speed or the direction or both are changed
    • To get the pervious behavior (immediate/sudden/abrupt change), pass a snap() animation spec
  • Add support for specifying the value range (with the new valueRange parameter) (see #9)
  • Fix a very subtle bug in Material 2 variant when wave height was animated to more than thumb size
  • Add some minor optimizations

For your convenience, an archive of the library artifacts is also available below.

v0.8.0

22 Jan 13:36
83e764b
Compare
Choose a tag to compare

Changelog

  • Rename the wave movement option AUTO to BACKWARD
  • Add a new FORWARD wave movement option
  • Add a new STOPPED wave movement option
    • You can also set wavePeriod to zero to achieve the same thing
  • Add ability to provide custom waveHeight animation spec (with the new animationSpecs parameter)
    • It even makes it possible to use a different animation spec only for when the slider is interacted with (see #8)
  • Rename the parameter shouldFlatten to incremental
  • Fix the bug when wavePeriod is equal to or less than Int.MIN_VALUE milliseconds

For your convenience, an archive of the library artifacts is also available below.

v0.7.0

20 Jan 16:03
7c7c344
Compare
Choose a tag to compare

Changelog

  • Add ability to change wave movement speed or stop it altogether (using the new wavePeriod parameter)
    • Note that the speed of the wave movement will depend on the waveLength
    • Setting to 0.seconds or to a duration outside the range Int.MIN_VALUE..Int.MAX_VALUE.milliseconds stops the animation
  • Rename AnimationDirection to WaveMovement
  • Rename WaveMovement.UNSPECIFIED entry to WaveMovement.AUTO
  • Make waveMovement change smoothly
  • Provide default values for parameters of the default track used for the Material 3 variant
  • Clean and expose default values (you need to import the extension properties)
    • Provide default values for Material 2 variant as extension properties on the existing Material 2 SliderDefaults
    • Provide default values for Material 3 variant as extension properties on the existing Material 3 SliderDefaults
    • Remove WavySliderDefaults used for the Material 3 variant
  • Make trackThickness parameter non-null
    • To provide the default value for it either use SliderDefaults.TrackThickness or do not pass the argument at all
    • To hide the track, use 0.dp or a negative dp
  • Reorder parameters of the Composables

For your convenience, an archive of the library artifacts is also available below.

v0.6.0

18 Jan 16:13
b01e089
Compare
Choose a tag to compare

Changelog

  • Re-implement the wave drawing (see the live Web demo). It provides the following improvements:
    • The tips of the wave now have a smooth finish and a smooth animation
    • When flattened is true, the transition of wave heights is now smooth
    • The wave now has the proper height
    • The component height is also now accurate
  • Update the default values for waveHeight and waveLength
  • Update the animation used for waveHeight change

For your convenience, an archive of the library artifacts is also available below.