DRY pass #2, batch 6, F19: Hint, the quiet line under a field (#5372)
CI & Build / Python lint (push) Successful in 2s
CI & Build / Build now, or wait for Android? (push) Successful in 2s
Android / Build, or is the channel already serving this? (push) Successful in 2s
Desktop (Tauri) / Build, or is the channel already serving this? (push) Successful in 2s
CI & Build / Web typecheck and unit tests (push) Successful in 9s
CI & Build / Python tests (push) Successful in 11s
Android / Core and FFI clippy and tests (push) Successful in 34s
CI & Build / integration (push) Successful in 1m37s
CI & Build / Build & push image (push) Skipped
Desktop (Tauri) / Web tests, clippy, Rust tests and rustfmt (push) Successful in 2m2s
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 3m8s
Android / Kotlin + Rust (APK) (push) Failing after 5m1s
Android / Build the server image (push) Successful in 1s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 4m0s
Desktop (Tauri) / Update manifest (push) Successful in 3s

Panel.kt Hint(text, modifier): bodySmall in onSurfaceVariant. That is the
secondary line that the sync pairing form, the sync screen, the update card
and the share sheet each wrote as a full Text(...) at 14 sites. Sites that
add more than a modifier (the link preview's two-line clamp) stay as they
are. So does ShareSheet's own Muted, which is bodyMedium.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 14:51:51 -04:00
co-authored by Claude Opus 5.5
parent 3d03567633
commit 74ee288fd4
5 changed files with 28 additions and 64 deletions
@@ -175,6 +175,20 @@ fun ConfirmDialog(
)
}
/** Secondary text under a field or a heading: smaller, and in the quieter ink. */
@Composable
fun Hint(
text: String,
modifier: Modifier = Modifier,
) {
Text(
text = text,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = modifier,
)
}
/** The three tones a panel or notice can take, mapped onto the note palette. */
enum class Tone { NEUTRAL, WARN, ERROR }
@@ -222,11 +222,7 @@ private fun TargetName(
Column(modifier = modifier) {
Text(text = title, style = MaterialTheme.typography.bodyLarge)
detail?.let {
Text(
text = it,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(it)
}
}
}
@@ -201,11 +201,7 @@ private fun SignInFields(
singleLine = true,
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
)
Text(
text = stringResource(R.string.sync_device_name_help),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.sync_device_name_help))
} else {
PlainTextField(
value = token,
@@ -218,11 +214,7 @@ private fun SignInFields(
imeAction = ImeAction.Done,
),
)
Text(
text = stringResource(R.string.sync_token_help),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.sync_token_help))
}
}
@@ -260,11 +252,7 @@ private fun AddressSection(
Text(stringResource(R.string.sync_check))
}
}
Text(
text = stringResource(R.string.sync_address_help),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.sync_address_help))
}
/** Everything the probe produced: progress, failure, what answered, and the risk. */
@@ -311,11 +299,7 @@ private fun ProbeCard(
fontWeight = FontWeight.SemiBold,
)
version?.let {
Text(
text = stringResource(R.string.sync_server_version, it),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.sync_server_version, it))
}
Text(
text = describeCompatibility(compatibility),
@@ -145,10 +145,8 @@ private fun BuildLine() {
val context = LocalContext.current
val unknown = stringResource(R.string.build_unknown)
val version = remember(context) { context.installedVersionName() ?: unknown }
Text(
Hint(
text = version,
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(bottom = 16.dp),
)
}
@@ -182,11 +180,7 @@ private fun LinkedPanel(
fontWeight = FontWeight.SemiBold,
)
state.linkedAs?.let {
Text(
text = stringResource(R.string.sync_linked_as, it),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.sync_linked_as, it))
}
Text(
text =
@@ -199,11 +193,7 @@ private fun LinkedPanel(
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
if (state.pending) {
Text(
text = stringResource(R.string.sync_unsent),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.sync_unsent))
}
}
@@ -224,11 +214,7 @@ private fun LinkedPanel(
state.lastOutcome?.let { outcome ->
if (state.syncError == null) {
Text(
text = syncSummary(outcome),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(syncSummary(outcome))
}
// Rejections are the server refusing a SPECIFIC change. Surfaced, never
// swallowed, because only a person can resolve them.
@@ -268,10 +254,8 @@ private fun LinkedPanel(
onOutcome = onInstallOutcome,
)
Text(
Hint(
text = stringResource(R.string.sync_footer),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.padding(vertical = 8.dp),
)
@@ -68,18 +68,10 @@ fun UpdateCard(
}
Column(modifier = Modifier.fillMaxWidth().padding(top = 4.dp)) {
Text(
text = stringResource(R.string.update_installed_version, state.installedVersion),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.update_installed_version, state.installedVersion))
if (!state.selfUpdates) {
Text(
text = stringResource(R.string.update_debug_build),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.update_debug_build))
return@Column
}
@@ -95,11 +87,7 @@ fun UpdateCard(
style = MaterialTheme.typography.bodyMedium,
)
} else if (state.upToDate) {
Text(
text = stringResource(R.string.update_current),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
Hint(stringResource(R.string.update_current))
}
if (state.working) {
@@ -204,10 +192,8 @@ private val BANNER_SPINNER = 18.dp
*/
@Composable
fun UnlinkedUpdateNote() {
Text(
Hint(
text = stringResource(R.string.update_needs_server),
style = MaterialTheme.typography.bodySmall,
color = MaterialTheme.colorScheme.onSurfaceVariant,
// Carries the bottom breathing room the connect button used to provide,
// now that it is the last thing on the unlinked screen.
modifier = Modifier.padding(top = 8.dp, bottom = 24.dp),