elementary / elementary/tasks

Refactor: Move ListView to Widgets

Open
#201 0 comments 0 reactions 0 assignees View on GitHub
Status: In Progress
Dominant language
Vala
Stars
85
Forks
22
Avg merge
12h 10m
Merged PRs (30d)
3

Description

Since PR https://github.com/elementary/tasks/pull/197 `ListView` is no longer just a view that gets updated, but a widget which has many instances. Therefore it should be moved to `Tasks.Widgets`. Also the scheduled view should be its own widget, that takes out a lot of conditional statements.

This needs some serious refactoring, so I'm going to break this down into the following steps:

- [x] 1. Rename `ListView` to `TaskListGrid` (https://github.com/elementary/tasks/pull/288)
- [x] 2. Split `TaskListGrid` into two classes (https://github.com/elementary/tasks/pull/289):
- [x] 2.1 `ScheduledTaskListGrid`: Queries all available `E.Source`'s for `AND (NOT is-completed?) (has-start?)`
- [x] 2.2 `TaskListGrid`: is bound to one specific `E.Source` and queries it for `"(contains? 'any' '')"`
- [x] 3. Make `ScheduledTaskListGrid` self contained (https://github.com/elementary/tasks/pull/292):
- [x] 3.1 Make `add_view` and `remove_view` private
- [x] 3.2 Handle source add/remove/change events within `ScheduledTaskListGrid`, so we don't have to re-create all `ECal.ClientView`'s on each event
- [ ] ...

Once this basic refactoring is done, we can abstract `ScheduledTaskListGrid` even further and re-use it to implement a task search (see #58).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.