Category edit dialog: RGB color picker instead of swatch grid #30
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Enhancement
The category add/edit dialog offers a fixed palette of 8 hardcoded swatches in an 8-column
LazyVerticalGrid(app/src/main/java/dev/achmad/ledgerr/ui/screens/category/CategoryScreen.kt:240-292andColorSwatchat lines 320-339). Replace the swatch grid with a full RGB color picker so the user can pick any color.Suggested approach (not prescriptive)
Use
com.github.skydoves:colorpicker-compose(the standard Compose color-picker library; HSL wheel + alpha + preview tile) or a comparable library. Add the dependency togradle/libs.versions.tomland the relevant modulebuild.gradle.kts.Expected behavior
The
CategoryEditDialog'stextslot (CategoryScreen.kt:261-293) shows, in order:OutlinedTextField(unchanged).ColorPicker(or equivalent) bound to the currentcolorstate. Initial color comes frominitial?.color ?: Category.DEFAULT_COLOR_OTHER.colorstate updates live; the existing color preview in the name field's leading icon (or wherever the color is currently shown) reflects the change.The hardcoded
swatcheslist andColorSwatchcomposable in this file can be deleted.Acceptance criteria
DEFAULT_COLOR_*values; the picker is only for new / edited categories.verticalScrolland cap its height to ~280.dp.admin referenced this issue2026-06-28 14:00:13 +00:00