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

Release 0.4.0 #326

Merged
merged 37 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e4982a9
fix: [ANDROAPP-6392] fix typo in DateTimeUtilsTest (#289)
andresmr Aug 26, 2024
c6dfb42
Disable `Save` button when no org is selected
Aug 6, 2024
fa07213
Fix Circle colour to `on-disabled-surface`
Aug 6, 2024
e523249
Hide keyboard when search clear button is clicked
Aug 6, 2024
a08eba3
Fix lint error
Aug 14, 2024
944950f
Merge pull request #285 from dhis2/ANDROAPP-6254-Improve-org-unit-com…
xavimolloy Sep 2, 2024
6944cc5
fix: [ANDROAPP-6390]: showcase app horizontal list card screen improv…
xavimolloy Sep 2, 2024
4ecde28
Merge pull request #294 from dhis2/ANDROAPP-6309-mobile-ui-Adapt-curr…
xavimolloy Sep 4, 2024
d53ddd9
feat: [ANDROAPP-6390] TopBar component (#287)
ferdyrod Sep 6, 2024
33912d2
fix: [ANDROAPP-5394] responsive home (#296)
mmmateos Sep 9, 2024
ec6f196
Androapp 6035 mobile UI create dropdown menu component (#295)
siddh1004 Sep 9, 2024
7b6f23c
Fix date format for `InputAge` component (#298)
siddh1004 Sep 13, 2024
5b330cb
Androapp 6474 mobile UI update org tree bottom sheet button configura…
siddh1004 Sep 18, 2024
95183be
fix: bottom sheet description text alignment (#297)
mmmateos Sep 24, 2024
98b318d
Add animation to show and hide bottom sheet header (#301)
siddh1004 Sep 25, 2024
7889fac
Location search bar (#300)
Balcan Sep 30, 2024
2d15707
Hide keyboard and clear focus on keyboard search btn click (#305)
siddh1004 Oct 1, 2024
6155c82
Add DropDown menu component
Oct 4, 2024
1845433
Fix shape reference
Oct 4, 2024
6f51338
Merge pull request #311 from dhis2/ANDROAPP-6036-Change-app-menus-to-…
xavimolloy Oct 4, 2024
1702990
feat: [ANDROAPP-6399] selectable list card (#307)
mmmateos Oct 7, 2024
647f86a
Fixes for [ANDROAPP-6114] (#310)
Balcan Oct 8, 2024
668a98d
Add parameter to handle bottom sheet header view (#314)
siddh1004 Oct 11, 2024
021760f
Wrap `OrgUnitSelectorItem` in a `key` (#315)
msasikanth Oct 14, 2024
a6e2209
docs: add TopBar documentation (#316)
andresmr Oct 16, 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
64db5b1
Merge pull request #309 from dhis2/docs
andresmr Oct 21, 2024
fad86d7
Merge branch 'develop' into create-start-release-job
andresmr Oct 23, 2024
b16046d
Merge pull request #319 from dhis2/create-start-release-job
xavimolloy Oct 23, 2024
48121cd
feat: Create release start job develop
xavimolloy Oct 23, 2024
7f2c738
Merge pull request #321 from dhis2/modify-release-start-job
andresmr Oct 23, 2024
4f3b1f3
Update version to 0.4.0-SNAPSHOT
dhis2-android Oct 23, 2024
60cf639
fix: [ANDROAPP-6622] add progress to location search (#325)
Balcan Nov 12, 2024
0ce9216
fix: update Location bar component tests and update CI (#329)
xavimolloy Nov 19, 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
3 changes: 2 additions & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@ on:
branches:
- main
- develop
- release/*
pull_request:
branches:
- main
- develop

- release/*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand Down
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 }}
4 changes: 2 additions & 2 deletions .github/workflows/release-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: git checkout -b release/${{ inputs.release_version_name }}

- name: Run Python script to update release branch version
run: python scripts/updateVersionName.py ${{ inputs.release_version_name }}
run: python .github/workflows/scripts/updateVersionName.py ${{ inputs.release_version_name }}

- name: Push
run: |
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
run: git checkout -b update_version_to${{ inputs.development_version_name }}

- name: Run Python script to update base branch version
run: python scripts/updateVersionName.py ${{ inputs.development_version_name }}
run: python .github/workflows/scripts/updateVersionName.py ${{ inputs.development_version_name }}

- name: Commit and Push Changes
run: |
Expand Down
21 changes: 21 additions & 0 deletions android/src/main/java/org/hisp/dhis/android/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.compose.ui.graphics.asImageBitmap
import androidx.compose.ui.platform.LocalContext
import androidx.core.view.WindowCompat
import org.hisp.dhis.common.App
import org.hisp.dhis.mobile.ui.designsystem.component.model.LocationItemModel

class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
Expand All @@ -28,6 +29,26 @@ class MainActivity : AppCompatActivity() {
.also { it.inPreferredConfig = Bitmap.Config.ARGB_8888 },
).asImageBitmap()
},
onLocationRequest = { locationQuery, locationSearchCallback ->

if (locationQuery.isNotBlank()) {
val fakeList = buildList<LocationItemModel> {
repeat(20) {
add(
LocationItemModel.SearchResult(
"Fake Location Title #$it",
"Fake Location Address, Fake Country, Fake City",
0.0,
0.0,
),
)
}
}
locationSearchCallback(fakeList)
} else {
locationSearchCallback(emptyList())
}
},
)
}
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
version = "0.3.0-SNAPSHOT"
version = "0.4.0-SNAPSHOT"
group = "org.hisp.dhis.mobile"

plugins {
Expand Down
2 changes: 1 addition & 1 deletion common/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ kotlin {
implementation(compose.material3)
@OptIn(org.jetbrains.compose.ExperimentalComposeLibrary::class)
implementation(compose.components.resources)
implementation(project(":designsystem"))
api(project(":designsystem"))
}
commonTest.dependencies {
implementation(kotlin("test"))
Expand Down
30 changes: 27 additions & 3 deletions common/src/commonMain/kotlin/org/hisp/dhis/common/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import org.hisp.dhis.common.screens.basicTextInputs.BasicTextInputsScreen
import org.hisp.dhis.common.screens.bottomSheets.BottomSheetsScreen
import org.hisp.dhis.common.screens.buttons.ButtonsScreen
import org.hisp.dhis.common.screens.cards.CardsScreen
import org.hisp.dhis.common.screens.location.LocationSearchBarScreen
import org.hisp.dhis.common.screens.menu.MenuScreen
import org.hisp.dhis.common.screens.others.BadgesScreen
import org.hisp.dhis.common.screens.others.ChipsScreen
import org.hisp.dhis.common.screens.others.IndicatorScreen
Expand All @@ -29,28 +31,44 @@ import org.hisp.dhis.common.screens.others.ProgressScreen
import org.hisp.dhis.common.screens.others.SearchBarScreen
import org.hisp.dhis.common.screens.others.SectionScreen
import org.hisp.dhis.common.screens.others.TagsScreen
import org.hisp.dhis.common.screens.others.TopBarScreen
import org.hisp.dhis.common.screens.parameter.ParameterSelectorScreen
import org.hisp.dhis.common.screens.toggleableInputs.ToggleableInputsScreen
import org.hisp.dhis.mobile.ui.designsystem.component.DropdownItem
import org.hisp.dhis.mobile.ui.designsystem.component.InputDropDown
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.MetadataAvatarSize
import org.hisp.dhis.mobile.ui.designsystem.component.model.LocationItemModel
import org.hisp.dhis.mobile.ui.designsystem.theme.DHIS2Theme
import org.hisp.dhis.mobile.ui.designsystem.theme.Shape
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor

@Composable
fun App(imageBitmapLoader: (() -> ImageBitmap)? = null) {
fun App(
imageBitmapLoader: (() -> ImageBitmap)? = null,
onLocationRequest: (
(
locationQuery: String,
locationSearchCallback: (List<LocationItemModel>) -> Unit,
) -> Unit
)? = null,
) {
DHIS2Theme {
Main(imageBitmapLoader)
Main(imageBitmapLoader, onLocationRequest)
}
}

@Composable
fun Main(
imageBitmapLoader: (() -> ImageBitmap)?,
onLocationRequest: (
(
locationQuery: String,
locationSearchCallback: (List<LocationItemModel>) -> Unit,
) -> Unit
)?,
) {
val currentScreen = remember { mutableStateOf(Groups.NO_GROUP_SELECTED) }
var isComponentSelected by remember { mutableStateOf(false) }
Expand Down Expand Up @@ -79,7 +97,8 @@ fun Main(
state = InputShellState.UNFOCUSED,
expanded = true,
selectedItem = DropdownItem(currentScreen.value.label),
inputStyle = InputStyle.DataInputStyle().apply { backGroundColor = SurfaceColor.SurfaceBright },
inputStyle = InputStyle.DataInputStyle()
.apply { backGroundColor = SurfaceColor.SurfaceBright },
)

when (currentScreen.value) {
Expand All @@ -100,7 +119,12 @@ fun Main(
Groups.TAGS -> TagsScreen()
Groups.SEARCH_BAR -> SearchBarScreen()
Groups.NAVIGATION_BAR -> NavigationBarScreen()
Groups.MENU -> MenuScreen()
Groups.NO_GROUP_SELECTED -> NoComponentSelectedScreen()
Groups.TOP_BAR -> TopBarScreen()
Groups.LOCATION_SEARCH_BAR -> LocationSearchBarScreen { locationQuery, locationCallback ->
onLocationRequest?.invoke(locationQuery, locationCallback)
}
}
} else {
NoComponentSelectedScreen(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@ enum class Groups(val label: String) {
INDICATOR("Indicators"),
PARAMETER_SELECTOR("Parameter selector"),
NAVIGATION_BAR("Navigation Bar"),
TOP_BAR("Top Bar"),
MENU("Menu"),
NO_GROUP_SELECTED("No group selected"),
LOCATION_SEARCH_BAR("Location Search Bar"),
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import org.hisp.dhis.mobile.ui.designsystem.component.AgeInputType
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.InputAge
import org.hisp.dhis.mobile.ui.designsystem.component.InputAgeModel
import org.hisp.dhis.mobile.ui.designsystem.component.InputShellState
import org.hisp.dhis.mobile.ui.designsystem.component.LegendData
import org.hisp.dhis.mobile.ui.designsystem.component.TimeUnitValues
import org.hisp.dhis.mobile.ui.designsystem.component.state.InputAgeData
import org.hisp.dhis.mobile.ui.designsystem.component.state.rememberInputAgeState
import org.hisp.dhis.mobile.ui.designsystem.theme.SurfaceColor

@Composable
Expand All @@ -24,100 +25,108 @@ fun InputAgeScreen() {

ColumnComponentContainer("Input Age Component - Idle") {
InputAge(
InputAgeModel(
title = "Label",
state = rememberInputAgeState(
inputAgeData = InputAgeData(
title = "Label",
),
inputType = inputType,
onValueChanged = { newInputType ->
inputType = newInputType
},
),
onValueChanged = { newInputType ->
inputType = newInputType ?: AgeInputType.None
},
)
}

ColumnComponentContainer("Input Age Component - Idle Disabled") {
InputAge(
InputAgeModel(
title = "Label",
inputType = AgeInputType.None,
state = InputShellState.DISABLED,
onValueChanged = { newInputType ->
inputType = newInputType
},
state = rememberInputAgeState(
inputAgeData = InputAgeData(
title = "Label",
),
inputState = InputShellState.DISABLED,
),
onValueChanged = { newInputType ->
inputType = newInputType ?: AgeInputType.None
},
)
}

ColumnComponentContainer("Input Age Component - Date Of Birth") {
InputAge(
InputAgeModel(
title = "Label",
state = rememberInputAgeState(
inputAgeData = InputAgeData(
title = "Label",
),
inputType = AgeInputType.DateOfBirth(TextFieldValue("01011985")),
state = InputShellState.DISABLED,

onValueChanged = { newInputType ->
inputType = newInputType
},
inputState = InputShellState.DISABLED,
),
onValueChanged = { newInputType ->
inputType = newInputType ?: AgeInputType.None
},
)
}

ColumnComponentContainer("Input Age Component - Date Of Birth Required Error") {
InputAge(
InputAgeModel(
title = "Label",
state = rememberInputAgeState(
inputAgeData = InputAgeData(
title = "Label",
isRequired = true,
),
inputType = AgeInputType.DateOfBirth(TextFieldValue("010")),
state = InputShellState.ERROR,
isRequired = true,

onValueChanged = {
// no-op
},
inputState = InputShellState.ERROR,
),
onValueChanged = {
// no-op
},
)
}

ColumnComponentContainer("Input Age Component - Age Disabled") {
InputAge(
InputAgeModel(
title = "Label",
state = rememberInputAgeState(
inputAgeData = InputAgeData(
title = "Label",
),
inputType = AgeInputType.Age(value = TextFieldValue("56"), unit = TimeUnitValues.YEARS),
state = InputShellState.DISABLED,

onValueChanged = { newInputType ->
inputType = newInputType
},
inputState = InputShellState.DISABLED,
),
onValueChanged = { newInputType ->
inputType = newInputType ?: AgeInputType.None
},
)
}

ColumnComponentContainer("Input Age Component - Age Required Error") {
InputAge(
InputAgeModel(
title = "Label",
state = rememberInputAgeState(
inputAgeData = InputAgeData(
title = "Label",
isRequired = true,
),
inputType = AgeInputType.Age(value = TextFieldValue("56"), unit = TimeUnitValues.YEARS),
state = InputShellState.ERROR,
isRequired = true,

onValueChanged = {
// no-op
},
inputState = InputShellState.ERROR,
),
onValueChanged = {
// no-op
},
)
}

ColumnComponentContainer("Input Age Component - Legend") {
InputAge(
InputAgeModel(
title = "Label",
state = rememberInputAgeState(
inputAgeData = InputAgeData(
title = "Label",
isRequired = true,
),
inputType = AgeInputType.Age(value = TextFieldValue("56"), unit = TimeUnitValues.YEARS),
state = InputShellState.ERROR,
isRequired = true,

onValueChanged = {
// no-op
},
inputState = InputShellState.ERROR,
legendData = LegendData(SurfaceColor.CustomGreen, "Legend", popUpLegendDescriptionData = regularLegendList),
),
onValueChanged = {
// no-op
},
)
}
}
Expand Down
Loading
Loading