Skip to content

add local to-do planner / tasks to calendar overvie…#2583

Open
goatnath wants to merge 6 commits into
AvengeMedia:masterfrom
goatnath:todo-list-overview
Open

add local to-do planner / tasks to calendar overvie…#2583
goatnath wants to merge 6 commits into
AvengeMedia:masterfrom
goatnath:todo-list-overview

Conversation

@goatnath
Copy link
Copy Markdown

@goatnath goatnath commented Jun 6, 2026

Description

<!-- What does this PR do and why? -->
This PR integrates a local task planner / to-do list feature directly

into the Calendar card in the Quickshell overview tab. It allows users to
click on any calendar day to add, toggle, and delete daily tasks locally.
If khal is installed, these local planner tasks are displayed alongside
calendar events; if khal is not installed, the Calendar card remains
fully functional as a standalone local to-do planner rather than
displaying as empty.

## Type of change

<!-- Check all that apply. -->

- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that changes existing behavior)
- [ ] Refactor / internal cleanup
- [ ] Documentation
- [ ] Other

## Related issues

<!-- e.g. "Fixes #123", "Closes #123". Leave blank if none. -->

## Screenshots / video
recording.mp4
## Checklist

- [x] My code follows the conventions in CONTRIBUTING.md
- [x] I have tested my changes locally
- [x] New user-facing strings are wrapped in `I18n.tr()` with translator

context, reusing existing terms where possible
- [ ] Go changes: ran make fmt, added/updated tests, make test
passes, and go mod tidy is clean
- [x] My QML changes: ran make lint-qml with no new warnings
- [ ] I have opened a corresponding pull request in dlx-docs to document
any new behaviors: https://github.com/AvengeMedia/DankLinux-Docs

@hthienloc
Copy link
Copy Markdown
Contributor

This looks so cool! Some feedback from the video if you want more insight:

  • When entering a day or after adding a new task, the focus should automatically fall into the text input field for quickly adding tasks.
  • The ability to reorder tasks.

@goatnath
Copy link
Copy Markdown
Author

goatnath commented Jun 6, 2026

@hthienloc i have made some changes since your recommendations and do tell me if this is what you envisioned

@hthienloc
Copy link
Copy Markdown
Contributor

hthienloc commented Jun 6, 2026

1780756368878283909

Since the widget's display screen is limited, using up/down buttons for reordering might be inefficient. A designated handle for drag-and-drop reordering would be a much better approach.

The text input behavior works exactly as imagined. Great job on that.

I have a suggestion to add an inline edit button, that would allow you to keep just two icons on the right (Edit and Trash). Help users quickly adjust the task without the need to delete then recreate the task.

@goatnath
Copy link
Copy Markdown
Author

goatnath commented Jun 6, 2026

@hthienloc i have tried to make the changes you suggested and this is what i came up with, feel free to give more suggestions on possible improvements i can make

Copy link
Copy Markdown
Collaborator

@Purian23 Purian23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @goatnath, it looks really cool! Good feedback, @hthienloc!

I'm glad khal support is optional, it's likely getting deprecated or changed in our upcoming dank calendar release.
Otherwise, there are a few issues to address here:

  1. The PR currently prevents DMS from starting because CalendarOverviewCard.qml is missing a closing } near line 958.

  2. When khal finishes loading, it replaces eventsByDate and can wipe out tasks loaded earlier. Keeping local tasks and khal events separately, then merging them, would avoid this race.

  3. The separate Python CRUD processes can run concurrently and overwrite each other’s changes. A single in-memory model backed by an atomic FileView write would also remove the Python dependency.

  4. Several delegate bindings access modelData without checking whether it is null, which can produce QML TypeError warnings during model updates.

  5. Completion is already stored as a boolean, so task titles should remain clean. A completed property and DankIcon would avoid adding and later parsing Unicode checkbox characters.

  6. During dragging, animation is disabled for every item. Disabling it only on the dragged item would let neighboring tasks move smoothly.

  7. The reorder fallback checks IDs against id_to_item, which contains every task, so omitted tasks can be silently dropped. It should check against the submitted ordered IDs instead.

There is also trailing whitespace in both changed files, although make lint-qml otherwise passes. Once these issues and the syntax error are fixed, we’ll be glad to take another look.

@goatnath
Copy link
Copy Markdown
Author

goatnath commented Jun 7, 2026

@Purian23 I have made a few changes , even though i don't completely understand all the errors as i'm still new to this stuff but do check how it does now in the pre-commit checks.

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.

3 participants