ui: hide checked checkboxes in task list when filtering done tasks#2289
Open
mcepl wants to merge 2 commits into
Open
ui: hide checked checkboxes in task list when filtering done tasks#2289mcepl wants to merge 2 commits into
mcepl wants to merge 2 commits into
Conversation
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
ad94898 to
08b9e7a
Compare
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Seems to be working so far with the testing APK, but I will give it some week or so of more testing.