Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: [DOCS] Integrate documentation in develop #309

Merged
merged 50 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
598308f
update README.md latest version to 0.2 (#244)
andresmr May 15, 2024
d427434
ci: align Sonatype secret name with organization wide name (#264)
xavimolloy Jul 3, 2024
fb271f5
ci: fix maven publish (#265)
xavimolloy Jul 3, 2024
2d3d0a1
ci: trigger deployment on push on main branch (#266)
xavimolloy Jul 4, 2024
681f3c3
ci: modify publish maven script for snapshot generation in 0.2 (#267)
xavimolloy Jul 4, 2024
683f2dd
fix: [ANDROAPP-6104] add commit patch from develop (#268)
xavimolloy Jul 4, 2024
7c0b2bd
fix: [ANDROAPP-6271] crash when date format make year out of range (#…
xavimolloy Jul 4, 2024
5d10a57
fix: [ANDROAPP-6305] Take into account invalid date formats (#270)
xavimolloy Jul 5, 2024
2c24ab2
fix: [ANDROAPP-6124] change phone number input keyboard to phone (#271)
xavimolloy Jul 5, 2024
c72f70d
ci: [ANDROAPP-6305] prepare for release publication (#272)
xavimolloy Jul 5, 2024
c180732
Add a placeholder generate paparazzi golden images workflow (#278)
msasikanth Jul 11, 2024
5f0172d
ci: remove continuous-deployment trigger on main, update README.md (#…
xavimolloy Jul 16, 2024
a1fca6d
Merge branch 'refs/heads/main' into release/0.3.0
andresmr Aug 26, 2024
240431b
Merge pull request #288 from dhis2/release/0.3.0
andresmr Aug 26, 2024
787676b
Docs minimum structure
vgarciabnz Sep 2, 2024
6886f33
Add api docs
vgarciabnz Sep 2, 2024
e07d7f6
Remove on_pull_request trigger
vgarciabnz Sep 2, 2024
c6253fa
Merge pull request #291 from dhis2/devs-docs
vgarciabnz Sep 2, 2024
68195be
Change icon
vgarciabnz Sep 2, 2024
44d056d
Merge pull request #292 from dhis2/api-docs
vgarciabnz Sep 2, 2024
a20e5a1
docs: [ANDROAPP-6451] Initial documentation
andresmr Sep 23, 2024
66ccfd0
docs: [ANDROAPP-6451] Initial documentation
andresmr Sep 25, 2024
b23b3a2
docs: [ANDROAPP-6451] Initial documentation
andresmr Sep 25, 2024
4433dfe
docs: [ANDROAPP-6451] Review internal classes visibility
andresmr Sep 25, 2024
d947fd9
docs: make functions internal
andresmr Sep 26, 2024
60a524d
ci:[ANDROAPP-6258] Publish release on github (#303)
andresmr Sep 27, 2024
eae8f84
docs: [ANDROAPP-6442] refactor classes (#304)
andresmr Sep 27, 2024
7df54d8
Update README.md
andresmr Sep 27, 2024
f1dc27b
docs: remove deprecated components
andresmr Sep 27, 2024
e42926c
Improve Demo section
vgarciabnz Sep 27, 2024
01fc0c6
Resize images
vgarciabnz Sep 27, 2024
10e0f3e
Resize images
vgarciabnz Sep 27, 2024
52b67d4
Rearrage image
vgarciabnz Sep 27, 2024
491b8b2
Fix sentence
vgarciabnz Sep 27, 2024
85550aa
[docs]: Adds demo and design-system pages (#306)
marcamsn Oct 1, 2024
5324504
Improve design system image and remove WIP components (#308)
marcamsn Oct 2, 2024
1449b6c
Remove explicit web support statement
vgarciabnz Oct 3, 2024
cc6f574
Add API image
vgarciabnz Oct 3, 2024
27b2912
Explain a bit more the API structure
vgarciabnz Oct 3, 2024
570aead
Merge pull request #302 from dhis2/docs
vgarciabnz Oct 3, 2024
7d176c3
Improve sidebar titles
vgarciabnz Oct 8, 2024
1b3c138
Replace demo by showcase
vgarciabnz Oct 8, 2024
d5f5554
Improve dev documentation, refresh Figma library link, and ensure Jav…
marcamsn Oct 8, 2024
0f59819
Adding Java XML compatibility
marcamsn Oct 8, 2024
1d72230
Merge pull request #313 from dhis2/update-dev-info-and-figma-link-docs
vgarciabnz Oct 8, 2024
98ef1f2
Merge branch 'main' into docs
vgarciabnz Oct 8, 2024
9347f7e
Merge branch 'develop' into docs
andresmr Oct 17, 2024
b8db43c
update docs with develop
andresmr Oct 17, 2024
65d29cc
Add github action to rebuild docs on change
vgarciabnz Oct 18, 2024
77fb20c
docs: ktlint format
andresmr Oct 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 46 additions & 9 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
# This is a basic workflow to help you get started with Actions

name: Continuous deployment

# Controls when the workflow will run
env:
main_project_module: android

on:
push:
branches:
- develop
- develop # Automatically generates snapshot versions

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
workflow_dispatch: ## manually generates release versions
inputs:
release_version:
description: 'Please, enter the release version'
required: true
type: string

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
publish:
publish-maven:
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand All @@ -41,3 +43,38 @@ jobs:
OSSRH_PASSWORD: ${{ secrets.SONATYPE_OSSRH_PASSWORD }}
SIGNING_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }}
SIGNING_PASSWORD: ${{ secrets.PGP_PASSPHRASE }}

publish_github:
runs-on: ubuntu-latest
if: ${{ (inputs.release_version) && (inputs.release_version != '') }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: 'gradle'

- name: Change wrapper permissions
run: chmod +x ./gradlew

- name: Build Android (APK) - ${{ env.main_project_module }} module
run: ./gradlew assembleDebug

- name: Rename APK
run: |
mv ${{ env.main_project_module }}/build/outputs/apk/debug/android-debug.apk ${{ env.main_project_module }}/build/outputs/apk/debug/ui-components-android-${{ inputs.release_version }}.apk


- name: Github Release
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
draft: true
generateReleaseNotes: true
name: "Release notes - DHIS2 Design system: ${{ inputs.release_version }}"
tag: ${{ inputs.release_version }}
artifacts: ${{ env.main_project_module }}/build/outputs/apk/debug/ui-components-android-${{ inputs.release_version }}.apk
57 changes: 57 additions & 0 deletions .github/workflows/dokka.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy API docs

on:
push:
branches:
- main
- docs

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
cache: 'gradle'
- name: Change wrapper permission
run: chmod +x ./gradlew

- name: Build Java docs
run: ./gradlew :designsystem:dokkaHtml -PremoveSnapshotSuffix

- name: Organize pages structure
run: |
mkdir _site && mkdir _site/api
cp -r designsystem/build/dokka/html/* _site/api

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
18 changes: 18 additions & 0 deletions .github/workflows/rebuild-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Rebuild developer docs'

on:
push:
branches:
- main
paths:
- 'docs/**'

concurrency:
group: ${{ github.workflow}}-${{ github.ref }}
cancel-in-progress: true

jobs:
rebuild-docs:
runs-on: ubuntu-latest
steps:
- run: curl -X POST -d {} https://api.netlify.com/build_hooks/${{ secrets.NETLIFY_DEVELOPER_DOCS_TOKEN }}
49 changes: 1 addition & 48 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,6 @@
# DHIS2 Mobile UI

> **@dhis2/dhis2-mobile-ui** is
> a [Compose Multiplatform](https://www.jetbrains.com/lp/compose-multiplatform/) DHIS2 design system
> library for [Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) applications.

**DHIS2 Mobile UI library** is based in
the [DHIS2 Mobile Design System Figma library](https://www.figma.com/file/eRk6bt0B8BJlTO9PZXirHN/DHIS2-Mobile-Design-System).

This library currently supports **desktop** and **Android** targets, in the next versions it will
support **iOS** and **web**.

## Installation

In the module **build.gradle.kts**:

```kotlin
dependencies {
implementation("org.hisp.dhis.mobile:designsystem:0.2")
}
```

# Usage

```kotlin
setContent {
DHIS2Theme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = SurfaceColor.Container
) {
Components()
}
}
}
```

```kotlin
Button(
text = provideStringResource("show_more"),
icon = {
Icon(
painter = provideDHIS2Icon(resourceName = "dhis2_blood_a_n_positive"),
contentDescription = ""
)
},
style = ButtonStyle.KEYBOARDKEY
) {}
```
Dhis2 Mobile UI library documentation, installation and usage is explained in [DHIS2 Developer portal](https://developers.dhis2.org/mobile/mobile-ui/overview)

## Compose Compiler Reports

Expand Down
48 changes: 48 additions & 0 deletions assets/logo-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import org.hisp.dhis.mobile.ui.designsystem.component.DateTimeActionType
import org.hisp.dhis.mobile.ui.designsystem.component.InputDateTime
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.SelectableDates
import org.hisp.dhis.mobile.ui.designsystem.component.internal.DateTimeTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.internal.DateTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.internal.TimeTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.model.DateTimeTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.model.DateTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.model.TimeTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.state.InputDateTimeData
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberInputDateTimeState

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.InputNumber
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.internal.RegExValidations
import org.hisp.dhis.mobile.ui.designsystem.component.model.RegExValidations

@Composable
fun InputNumberScreen() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ import org.hisp.dhis.mobile.ui.designsystem.component.AvatarStyleData
import org.hisp.dhis.mobile.ui.designsystem.component.Button
import org.hisp.dhis.mobile.ui.designsystem.component.ButtonStyle
import org.hisp.dhis.mobile.ui.designsystem.component.ExpandableItemColumn
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.ListCardDescriptionModel
import org.hisp.dhis.mobile.ui.designsystem.component.ListCardTitleModel
import org.hisp.dhis.mobile.ui.designsystem.component.MetadataAvatarSize
import org.hisp.dhis.mobile.ui.designsystem.component.VerticalInfoListCard
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberAdditionalInfoColumnState
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberListCardState
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ import org.hisp.dhis.mobile.ui.designsystem.component.Button
import org.hisp.dhis.mobile.ui.designsystem.component.ButtonStyle
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.ListCard
import org.hisp.dhis.mobile.ui.designsystem.component.ListCardDescriptionModel
import org.hisp.dhis.mobile.ui.designsystem.component.ListCardTitleModel
import org.hisp.dhis.mobile.ui.designsystem.component.MetadataAvatarSize
import org.hisp.dhis.mobile.ui.designsystem.component.SelectionState
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberAdditionalInfoColumnState
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberListCardState
import org.hisp.dhis.mobile.ui.designsystem.resource.provideDHIS2Icon
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.hisp.dhis.mobile.ui.designsystem.component.CheckBoxData
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.DateTimeActionType
import org.hisp.dhis.mobile.ui.designsystem.component.DropdownItem
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.InputAge
import org.hisp.dhis.mobile.ui.designsystem.component.InputBarCode
import org.hisp.dhis.mobile.ui.designsystem.component.InputCheckBox
Expand All @@ -35,8 +36,7 @@ import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.InputStyle
import org.hisp.dhis.mobile.ui.designsystem.component.InputText
import org.hisp.dhis.mobile.ui.designsystem.component.RadioButtonData
import org.hisp.dhis.mobile.ui.designsystem.component.internal.DateTimeTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.model.DateTimeTransformation
import org.hisp.dhis.mobile.ui.designsystem.component.parameter.ParameterSelectorItem
import org.hisp.dhis.mobile.ui.designsystem.component.parameter.model.ParameterSelectorItemModel
import org.hisp.dhis.mobile.ui.designsystem.component.parameter.model.ParameterSelectorItemModel.Status.CLOSED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import androidx.compose.ui.graphics.painter.BitmapPainter
import androidx.compose.ui.graphics.painter.Painter
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.InputMatrix
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import androidx.compose.ui.graphics.painter.BitmapPainter
import androidx.compose.ui.graphics.painter.Painter
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnComponentContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.InputSequential
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor

@Composable
Expand Down
20 changes: 20 additions & 0 deletions designsystem/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.jetbrains.dokka.gradle.DokkaTask

version = rootProject.version
group = rootProject.group

Expand Down Expand Up @@ -81,3 +83,21 @@ android {
jvmToolchain(17)
}
}

tasks.withType(DokkaTask::class).configureEach {
dokkaSourceSets {
configureEach {
moduleName.set("Mobile UI")
}
}
val dokkaBaseConfiguration = """
{
"customAssets": ["${file("../assets/logo-icon.svg")}"]
}
"""
pluginsMapConfiguration.set(
mapOf(
"org.jetbrains.dokka.base.DokkaBase" to dokkaBaseConfiguration,
),
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import androidx.compose.runtime.remember
import androidx.compose.ui.platform.LocalView

@Composable
actual fun keyboardAsState(): State<Keyboard> {
internal actual fun keyboardAsState(): State<Keyboard> {
val keyboardState = remember { mutableStateOf(Keyboard.Closed) }
val view = LocalView.current
DisposableEffect(view) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import org.hisp.dhis.mobile.ui.designsystem.component.AvatarStyleData
import org.hisp.dhis.mobile.ui.designsystem.component.Button
import org.hisp.dhis.mobile.ui.designsystem.component.ButtonStyle
import org.hisp.dhis.mobile.ui.designsystem.component.ExpandableItemColumn
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.ListCardDescriptionModel
import org.hisp.dhis.mobile.ui.designsystem.component.ListCardTitleModel
import org.hisp.dhis.mobile.ui.designsystem.component.MetadataAvatarSize
import org.hisp.dhis.mobile.ui.designsystem.component.VerticalInfoListCard
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberAdditionalInfoColumnState
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberListCardState
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.graphics.painter.BitmapPainter
import androidx.compose.ui.platform.LocalContext
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.InputMatrix
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.graphics.painter.BitmapPainter
import androidx.compose.ui.platform.LocalContext
import org.hisp.dhis.mobile.ui.designsystem.component.ColumnScreenContainer
import org.hisp.dhis.mobile.ui.designsystem.component.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.component.InputSequential
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.internal.ImageCardData
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor
import org.junit.Rule
import org.junit.Test
Expand Down
Loading
Loading