Skip to content

Commit

Permalink
docs: Update documentation version and URL
Browse files Browse the repository at this point in the history
  • Loading branch information
andresmr committed Jan 14, 2025
1 parent bab6a5d commit 89b0198
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.lazy.LazyListState
import androidx.compose.foundation.lazy.itemsIndexed
import androidx.compose.foundation.lazy.rememberLazyListState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
Expand All @@ -39,6 +38,7 @@ import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.TableTheme
import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.TableTheme.tableSelection
import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.compositions.LocalTableResizeActions
import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.internal.extensions.fixedStickyHeader
import org.hisp.dhis.mobile.ui.designsystem.theme.Shape

/**
* Composable function to display a table.
Expand Down Expand Up @@ -68,7 +68,7 @@ internal fun Table(
modifier = Modifier
.fillMaxSize()
.background(Color.White)
.clip(RoundedCornerShape(8.dp)),
.clip(Shape.Small),
) {
val resizeActions = LocalTableResizeActions.current
var tableHeight: Int? by remember { mutableStateOf(null) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.TableView
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.TableTheme

/**
Expand All @@ -39,12 +36,7 @@ internal fun TableActions(modifier: Modifier, title: String, actionIcons: @Compo
Text(
modifier = Modifier.weight(1f),
text = title,
style = TextStyle(
color = Color.Black,
fontSize = 14.sp,
fontWeight = FontWeight.Normal,
lineHeight = 10.sp,
),
style = MaterialTheme.typography.bodyMedium,
)
actionIcons()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp
import androidx.compose.ui.zIndex
import org.hisp.dhis.mobile.ui.designsystem.component.IconButton
import org.hisp.dhis.mobile.ui.designsystem.component.table.model.TableModel
import org.hisp.dhis.mobile.ui.designsystem.component.table.model.internal.ResizingCell
import org.hisp.dhis.mobile.ui.designsystem.component.table.model.internal.TableCornerUiState
import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.TableTheme
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing

/**
* Composable function to display the table header row.
Expand Down Expand Up @@ -56,7 +56,7 @@ internal fun TableHeaderRow(
if (isHeaderActionEnabled) {
TableActions(
modifier = Modifier
.padding(bottom = 24.dp),
.padding(bottom = Spacing.Spacing24),
title = tableModel.title,
actionIcons = {
if (TableTheme.dimensions.hasOverriddenWidths(tableModel.id ?: "")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ internal fun TableItemRow(
)
}
if (!rowModel.isLastRow) {
// TODO review if new divider is implemented correctly
HorizontalDivider(
modifier = Modifier
.fillMaxWidth()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.outlined.Expand
import androidx.compose.material3.Icon
Expand All @@ -32,6 +31,8 @@ import androidx.compose.ui.unit.dp
import org.hisp.dhis.mobile.ui.designsystem.component.table.model.internal.ResizingCell
import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.TableDimensions
import org.hisp.dhis.mobile.ui.designsystem.component.table.ui.TableTheme
import org.hisp.dhis.mobile.ui.designsystem.theme.Shape
import org.hisp.dhis.mobile.ui.designsystem.theme.Spacing
import kotlin.math.abs
import kotlin.math.roundToInt

Expand Down Expand Up @@ -64,9 +65,9 @@ internal fun VerticalResizingView(modifier: Modifier = Modifier, provideResizing
}
.background(
color = colorPrimary,
shape = RoundedCornerShape(16.dp),
shape = Shape.Large,
)
.size(14.dp),
.size(Spacing.Spacing14),
imageVector = Icons.Outlined.Expand,
contentDescription = "",
tint = Color.White,
Expand All @@ -92,8 +93,8 @@ internal fun VerticalResizingRule(
Box(
modifier
.fillMaxHeight()
.width(48.dp)
.offset(24.dp)
.width(Spacing.Spacing48)
.offset(Spacing.Spacing24)
.pointerInput(Unit) {
detectDragGestures(
onDragEnd = {
Expand All @@ -117,9 +118,9 @@ internal fun VerticalResizingRule(
.align(Alignment.Center)
.background(
color = TableTheme.colors.primary,
shape = RoundedCornerShape(16.dp),
shape = Shape.Large,
)
.size(14.dp)
.size(Spacing.Spacing14)
.onGloballyPositioned { coordinates ->
positionInRoot = coordinates.positionInRoot()
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ object Spacing {
val Spacing10: Dp = 10.dp
val Spacing11: Dp = 11.dp
val Spacing12: Dp = 12.dp
val Spacing14: Dp = 14.dp
val Spacing16: Dp = 16.dp
val Spacing18: Dp = 18.dp
val Spacing24: Dp = 24.dp
Expand Down

0 comments on commit 89b0198

Please sign in to comment.