Skip to content

feat: task due date - #197

Merged
MessiasLima merged 11 commits into
mainfrom
opencode/issue122-20260726143646
Jul 27, 2026
Merged

MessiasLima merged 11 commits into
mainfrom
opencode/issue122-20260726143646

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Implemented the optional due date feature for Create Task.

What changed

  • New component: FoliaryDatePicker

    • Card-based action that shows a label and either the placeholder or the selected date.
    • Tapping the card opens a Material 3 ModalBottomSheet with a DatePicker.
    • Confirming a picker selection converts the picked day to the end of that local day (kotlin.time.Instant) using TimeZone.currentSystemDefault().
    • Shows a trailing Lucide.X clear button when a date is selected; tapping it emits onDateSelected(null) and does not open the sheet.
    • Includes test tags: FoliaryDatePicker:Card, FoliaryDatePicker:Value, FoliaryDatePicker:ClearButton.
  • CreateTaskScreen

    • Added FoliaryDatePicker between the description field and the save button.
    • Wired through CreateTaskEvent.DueDateChanged.
    • Test tag: CreateTaskScreen:DueDatePicker.
  • CreateTaskViewModel

    • Added dueDate: Instant? = null to CreateTaskViewData.
    • Added CreateTaskEvent.DueDateChanged.
    • Updated save logic to persist state.dueDate instead of null.
  • String resources added to strings.xml:

    • create_task_due_date_label
    • create_task_due_date_placeholder
    • create_task_due_date_clear_a11y
    • date_picker_confirm
    • date_picker_cancel
  • Tests

    • CreateTaskViewModelTest: default dueDate null, update/clear events, save persists selected date and persists null when untouched.
    • CreateTaskScreenTest: placeholder visibility, selected-date display, clear button visibility, clear emits DueDateChanged(null).
    • FoliaryDatePickerTest: placeholder/selected states, clear button behavior, card opens the bottom sheet.

No new third-party libraries were added.

Verification

Ran the focused JVM tests:

./gradlew foliary:jvmTest --tests "dev.appoutlet.foliary.core.ui.component.datepicker.FoliaryDatePickerTest" --tests "dev.appoutlet.foliary.feature.createtask.CreateTaskViewModelTest" --tests "dev.appoutlet.foliary.feature.createtask.CreateTaskScreenTest"

All passed.

Design review

Per the acceptance criteria, the visual design still needs explicit review before the ticket is closed. Recommended checklist:

  • Placement feels natural in the Create Task layout
  • Due date card does not compete with the title field
  • Empty state clearly reads as optional
  • Selected-date state is easy to scan
  • Trailing clear button is visible but not visually heavy
  • Tap target is large enough on mobile
  • Spacing works on compact and desktop layouts
  • Bottom sheet flow feels consistent with the app’s Material 3 UI

Closes #122

New%20session%20-%202026-07-26T14%3A36%3A45.446Z
opencode session  |  github run

@MessiasLima

Copy link
Copy Markdown
Owner

/oc fix detekt issues

@opencode-agent

Copy link
Copy Markdown
Contributor Author

Done. Detekt is now clean and the focused JVM tests pass.

Changes made to FoliaryDatePicker.kt:

  • Long method split: refactored the 83-line FoliaryDatePicker into smaller composables:
    • FoliaryDatePicker – public state holder
    • DatePickerCard – card UI
    • DateClearButton – clear icon
    • DatePickerBottomSheet – bottom sheet UI
  • Magic numbers resolved: introduced named constants for the end-of-day time used in LocalTime:
    • EndOfDayHour
    • EndOfDayMinute
    • EndOfDaySecond
    • EndOfDayNanosecond

Verification:

  • ./gradlew detekt ✅
  • ./gradlew foliary:jvmTest --tests "dev.appoutlet.foliary.core.ui.component.datepicker.FoliaryDatePickerTest" --tests "dev.appoutlet.foliary.feature.createtask.CreateTaskViewModelTest" --tests "dev.appoutlet.foliary.feature.createtask.CreateTaskScreenTest" ✅

New%20session%20-%202026-07-26T15%3A22%3A55.680Z
opencode session  |  github run

@MessiasLima MessiasLima changed the title Added due date picker to create task. feat: task due date Jul 27, 2026
@MessiasLima
MessiasLima merged commit f202626 into main Jul 27, 2026
1 check passed
@MessiasLima
MessiasLima deleted the opencode/issue122-20260726143646 branch July 27, 2026 18:21
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 task screen — due date field

1 participant