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
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:
@@ -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. */
|
/** The three tones a panel or notice can take, mapped onto the note palette. */
|
||||||
enum class Tone { NEUTRAL, WARN, ERROR }
|
enum class Tone { NEUTRAL, WARN, ERROR }
|
||||||
|
|
||||||
|
|||||||
@@ -222,11 +222,7 @@ private fun TargetName(
|
|||||||
Column(modifier = modifier) {
|
Column(modifier = modifier) {
|
||||||
Text(text = title, style = MaterialTheme.typography.bodyLarge)
|
Text(text = title, style = MaterialTheme.typography.bodyLarge)
|
||||||
detail?.let {
|
detail?.let {
|
||||||
Text(
|
Hint(it)
|
||||||
text = it,
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,11 +201,7 @@ private fun SignInFields(
|
|||||||
singleLine = true,
|
singleLine = true,
|
||||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
|
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
|
||||||
)
|
)
|
||||||
Text(
|
Hint(stringResource(R.string.sync_device_name_help))
|
||||||
text = stringResource(R.string.sync_device_name_help),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
PlainTextField(
|
PlainTextField(
|
||||||
value = token,
|
value = token,
|
||||||
@@ -218,11 +214,7 @@ private fun SignInFields(
|
|||||||
imeAction = ImeAction.Done,
|
imeAction = ImeAction.Done,
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
Text(
|
Hint(stringResource(R.string.sync_token_help))
|
||||||
text = stringResource(R.string.sync_token_help),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -260,11 +252,7 @@ private fun AddressSection(
|
|||||||
Text(stringResource(R.string.sync_check))
|
Text(stringResource(R.string.sync_check))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Text(
|
Hint(stringResource(R.string.sync_address_help))
|
||||||
text = stringResource(R.string.sync_address_help),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Everything the probe produced: progress, failure, what answered, and the risk. */
|
/** Everything the probe produced: progress, failure, what answered, and the risk. */
|
||||||
@@ -311,11 +299,7 @@ private fun ProbeCard(
|
|||||||
fontWeight = FontWeight.SemiBold,
|
fontWeight = FontWeight.SemiBold,
|
||||||
)
|
)
|
||||||
version?.let {
|
version?.let {
|
||||||
Text(
|
Hint(stringResource(R.string.sync_server_version, it))
|
||||||
text = stringResource(R.string.sync_server_version, it),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text = describeCompatibility(compatibility),
|
text = describeCompatibility(compatibility),
|
||||||
|
|||||||
@@ -145,10 +145,8 @@ private fun BuildLine() {
|
|||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val unknown = stringResource(R.string.build_unknown)
|
val unknown = stringResource(R.string.build_unknown)
|
||||||
val version = remember(context) { context.installedVersionName() ?: unknown }
|
val version = remember(context) { context.installedVersionName() ?: unknown }
|
||||||
Text(
|
Hint(
|
||||||
text = version,
|
text = version,
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
modifier = Modifier.padding(bottom = 16.dp),
|
modifier = Modifier.padding(bottom = 16.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -182,11 +180,7 @@ private fun LinkedPanel(
|
|||||||
fontWeight = FontWeight.SemiBold,
|
fontWeight = FontWeight.SemiBold,
|
||||||
)
|
)
|
||||||
state.linkedAs?.let {
|
state.linkedAs?.let {
|
||||||
Text(
|
Hint(stringResource(R.string.sync_linked_as, it))
|
||||||
text = stringResource(R.string.sync_linked_as, it),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
Text(
|
Text(
|
||||||
text =
|
text =
|
||||||
@@ -199,11 +193,7 @@ private fun LinkedPanel(
|
|||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
||||||
)
|
)
|
||||||
if (state.pending) {
|
if (state.pending) {
|
||||||
Text(
|
Hint(stringResource(R.string.sync_unsent))
|
||||||
text = stringResource(R.string.sync_unsent),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -224,11 +214,7 @@ private fun LinkedPanel(
|
|||||||
|
|
||||||
state.lastOutcome?.let { outcome ->
|
state.lastOutcome?.let { outcome ->
|
||||||
if (state.syncError == null) {
|
if (state.syncError == null) {
|
||||||
Text(
|
Hint(syncSummary(outcome))
|
||||||
text = syncSummary(outcome),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
// Rejections are the server refusing a SPECIFIC change. Surfaced, never
|
// Rejections are the server refusing a SPECIFIC change. Surfaced, never
|
||||||
// swallowed, because only a person can resolve them.
|
// swallowed, because only a person can resolve them.
|
||||||
@@ -268,10 +254,8 @@ private fun LinkedPanel(
|
|||||||
onOutcome = onInstallOutcome,
|
onOutcome = onInstallOutcome,
|
||||||
)
|
)
|
||||||
|
|
||||||
Text(
|
Hint(
|
||||||
text = stringResource(R.string.sync_footer),
|
text = stringResource(R.string.sync_footer),
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
modifier = Modifier.padding(vertical = 8.dp),
|
modifier = Modifier.padding(vertical = 8.dp),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -68,18 +68,10 @@ fun UpdateCard(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Column(modifier = Modifier.fillMaxWidth().padding(top = 4.dp)) {
|
Column(modifier = Modifier.fillMaxWidth().padding(top = 4.dp)) {
|
||||||
Text(
|
Hint(stringResource(R.string.update_installed_version, state.installedVersion))
|
||||||
text = stringResource(R.string.update_installed_version, state.installedVersion),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
|
|
||||||
if (!state.selfUpdates) {
|
if (!state.selfUpdates) {
|
||||||
Text(
|
Hint(stringResource(R.string.update_debug_build))
|
||||||
text = stringResource(R.string.update_debug_build),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
return@Column
|
return@Column
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,11 +87,7 @@ fun UpdateCard(
|
|||||||
style = MaterialTheme.typography.bodyMedium,
|
style = MaterialTheme.typography.bodyMedium,
|
||||||
)
|
)
|
||||||
} else if (state.upToDate) {
|
} else if (state.upToDate) {
|
||||||
Text(
|
Hint(stringResource(R.string.update_current))
|
||||||
text = stringResource(R.string.update_current),
|
|
||||||
style = MaterialTheme.typography.bodySmall,
|
|
||||||
color = MaterialTheme.colorScheme.onSurfaceVariant,
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.working) {
|
if (state.working) {
|
||||||
@@ -204,10 +192,8 @@ private val BANNER_SPINNER = 18.dp
|
|||||||
*/
|
*/
|
||||||
@Composable
|
@Composable
|
||||||
fun UnlinkedUpdateNote() {
|
fun UnlinkedUpdateNote() {
|
||||||
Text(
|
Hint(
|
||||||
text = stringResource(R.string.update_needs_server),
|
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,
|
// Carries the bottom breathing room the connect button used to provide,
|
||||||
// now that it is the last thing on the unlinked screen.
|
// now that it is the last thing on the unlinked screen.
|
||||||
modifier = Modifier.padding(top = 8.dp, bottom = 24.dp),
|
modifier = Modifier.padding(top = 8.dp, bottom = 24.dp),
|
||||||
|
|||||||
Reference in New Issue
Block a user