Skip to content

Commit fa0dc41

Browse files
author
roovo
committed
Merge branch 'worker' into main
* worker: (60 commits) Cleanup: update README Cleanup: add Worker.Session tests Cleanup: elm-review Cleanup: use console.debug to trace actions in dev mode Cleanup: update npm dependencies Worker: don't try to tell an uninitialized worker the view is ready Worker: only send id of Tasks to delete when DeleteAndAdding Worker: TaskItemsRemoved -> TaskItemsDeleted (consistent naming) Worker: update typescript types Worker: only update changed tasks when markdown file is updated Worker: only need add and delete at the moment (update can come later) Worker: use sift3 string distance to help determine TaskItem edits Worker: basic TaskItem comparisons Worker: save complete task (& subtask/notes) text Worker: TaskItem.originalText -> originalLine Cleanup: TaskItem fields in alphabetical order Undo: add link to blog post to TODO Worker: basic checking for markdown updates (tasks added/deleted) Worker: no need to expose TaskList.parser (fromMarkdown is wot is used) Worker: use remove then add logic for updating tasks ...
2 parents 9e0d742 + 92f993e commit fa0dc41

42 files changed

Lines changed: 3812 additions & 1351 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ index.html
77
main.js
88
node_modules/
99
src/Main/index.d.ts
10+
src/Worker/index.d.ts

CONTRIBUTING.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ To get up and running:
77

88
```
99
npm install # install dependencies
10-
npm run generate # generate ts type definitions for elm ports
10+
npm run generate # generate ts type definitions for the main app
11+
npm run generate-worker # generate ts type definitions for the worker app
1112
npm run dev # run dev build
1213
```
1314

1415
## Release Checklist
16+
- run ts generators
1517
- elm-review
1618
- elm-test
1719
- elm-coverage

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ An [Obsidian](https://obsidian.md/) plugin to make working with tasks a pleasure
1515
- Tag based (use `#tags` to define columns).
1616

1717
## New
18-
- Due dates can be edited on the board - right click on a card
19-
to bring up the context menu. See the [Editing due date section](#editing-due-date).
20-
21-
18+
- No new features: I have split out some of the internal workings in preparation
19+
for drag and drop - hopefully managed this without introducing any bugs or
20+
performance issues.
2221

2322
## Installation
2423
Please install via the regular Community Plugins setting tab within Obsidian.

TODO.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,45 @@
1+
- column sorting
2+
- title, due date, path
3+
- do I want to introduce priority at this point?
4+
5+
STEP 3
6+
------
7+
- V: maintains (via W) file(s) to hold the order of cards
8+
W needs to maintain the files as it needs keeping up to date
9+
irrespcetive of whether the view is active
10+
V needs to read the file at startup so it puts cards in the right places
11+
if user DnDs then V sends postion changes to W which writes them to the file
12+
hmmmmmmm
13+
14+
15+
- compare somne different forms of taskItem serialisation
16+
- basic TsEncode/Decode
17+
- can I make the taskItem encoding a bit more compact -> specially encoding Union types!
18+
- original strings and parse to decode
19+
- TaskItemFields -> make alphabetical (contents is at the end atm)
20+
- perhaps when I am removing taskItems from the view I could request a reload of all if
21+
the taskItem I am deleting doesn't exist
22+
- howabout when adding taskItems communicating the expected total and if this doesn't match
23+
what the view has it can request a reload.
24+
- do I need the same states in the view now that I am not loading markdown?
25+
- typescipt tidying -> am I using async only where I need to?
26+
27+
- can I make it so I load any settings at startup but save the latest version
28+
when I get them back from elm?
29+
- do I want to deal with Settings (as in ensure they are the latest version) in the worker?
30+
- bug: if a file is deleted and it includes something which is shown in the completed
31+
column then a blank item is added at the end as I do not render the markdown for
32+
the newly added card.
33+
- I get an error in the js console if I click on the command icon when the
34+
cardboard view is visible
35+
136
---
237
- touch events - iPad ??
338
- show errors on settings pane ??
439

540
# Cleanups
41+
- do I need TaskItem.originalLine as it's the first line of originalBlock
42+
would need a bit of work as there is no originalBlock for subtasks atm
643
- simplify parsing as per typing tutor
744
- replace regex stuff in TaskItem.toToggledSting with some form of token parsing
845
- if something is on a board because of a subtask tag and that line also has a due date on it, should I use
@@ -62,6 +99,7 @@
6299
- undo buffer
63100
- for toggling completion
64101
- for deletion
102+
- see: https://erkal.github.io/UndoRedo/index.html
65103
- could/should I use some taskpaper tags:
66104
@defer(date) - defer until date, e.g. 2016-04-19 5pm or next Thursday -3d
67105
@estimate(time span) - time estimate, e.g. 2h for 2 hours or 3w for 3 weeks.

elm.json

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"justinmimbs/time-extra": "1.1.1",
2626
"mpizenberg/elm-pointer-events": "5.0.0",
2727
"pzp1997/assoc-list": "1.0.0",
28+
"rluiten/stringdistance": "1.0.4",
2829
"robinheghan/fnv1a": "1.0.0",
2930
"rtfeldman/elm-iso8601-date-strings": "1.1.4",
3031
"tripokey/elm-fuzzy": "5.2.1"
@@ -42,12 +43,7 @@
4243
"elm-explorations/test": "2.1.2"
4344
},
4445
"indirect": {
45-
"elm/project-metadata-utils": "1.0.2",
46-
"elm/random": "1.0.0",
47-
"miniBill/elm-unicode": "1.0.3",
48-
"rtfeldman/elm-hex": "1.0.0",
49-
"stil4m/elm-syntax": "7.3.2",
50-
"stil4m/structured-writer": "1.0.3"
46+
"elm/random": "1.0.0"
5147
}
5248
}
5349
}

0 commit comments

Comments
 (0)