26 Commits

Author SHA1 Message Date
9d00fdac06 Use import_sorter
flutter pub run import_sorter:main --no-comments

The code feels much cleaner
2020-07-24 12:43:28 +02:00
bcbf54106f Handle empty checklists
If there were no items we were ignoring the checklist. Added some extra
tests as well.

Fixes #148
2020-05-26 13:43:41 +02:00
793660e42f ChecklistEditor: Improve focus handling
It's still a bit of a mess. I seem to be hitting this bug -
https://github.com/flutter/flutter/issues/20706 which others are also
hitting, but it seems to be closed despite a clearly reproduce test
case.
2020-05-02 02:28:30 +02:00
70ec10b7bc Checklist Parser: Make it a bit more robust
Allow the space after `[ ]` to be optional. Just like in Github.
2020-05-01 18:44:38 +02:00
01db30c613 Automatically migrate from old checklist format
This way people existing checklists do not disappear
2020-05-01 18:42:18 +02:00
b919f1f2ba Follow GitHub's Checklist format
Fixes #71

It's easier to not use the Markdown parser and just go line by line and
do it myself. This does make it a bit less extensible though.
2020-05-01 18:28:13 +02:00
1c869bc02b Checklist: Adapt other tests
This still doesn't fix all the tests
2020-04-06 01:29:49 +02:00
219e241deb Checklist: Add support for upper case 'X'
Requires an extra commit in markd
2020-04-06 01:14:36 +02:00
de2c82f4bd Try to support the proper checklist format
According the markdownguide.org, the checklist items are always inside a
list. It can any kind of list, but they are inside a list.

This commit breaks the old syntax and most of the tests. It also
requires a custom version of markd :/
2020-04-06 01:10:44 +02:00
ceffa89eb2 Checklist: Add an extra assert 2020-04-03 19:39:03 +02:00
26f641380d Checklist: Avoid extra \n
The markdown parser is weird.
2020-04-02 17:56:48 +02:00
4f5c44812f checklists: Do not add unnecessary \n 2020-02-17 01:05:35 +01:00
e5a6236cfc Checklists: Ensure there is one item at the start 2020-02-16 22:57:58 +01:00
5569c3fca1 Checklist: last may not exist 2020-02-16 22:11:11 +01:00
8cabb07483 checklist: verify insertItem works 2020-02-15 02:30:00 +01:00
7221befcc1 Checklist: Make sure \n exists before adding a new checklist item 2020-02-15 02:28:49 +01:00
7df3e9dce0 ChecklistEditor: Allow adding an item by pressing enter 2020-02-13 17:19:12 +01:00
6627f9c38a ChecklistEditor: Try to give focus on the next item on removing
This doesn't seem to work reliably - it only kind-of gives the focus. I
see the 'x' on the right, but the keyboard has not been shown. Maybe
this is just an ios emulator issue.
2020-02-11 18:08:34 +01:00
c7981606bf Checklist: Do not add extra \n while parsing
Now the checklist editor is finally somewhat usable.
2020-02-11 17:21:32 +01:00
4c23c28671 checklist: Improve test 2020-02-10 17:27:14 +01:00
1cd0b967de Checklist: Let items be re-ordered 2020-02-10 17:10:54 +01:00
dbbe8589c6 Checklists: Allow items to be removed 2020-02-10 17:02:45 +01:00
8bebe91bc0 Checklist: Allow adding new items
It's not perfect as we don't maintain focus, but it's a great start.
2020-02-10 16:45:20 +01:00
fd791a6597 Hookup the checklist editor properly
It's not perfect as one cannot remove items or add new ones. But it's a
start.
2020-02-10 16:16:11 +01:00
9373988054 Checklist: Implement serialization back into Note 2020-02-10 16:03:48 +01:00
b98a42543e Add a Checklist class 2020-02-10 15:44:08 +01:00