ComposeGears / ComposeGears/Valkyrie
No gutter icon and preview if icon created not in the field's getter
Open
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 889
- Forks
- 26
- Avg merge
- 36m
- Merged PRs (30d)
- 2
Description
Env:
Valkyrie version: 0.17.1
IDEA versions:
- IntelliJ IDEA Community Edition 2025.2.3 (252.26830.84)
- Android Studio Narwhal 4 Feature Drop 2025.1.4 (251.27812.49.2514.14217341)
Issue:
Preview and gutter icon isn't rendered in case when icon constructing not in field's getter.
Code of test case
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.materialIcon
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.SolidColor
import androidx.compose.ui.graphics.vector.ImageVector
import androidx.compose.ui.graphics.vector.path
private fun test() {
val icon = Icons.AccordionOpen
}
@Suppress("UnusedReceiverParameter")
val Icons.AccordionOpen: ImageVector
get() = CachedIcon
private val CachedIcon by lazy {
materialIcon(name = "AccordionOpen") {
path(
stroke = SolidColor(Color.Black),
strokeLineWidth = 2f,
) {
moveTo(5.5f, 13.5f)
lineTo(12.5f, 9.5f)
}
path(
stroke = SolidColor(Color.Black),
strokeLineWidth = 2f,
) {
moveTo(18.5f, 13.5f)
lineTo(11.5f, 9.5f)
}
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Kotlin reproducer in the issue, especially the Icons.AccordionOpen getter and the lazily constructed CachedIcon. Trace how Valkyrie discovers icons and renders previews and gutter icons for this case; done means both are rendered when construction occurs outside the field getter.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100