Skip to content

Commit 36504f3

Browse files
authored
Merge pull request #20 from monstar-lab-oss/docs/release-preparation
docs: Release preparation
2 parents 383a44f + 8195b69 commit 36504f3

File tree

26 files changed

+413
-65
lines changed

26 files changed

+413
-65
lines changed

.github/workflows/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,5 @@ jobs:
3131
- run: |
3232
chmod +x ./generate_docs.sh
3333
./generate_docs.sh
34-
3534
- run: pip install mkdocs-material
3635
- run: mkdocs gh-deploy --force

.gitignore

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@
88
/.idea/workspace.xml
99
/.idea/navEditor.xml
1010
/.idea/assetWizardSettings.xml
11+
<<<<<<< HEAD
12+
/.idea/misc.xml
13+
/.idea/deploymentTargetDropDown.xml
14+
/.idea/deploymentTargetSelector.xml
15+
=======
1116
/.idea/*
17+
>>>>>>> origin/main
1218
.DS_Store
1319
/build
1420
/captures
@@ -17,5 +23,9 @@
1723
local.properties
1824
/build-logic/convention/build/
1925

20-
# generated dokka files just, ignored just in case
21-
/docs/api/
26+
# Documentation not to be modified by hand (pulled from root project)
27+
docs/index.md
28+
docs/changelog.md
29+
docs/contributing.md
30+
docs/license.md
31+
docs/api/*

CHANGELOG.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
11-
## [0.0.1] - 2024-03-27
12-
1310
### Added
11+
With our first Mosaic Release 🎉 we introduce the first compoment that makes it to the Mosaic Collection: Mosaic Slider.
1412

13+
Mosaic Slider offers a wide range of customization including custom Thumbs, custom Values Distribution and more
1514

1615

17-
## [0.0.0]
18-
### Added
16+
You can learn more about Mosaic on our [documentation page](https://monstar-lab-oss.github.io/android-mosaic/)

CONTRIBUTING.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# How to Contribute
2+
3+
We'd love to accept your patches and contributions to Mosaic, wether its a new component / tool or an update to existing ones! There are
4+
just a few small guidelines you need to follow :)
5+
6+
## New Features/Libraries
7+
8+
Before contributing large new features and/or library please reach out with discussion first.
9+
## Code Reviews
10+
11+
All submissions, including submissions by project members, require review. We
12+
use GitHub pull requests for this purpose. Consult
13+
[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more
14+
information on using pull requests.
15+
16+
### CI/CD Checks
17+
We have a GitHub Actions workflow that is being activated as part of any raised Pull Request, it will run the tests, spotless and detekt checks.
18+
19+
You can also run this locally to make sure the PR will pass these checks:
20+
21+
- Spotless: Run `./gradlew spotlessApply` to apply formatting to the code according to the spec.
22+
23+
- Detekt: Run `./gradlew detekt` to run static code analysis using Detekt.

README.md

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,32 @@
11
# Mosaic
2-
Collection of UI components and utilities for Jetpack Compose
3-
4-
## TODOS
5-
- [x] Project setup
6-
- [x] Convention Plugins
7-
- [ ] Sonarqube
8-
- [x] CI/CD and PR validation, Spotless, Detekt, tests
9-
- [ ] Release management,
10-
- [x] Maven Publish
11-
- [ ] Changelog
12-
- [ ] Tags & Releases
13-
- [x] Documentation setup
142

3+
4+
<p align="center">
5+
<img src="./docs/assets/logo.svg" alt="Mosaic Logo" width="300"/>
6+
</p>
7+
8+
<p align="center" style="font-size: 15px;">
9+
<strong>Mosaic</strong> is acollection of Jetpack Compose UI components and utilities. It is designed to accelerate the development process by providing a rich set of tools and components that are ready to use out of the box. These components are highly customizable ensuring to fit in your use case.
10+
</p>
11+
12+
13+
## Libraries
14+
15+
### 🎛️ [Mosaic Slider](./slider/)
16+
Mosaic Slider is a highly customizable slider component that allows precise customization of values distribution and disabled ranges. Its API is similar to Material sliders, making it easy to integrate into existing projects.
17+
18+
19+
20+
## Contributing
21+
22+
We welcome contributions! Please see our [contributing guidelines](CONTRIBUTING.md) for more details.
23+
24+
## License
25+
26+
Mosaic is licensed under the MIT License. See [LICENSE](LICENSE) for more details.
27+
28+
29+
## Made with ❤️ by
30+
<p>
31+
<img src="./docs/assets/ml_logo.png" alt="Monstarlab Logo" width="300"/>
32+
</p>

build-logic/convention/build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ dependencies {
1212
compileOnly(lib.android.gradle.plugin)
1313
}
1414

15+
kotlin {
16+
jvmToolchain(17)
17+
}
18+
1519
gradlePlugin {
1620
/**
1721
* Register convention plugins so they are available in the build scripts of the application

demo/src/main/java/io/monstarlab/mosaic/features/SliderDemo.kt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ import androidx.compose.ui.tooling.preview.Preview
3939
import androidx.compose.ui.unit.dp
4040
import io.monstarlab.mosaic.slider.Slider
4141
import io.monstarlab.mosaic.slider.SliderColors
42-
import io.monstarlab.mosaic.slider.distribution.CheckPointsValueDistribution
43-
import io.monstarlab.mosaic.slider.distribution.SliderValueDistribution
42+
import io.monstarlab.mosaic.slider.distribution.CheckPointsValuesDistribution
43+
import io.monstarlab.mosaic.slider.distribution.SliderValuesDistribution
4444
import kotlin.math.roundToInt
4545
import androidx.compose.material3.Slider as MaterialSlider
4646

@@ -83,8 +83,8 @@ fun MosaicSliderDemo() {
8383
Modifier
8484
}
8585

86-
val fragmentedDistribution: SliderValueDistribution = remember {
87-
CheckPointsValueDistribution(
86+
val fragmentedDistribution: SliderValuesDistribution = remember {
87+
CheckPointsValuesDistribution(
8888
listOf(
8989
0f to 0f,
9090
0.2f to 500f,
@@ -100,10 +100,11 @@ fun MosaicSliderDemo() {
100100
modifier = modifier,
101101
enabled = enabled,
102102
colors = colors,
103+
103104
range = 0f..1000f,
104105
disabledRange = 50f..300f,
105106
valueDistribution = if (linearDistribution) {
106-
SliderValueDistribution.Linear
107+
SliderValuesDistribution.Linear
107108
} else {
108109
fragmentedDistribution
109110
},

demo/src/main/java/io/monstarlab/mosaic/ui/theme/Theme.kt

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,9 @@ fun MosaicTheme(
3939
dynamicColor: Boolean = true,
4040
content: @Composable () -> Unit,
4141
) {
42-
val colorScheme = when {
43-
dynamicColor && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S -> {
44-
val context = LocalContext.current
45-
if (darkTheme) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
46-
}
47-
48-
darkTheme -> DarkColorScheme
49-
else -> LightColorScheme
50-
}
5142

5243
MaterialTheme(
53-
colorScheme = colorScheme,
44+
colorScheme = DarkColorScheme,
5445
typography = Typography,
5546
content = content,
5647
)
319 KB
Loading

docs/assets/example_distribution.gif

896 KB
Loading

0 commit comments

Comments
 (0)