Skip to content

Commit

Permalink
Merge pull request #531 from bcgov/feature/HAPP-1656-progress-indicator
Browse files Browse the repository at this point in the history
Feature/happ 1656 progress indicator
  • Loading branch information
PINAKIN-KANSARA-EY authored Sep 22, 2023
2 parents c3ea81f + 2baa0b8 commit 7dd8b12
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package ca.bc.gov.bchealth.compose.component

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.CircularProgressIndicator
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import ca.bc.gov.bchealth.compose.BasePreview
import ca.bc.gov.bchealth.compose.theme.HealthGatewayTheme

@Composable
fun HGCircularProgressIndicator(
modifier: Modifier = Modifier
) {
Box(modifier = modifier.fillMaxSize()) {
CircularProgressIndicator(
modifier = Modifier.align(Alignment.Center),
)
}
}

@BasePreview
@Composable
private fun HGCircularProgressIndicatorPreview() {
HealthGatewayTheme {
HGCircularProgressIndicator()
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:OptIn(ExperimentalMaterialApi::class)

package ca.bc.gov.bchealth.ui.healthrecord

import androidx.compose.foundation.layout.Arrangement
Expand Down Expand Up @@ -30,7 +28,7 @@ import androidx.work.WorkManager
import ca.bc.gov.bchealth.R
import ca.bc.gov.bchealth.compose.BasePreview
import ca.bc.gov.bchealth.compose.component.EmptyStateUI
import ca.bc.gov.bchealth.compose.component.HGProgressIndicator
import ca.bc.gov.bchealth.compose.component.HGCircularProgressIndicator
import ca.bc.gov.bchealth.compose.component.HealthRecordItemUI
import ca.bc.gov.bchealth.compose.component.HorizontalFilterGroupUI
import ca.bc.gov.bchealth.compose.component.ImmunizationBannerUI
Expand Down Expand Up @@ -140,6 +138,7 @@ fun HealthRecordScreen(
)
}

@ExperimentalMaterialApi
@Composable
private fun HealthRecordScreenContent(
onPullToRefresh: () -> Unit,
Expand All @@ -161,7 +160,7 @@ private fun HealthRecordScreenContent(
Box(modifier = Modifier.pullRefresh(pullToRefresh)) {

if (uiState.isLoading) {
HGProgressIndicator()
HGCircularProgressIndicator()
} else {
Column(
modifier = modifier
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/java/ca/bc/gov/bchealth/ui/home/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import ca.bc.gov.bchealth.R
import ca.bc.gov.bchealth.compose.BasePreview
import ca.bc.gov.bchealth.compose.component.AnnouncementBannerUI
import ca.bc.gov.bchealth.compose.component.HGProgressIndicator
import ca.bc.gov.bchealth.compose.component.HGCircularProgressIndicator
import ca.bc.gov.bchealth.compose.component.HGTextButton
import ca.bc.gov.bchealth.compose.component.LoginInfoCardUI
import ca.bc.gov.bchealth.compose.component.QuickAccessTileItemUI
Expand Down Expand Up @@ -75,7 +75,7 @@ fun HomeScreen(
}

if (uiState.isLoading) {
HGProgressIndicator(modifier)
HGCircularProgressIndicator(modifier)
} else {
uiState.launchCheckStatus?.let {
when (it) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import ca.bc.gov.bchealth.compose.BasePreview
import ca.bc.gov.bchealth.compose.MyHealthTheme
import ca.bc.gov.bchealth.compose.MyHealthTypography
import ca.bc.gov.bchealth.compose.bold
import ca.bc.gov.bchealth.compose.component.HGProgressIndicator
import ca.bc.gov.bchealth.compose.component.HGCircularProgressIndicator
import ca.bc.gov.bchealth.compose.theme.primaryBlue
import ca.bc.gov.bchealth.compose.theme.statusBlue
import ca.bc.gov.bchealth.compose.theme.white
Expand All @@ -47,7 +47,7 @@ fun QuickAccessManagementScreen(
}

if (uiState.isLoading) {
HGProgressIndicator(modifier)
HGCircularProgressIndicator(modifier)
} else {
QuickAccessManagementContent(uiState.featureWithQuickAccessItems, onClickItem = onClickItem)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.work.WorkManager
import ca.bc.gov.bchealth.R
import ca.bc.gov.bchealth.compose.BasePreview
import ca.bc.gov.bchealth.compose.component.HGProgressIndicator
import ca.bc.gov.bchealth.compose.component.HGCircularProgressIndicator
import ca.bc.gov.bchealth.compose.theme.HealthGatewayTheme
import ca.bc.gov.bchealth.compose.theme.grey
import ca.bc.gov.bchealth.ui.custom.MyHealthClickableText
Expand Down Expand Up @@ -51,7 +51,7 @@ fun RecommendationScreen(
}

if (uiState.isLoading) {
HGProgressIndicator(modifier)
HGCircularProgressIndicator(modifier)
} else {
RecommendationScreenContent(
modifier,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import ca.bc.gov.bchealth.R
import ca.bc.gov.bchealth.compose.BasePreview
import ca.bc.gov.bchealth.compose.MyHealthTheme
import ca.bc.gov.bchealth.compose.MyHealthTypography
import ca.bc.gov.bchealth.compose.component.HGProgressIndicator
import ca.bc.gov.bchealth.compose.component.HGCircularProgressIndicator
import ca.bc.gov.common.model.services.OrganDonorStatusDto

@Composable
Expand Down Expand Up @@ -107,7 +107,7 @@ private fun ServiceScreenContent(
Spacer(modifier = Modifier.height(16.dp))

if (onLoading || organDonorRegistrationDetail == null) {
HGProgressIndicator(modifier)
HGCircularProgressIndicator(modifier)
} else {
OrganDonor(organDonorRegistrationDetail, organDonorFileStatus, onRegisterOnUpdateDecisionClicked = { url ->
onRegisterOnUpdateDecisionClicked(url)
Expand Down
2 changes: 1 addition & 1 deletion scripts/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ versions.compileSdkVersion = 33

//App
versions.versionName = '2.0.0'
versions.versionCode = 211
versions.versionCode = 212
versions.localApiVersion = 2

//Tools & Libs
Expand Down

0 comments on commit 7dd8b12

Please sign in to comment.