Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mahozad committed Jan 24, 2024
1 parent df5bfe4 commit 050ea24
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/generate-publication.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
generate-publication:
name: Generate library publication
# Should be macOS to be able to create IOS variants as well
# Should be macOS to be able to create iOS variants as well
runs-on: macos-latest
env:
# For information about signing.* properties,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
release-version:
name: Release library version
# Should be macOS to be able to create IOS variants as well
# Should be macOS to be able to create iOS variants as well
runs-on: macos-latest
env:
# For information about signing.* properties,
Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
![Kotlin version]
![Compose Multiplatform version]
![Latest Maven Central release]
[![Kotlin version]][Kotlin website]
[![Compose Multiplatform version]][Compose Multiplatform website]
[![Latest Maven Central release]][Library on Maven central repository]

<div align="center">
<img src="demo.svg" alt="Decorative demo"/>
Expand All @@ -20,15 +20,15 @@ Some users call it the **sperm**.

The library can be used in [Jetpack Compose](https://developer.android.com/jetpack/compose) and [Compose Multiplatform](https://github.com/JetBrains/compose-multiplatform) projects like
a regular [Material Slider](https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#Slider(kotlin.Float,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors,androidx.compose.foundation.interaction.MutableInteractionSource)).
Supported target platforms are Android, IOS, Desktop, and JavaScript (Kotlin/JS).
Supported target platforms are Android, iOS, Desktop (JVM), and JavaScript (Kotlin/JS).

## Demo
For a live, interactive Web demo go to https://mahozad.ir/wavy-slider.
For real-world apps in various platforms using the library, see the [showcase](showcase) directory.

## Getting started

For a single-platform project (Android or IOS or Desktop or JS):
For a single-platform project (Android or iOS or Desktop or JS):

```kotlin
dependencies {
Expand Down Expand Up @@ -81,15 +81,20 @@ fun MyComposable() {
waveMovement = FORWARD, // Defaults to BACKWARD
waveThickness = 4.dp, // Defaults to the track thickness
trackThickness = 4.dp, // Defaults to 4.dp
incremental = false // Whether to make waveHeight gradual
incremental = false // Whether to gradually increase waveHeight
)
}
```

## Misc
Similar library (it even has a very similar name): https://github.com/galaxygoldfish/waveslider
Android 13 music player: https://android.googlesource.com/platform/packages/apps/Music/
## Related projects
- Wave slider (similar to ours): https://github.com/galaxygoldfish/waveslider
- Sliders with custom styles: https://github.com/krottv/compose-sliders
- Squiggly text underlines: https://github.com/saket/ExtendedSpans
- Android 13 music app: https://android.googlesource.com/platform/packages/apps/Music/

[Kotlin version]: https://img.shields.io/badge/Kotlin-1.9.21-303030.svg?labelColor=303030&logo=data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAxOC45MyAxOC45MiIgd2lkdGg9IjE4IiBoZWlnaHQ9IjE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxyYWRpYWxHcmFkaWVudCBpZD0iZ3JhZGllbnQiIHI9IjIxLjY3OSIgY3g9IjIyLjQzMiIgY3k9IjMuNDkzIiBncmFkaWVudFRyYW5zZm9ybT0ibWF0cml4KDEgMCAwIDEgLTQuMTMgLTIuNzE4KSIgZ3JhZGllbnRVbml0cz0idXNlclNwYWNlT25Vc2UiPgogICAgPHN0b3Agc3RvcC1jb2xvcj0iI2U0NDg1NyIgb2Zmc2V0PSIuMDAzIi8+CiAgICA8c3RvcCBzdG9wLWNvbG9yPSIjYzcxMWUxIiBvZmZzZXQ9Ii40NjkiLz4KICAgIDxzdG9wIHN0b3AtY29sb3I9IiM3ZjUyZmYiIG9mZnNldD0iMSIvPgogIDwvcmFkaWFsR3JhZGllbnQ+CiAgPHBhdGggZmlsbD0idXJsKCNncmFkaWVudCkiIGQ9Ik0gMTguOTMsMTguOTIgSCAwIFYgMCBIIDE4LjkzIEwgOS4yNyw5LjMyIFoiLz4KPC9zdmc+Cg==
[Compose Multiplatform version]: https://img.shields.io/badge/Compose_Multiplatform-1.5.11-303030.svg?labelColor=303030&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAAAj5JREFUOI2Vk0FIVFEUhv9znBllplBIF7loK1jtJKhFNG/EVtYicNkmKghCMpJGq0HoPcWQVi2KUMqdixaJi0KdXVBILQojs4wCaTGC4LyX+N47fwtFpnEKOnDh3p//fudeDr+QRK3KukGHCscAwCjXi4PphVo+qQZkhzaa61J6m8RhAfpisS01HQOwZin0F29kftYEdDxCsqnkX6HgIonR+YHM00pjzg26oXRBPrNw30ixgM1dgDMcnFFyyIAphpn7xQI2Tw6XW5LQO0L+isPQKxaa1rNDaJCkf02BHhMpzOfTzxUA1GyCxEcFxjcOIu50/b4kZQnkZQJ9mkwuOV5wqaUdYSIhTwBZFto4AOj2R+S7qEwZMNtU8lcoGAPximZHDegAsCjgw7XP/rJFnDHBhEB+AABIIueW35FEdsQ/67hl5jz/AklUrpxX7nfcMp27wYnKO/rHCAwhANDkffW4DPJhZxtV6lpt/N+qCRCND+3RDHs0AEhUHii6KIxXSZnq9PxJTUhetrQ+VrsH4TlAvlgUfd3zAgMau0aD1uLNhm8WBm0CjBDoiSN8ijReJHBaRAYtTB8pFvaXukaDVgMadwFC6bWIM47n54GWaHYgM5CwunaASwBe1yXQNptPewDgeH7eIs4IpXcXMDeYnl5vzhxTINCUv+B4/vkXtxpWQEwK8Phlf3o15wbdmvLfCFgfh5njc4Pp6e3mVWHqHN44AOidnTC9NVpJRE+BKP0zTNW1HWc8IMxIvfq3OP8GvjkzgYHHZZMAAAAASUVORK5CYII=
[Latest Maven Central release]: https://img.shields.io/maven-central/v/ir.mahozad.multiplatform/wavy-slider?label=Maven%20Central&labelColor=303030&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDE2IDE2IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPgogIDxkZWZzPgogICAgPHN0eWxlPi5he2ZpbGw6bm9uZTt9LmJ7Y2xpcC1wYXRoOnVybCgjYSk7fS5je2ZpbGw6I2ZmZjt9PC9zdHlsZT4KICAgIDxjbGlwUGF0aCBpZD0iYSI+CiAgICAgIDxyZWN0IGNsYXNzPSJhIiB4PSIxNC43IiB5PSIxMSIgd2lkdGg9IjE3MSIgaGVpZ2h0PSIxNTEiLz4KICAgIDwvY2xpcFBhdGg+CiAgICA8Y2xpcFBhdGggaWQ9ImNsaXBQYXRoMTMiPgogICAgICA8cmVjdCBjbGFzcz0iYSIgeD0iMTQuNyIgeT0iMTEiIHdpZHRoPSIxNzEiIGhlaWdodD0iMTUxIi8+CiAgICA8L2NsaXBQYXRoPgogIDwvZGVmcz4KICA8cGF0aCBjbGFzcz0iYyIgdHJhbnNmb3JtPSJtYXRyaXgoLjE2NCAwIDAgLjE2NCAtOC4zNyAtMS44MSkiIGQ9Im0xMDAgMTEtNDIuMyAyNC40djQ4LjlsNDIuMyAyNC40IDQyLjMtMjQuNHYtNDguOXptMzAuMiA2Ni4zLTMwLjIgMTcuNC0zMC4yLTE3LjR2LTM0LjlsMzAuMi0xNy40IDMwLjIgMTcuNHoiIGNsaXAtcGF0aD0idXJsKCNjbGlwUGF0aDEzKSIvPgo8L3N2Zz4K
[Kotlin website]: https://kotlinlang.org/
[Compose Multiplatform website]: https://www.jetbrains.com/lp/compose-multiplatform/
[Library on Maven central repository]: https://repo1.maven.org/maven2/ir/mahozad/multiplatform/wavy-slider/0.8.0/
4 changes: 2 additions & 2 deletions library/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ kotlin {
browser()
binaries.executable()
}
// Building and publishing for IOS target requires a machine running macOS;
// Building and publishing for iOS target requires a machine running macOS;
// otherwise, the .klib will not be produced and the compiler warns about that.
// See https://kotlinlang.org/docs/multiplatform-mobile-understand-project-structure.html#ios-framework
listOf(
Expand Down Expand Up @@ -110,7 +110,7 @@ tasks.withType<PublishToMavenRepository> {
isMac.also {
if (!isMac) logger.error(
"""
Publishing the library requires macOS to be able to generate IOS artifacts.
Publishing the library requires macOS to be able to generate iOS artifacts.
Run the task on a mac or use the project GitHub workflows for publication and release.
"""
)
Expand Down

0 comments on commit 050ea24

Please sign in to comment.