Reorder artifact detail: chapters and translations first

Move the Chapters and Translations sections to the top of the artifact
detail screen and the descriptive Details and Versions sections to the
bottom, so the actionable content leads.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Kgothatso NgakoandClaude Opus 4.8 committed 2026-07-26 02:46:16 +02:00
1 parent dc23295d6e
commit 3370e354c3
1 file changed
+44 -44
@@ -104,50 +104,6 @@ fun ArtifactDetailScreen(
modifier = Modifier.padding(innerPadding).fillMaxSize().padding(20.dp),
verticalArrangement = Arrangement.spacedBy(10.dp)
) {
// Details
item {
Text(
text = "Details",
style = MaterialTheme.typography.labelMedium
)
}
item {
Card {
DetailRow(label = "Name", value = artifact.name)
DetailRow(label = "Url", value = artifact.url)
DetailRow(label = "Visibility", value = artifact.visibility)
DetailRow(label = "License", value = artifact.license)
DetailRow(label = "Dialect", value = artifact.dialectId)
DetailRow(label = "Author", value = artifact.publicKey)
DetailRow(label = "Created", value = artifact.createdAt.toString())
}
}
// Versions
item {
Text(
text = "Versions",
style = MaterialTheme.typography.labelMedium
)
}
if (artifactDetailUIState.versions.isEmpty()) {
item { Text("No versions.") }
} else {
items(
items = artifactDetailUIState.versions,
key = { version -> version.id }
) { version ->
Card {
ListItem(
headlineContent = { Text(version.versionLabel) },
overlineContent = { Text("Version") }
)
}
}
}
item { HorizontalDivider() }
// Chapters
item {
Text(
@@ -278,6 +234,50 @@ fun ArtifactDetailScreen(
Text("Add Translation")
}
}
item { HorizontalDivider() }
// Details
item {
Text(
text = "Details",
style = MaterialTheme.typography.labelMedium
)
}
item {
Card {
DetailRow(label = "Name", value = artifact.name)
DetailRow(label = "Url", value = artifact.url)
DetailRow(label = "Visibility", value = artifact.visibility)
DetailRow(label = "License", value = artifact.license)
DetailRow(label = "Dialect", value = artifact.dialectId)
DetailRow(label = "Author", value = artifact.publicKey)
DetailRow(label = "Created", value = artifact.createdAt.toString())
}
}
// Versions
item {
Text(
text = "Versions",
style = MaterialTheme.typography.labelMedium
)
}
if (artifactDetailUIState.versions.isEmpty()) {
item { Text("No versions.") }
} else {
items(
items = artifactDetailUIState.versions,
key = { version -> version.id }
) { version ->
Card {
ListItem(
headlineContent = { Text(version.versionLabel) },
overlineContent = { Text("Version") }
)
}
}
}
}
}
}