Skip to content

ui: hide checked checkboxes in task list when filtering done tasks#2289

Open
mcepl wants to merge 2 commits into
TechbeeAT:developfrom
openSUSE-Python:hide_ticked_checkboxes
Open

ui: hide checked checkboxes in task list when filtering done tasks#2289
mcepl wants to merge 2 commits into
TechbeeAT:developfrom
openSUSE-Python:hide_ticked_checkboxes

Conversation

@mcepl

@mcepl mcepl commented May 31, 2026

Copy link
Copy Markdown
Contributor

This improvement enhances the "Hide completed tasks" feature by also filtering out ticked Markdown checkboxes in task descriptions/summaries when the list filter is active. This keeps the task list clean and focused on pending items, while ensuring that all checkboxes remain visible and interactive in the task detail view.

  • Add filterCheckedCheckboxes() utility to InteractiveMarkdown.kt
  • Update all ListCard variants to support selective hiding of done checkboxes
  • Propagate the isExcludeDone setting from ListScreens to card components
  • Add unit tests for the filtering logic in InteractiveMarkdownTest.kt

Seems to be working so far with the testing APK, but I will give it some week or so of more testing.

@mcepl mcepl marked this pull request as ready for review June 7, 2026 08:16
@mcepl

mcepl commented Jun 7, 2026

Copy link
Copy Markdown
Contributor Author

Seems like it works just fine.

This improvement enhances the "Hide completed tasks" feature by also
filtering out ticked Markdown checkboxes in task descriptions/summaries
when the list filter is active. This keeps the task list clean and
focused on pending items, while ensuring that all checkboxes remain
visible and interactive in the task detail view.

- Add filterCheckedCheckboxes() utility to InteractiveMarkdown.kt
- Update all ListCard variants to support selective hiding of done
  checkboxes
- Propagate the isExcludeDone setting from ListScreens to card
  components
- Add unit tests for the filtering logic in InteractiveMarkdownTest.kt
@mcepl mcepl force-pushed the hide_ticked_checkboxes branch from ad94898 to 08b9e7a Compare June 13, 2026 11:44
…arkdown list markers

* Fix checkbox parsing and filtering under CRLF line endings (\r\n), which are common in iCalendar synced descriptions.
  The previous implementation split the description by '\n' and matched using Regex.matchEntire().
  Because `.*` in Kotlin regex does not consume trailing carriage returns (\r), matchEntire() failed to match lines ending in CRLF, causing checked checkboxes in synced tasks to remain visible even when the "Hide completed tasks" filter was active.
  This is resolved by using `CharSequence.lines()` instead of `split('\n')`, which safely removes line-ending delimiters, and updating the regex to optionally consume trailing `\r` as a safeguard.
* Expand the checkbox line regex to support other standard Markdown list markers (`*` and `+` in addition to `-`).
* Ensure `updateCheckboxState` preserves the original list marker when toggling task state.
* Add comprehensive unit tests in `InteractiveMarkdownTest` verifying CRLF handling, multi-marker support, and preservation of markers.
* Align JVM toolchain to version 25 in build.gradle.kts files to match the local host JDK 25 installation required for compilation.
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.

1 participant