mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 12:07:09 +00:00
fix(folio): embed accountId in LedgerScreen desc, expose values via text semantics
This commit is contained in:
1 parent
5f197917d8
commit
1089f1a166
1 file changed
+9
-5
+9
-5
@@ -75,7 +75,7 @@ fun LedgerScreen(accountId: String) {
|
|||||||
val balance = balanceOf(txns)
|
val balance = balanceOf(txns)
|
||||||
|
|
||||||
Screen(
|
Screen(
|
||||||
modifier = Modifier.testTag("LedgerScreen").semantics { contentDescription = "LedgerScreen" },
|
modifier = Modifier.testTag("LedgerScreen").semantics { contentDescription = "LedgerScreen:$accountId" },
|
||||||
header = {
|
header = {
|
||||||
Header(
|
Header(
|
||||||
title = account.name,
|
title = account.name,
|
||||||
@@ -92,11 +92,14 @@ fun LedgerScreen(accountId: String) {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
Box(Modifier.size(1.dp).semantics { contentDescription = "active_account:$accountId" })
|
|
||||||
Box(Modifier.size(1.dp).semantics { contentDescription = "ledger_balance:$balance" })
|
|
||||||
Card {
|
Card {
|
||||||
Text("BALANCE", style = Type.label, color = t.textMuted)
|
Text("BALANCE", style = Type.label, color = t.textMuted)
|
||||||
Text(formatCents(balance), style = Type.balance, color = t.text)
|
Text(
|
||||||
|
formatCents(balance),
|
||||||
|
style = Type.balance,
|
||||||
|
color = t.text,
|
||||||
|
modifier = Modifier.semantics { contentDescription = "ledger_balance_display" },
|
||||||
|
)
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
"ACTIVITY",
|
"ACTIVITY",
|
||||||
@@ -138,7 +141,7 @@ private fun TxnRow(id: String, type: TxnType, amount: Long, note: String, date:
|
|||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(vertical = 14.dp)
|
.padding(vertical = 14.dp)
|
||||||
.semantics(mergeDescendants = true) { contentDescription = "ledger_row:$id:$signed" },
|
.semantics { contentDescription = "ledger_row:$id" },
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
horizontalArrangement = Arrangement.spacedBy(12.dp),
|
||||||
) {
|
) {
|
||||||
@@ -166,6 +169,7 @@ private fun TxnRow(id: String, type: TxnType, amount: Long, note: String, date:
|
|||||||
formatCents(signed, signed = true),
|
formatCents(signed, signed = true),
|
||||||
style = Type.bodyStrong,
|
style = Type.bodyStrong,
|
||||||
color = t.text,
|
color = t.text,
|
||||||
|
modifier = Modifier.semantics { contentDescription = "txn_amount" },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user