Skip to content

feat: create TaskItem composable with tests#187

Merged
MessiasLima merged 7 commits into
mainfrom
opencode/issue128-20260715173240
Jul 20, 2026
Merged

feat: create TaskItem composable with tests#187
MessiasLima merged 7 commits into
mainfrom
opencode/issue128-20260715173240

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Done! Here's a summary of what was implemented:

TaskItem Composable

  • Created at foliary/src/commonMain/kotlin/dev/appoutlet/foliary/core/ui/component/task/TaskItem.kt
  • Wrapped in the existing FoliaryCard for consistent rounded-corner styling with border and shadow
  • Checkbox on the start side using Checkbox(checked = isCompleted, onCheckedChange = null) — display-only, no interaction logic
  • Title with single-line ellipsis; when isCompleted = true, the title gets TextDecoration.LineThrough and reduced opacity (0.38f)
  • Description (optional) capped at maxLines = 3 with TextOverflow.Ellipsis
  • Overdue pill (red, using errorContainer/onErrorContainer) shown only when isOverdue = true and isCompleted = false
  • Includes @Preview variants for default, overdue, and completed states

String resources

  • Added task_item_overdue to strings.xml

Compose UI tests

  • Created at foliary/src/commonTest/kotlin/dev/appoutlet/foliary/core/ui/component/task/TaskItemTest.kt
  • Tests cover:
    • Title and description rendering
    • Description hidden when null
    • Checkbox presence
    • Overdue pill shown only when overdue and not completed
    • Completed state rendering (checkbox + distinct title styling)

All 7 JVM tests pass successfully.

Closes #128

New%20session%20-%202026-07-15T17%3A32%3A39.928Z
opencode session  |  github run

Co-authored-by: MessiasLima <MessiasLima@users.noreply.github.com>
@MessiasLima MessiasLima changed the title Added TaskItem composable with tests. feat: Added TaskItem composable with tests Jul 20, 2026
@MessiasLima MessiasLima changed the title feat: Added TaskItem composable with tests feat: create TaskItem composable with tests Jul 20, 2026
@MessiasLima
MessiasLima merged commit d66f4c8 into main Jul 20, 2026
1 check passed
@MessiasLima
MessiasLima deleted the opencode/issue128-20260715173240 branch July 20, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create reusable TaskItem Composable with completed state

1 participant