1package soy.iko.opencode.ui.components
3import androidx.compose.foundation.layout.size
4import androidx.compose.material3.CircularProgressIndicator
5import androidx.compose.material3.MaterialTheme
6import androidx.compose.runtime.Composable
7import androidx.compose.ui.Modifier
8import androidx.compose.ui.graphics.Color
9import androidx.compose.ui.semantics.contentDescription
10import androidx.compose.ui.semantics.semantics
11import androidx.compose.ui.unit.dp
12import androidx.compose.ui.res.stringResource
13import soy.iko.opencode.R
16 * The single source of truth for indeterminate loading spinners across the app. Always sets a
17 * [contentDescription] so TalkBack announces progress (a bare [CircularProgressIndicator] is
18 * announced only inconsistently, especially when inlined inside a Button or replacing an icon),
19 * and uses a small set of canonical size/stroke combinations from [LoadingSize].
23 size: LoadingSize = LoadingSize.Medium,
24 modifier: Modifier = Modifier,
25 color: Color = CircularProgressIndicatorDefaults.color,
27 val label = stringResource(R.string.loading)
28 CircularProgressIndicator(
31 .semantics { contentDescription = label },
32 strokeWidth = size.strokeDp.dp,
37private object CircularProgressIndicatorDefaults {
39 @Composable get() = MaterialTheme.colorScheme.primary
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list