This page shows all tasks. It's especially useful to search for a task
that one forgot in which project it was classified.
Details
- Reviewers
ervin - Commits
- R4:43302c2eea1c: New page: all tasks
Tests pass; zanshin shows new All Tasks page.
Adding and removing works.
One problem left: shall we disable Promote? The page shows no projects
so I think it's the wrong place for that, the task would just disappear.
Diff Detail
- Repository
- R4 Zanshin
- Branch
- 2019_03_all_tasks
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 10094 Build 10112: arc lint + arc unit
I'm not sure the promotion a problem in practice in this view. Yes, the promoted task would disappear, but you'd have a project appearing instead and its children would still be there I guess. It's what I'd expect.
src/presentation/alltaskspagemodel.cpp | ||
---|---|---|
53 | Not sure "Inbox" makes sense for the user here. It might not even end up in the inbox if we added under a parent who has a project. | |
src/presentation/availablepagesmodel.cpp | ||
177 | Kinda nitpicking, but I'd put this one last, although I see a need it's a bit of a corner case (or "last chance to find me") situation, I don't want it too prominently displayed. Bonus point for reordering the member variable order, the initialization order and the conditions order (now that's my OCD speaking). | |
src/presentation/pagemodel.h | ||
60 | Since we really should get there I'm not sure the struct name is appropriate, I'd go for "TaskExtraData" or such. | |
tests/units/presentation/alltaskspagemodeltest.cpp | ||
365 | Aligning with my comment, maybe it'd benefit from having a test verifying it does the right thing on promote? Obvious potential mistake would be the promoted task disappearing and its children as well (while the children should still appear with a new project as extra info). |
OK, added promote. BTW the implementation of promoteItem() is exactly the same in all 5 page models, why not move it to the base class?
src/presentation/pagemodel.h | ||
---|---|---|
60 | It's not that simple. In inbox, workday and all tasks, we need a projects query and a contexts query. Either this means we have 3 structs, to use the right one in the right place, or we have one struct with everything and sometimes an unused member. Now I'm thinking about all this and writing it down, I guess a single struct is simpler and the waste (one pointer per item) is acceptable? | |
tests/units/presentation/alltaskspagemodeltest.cpp | ||
365 | I re-added the same test as in workday page. But a test like the one you mention sounds more like a feature test, no? IMHO there's too much mocking at this level for such a test to make sense here. It'll pass for sure even if something was broken, because the mocks would return the right thing anyway. |
src/presentation/availablepagesmodel.cpp | ||
---|---|---|
177 | Done. A bit reluctantly because I found it convenient at the top, but I agree with the reasoning -- for more orderly people at least :-) |
I agree moving the promote implementation in the base class could make sense now. Rather in a separate commit though.
src/presentation/pagemodel.h | ||
---|---|---|
60 | Yes, this is what I had in mind. One unused pointer is OK. | |
tests/units/presentation/alltaskspagemodeltest.cpp | ||
365 | Right, it's time to "demock" some of the tests. But that's for later. |