Skip to content

Commit

Permalink
updated tests, menu
Browse files Browse the repository at this point in the history
  • Loading branch information
irrationalistic committed Apr 11, 2015
1 parent dfc3812 commit 0c4ee8b
Show file tree
Hide file tree
Showing 8 changed files with 1,093 additions and 60 deletions.
4 changes: 1 addition & 3 deletions demo.todo
Expand Up @@ -2,10 +2,8 @@
My Tasks:
☐ Implement testing for tasks package
☐ Update styles @normal(tag with value) sounds good
✔ Create TODO package for atom @done(2015-04-09 09:28) @project(Archive)
v2:
✘ Have package order pizza @cancelled(2015-04-09 21:45) @project(v2)
nested:
☐ Another task
___________________
Archive:
✔ Create TODO package for atom @done(2015-04-09 09:28) @project(Archive)
12 changes: 11 additions & 1 deletion lib/tasks.coffee
Expand Up @@ -27,7 +27,6 @@ module.exports =
type: 'string', default: ''

activate: (state) ->

marker = atom.config.get('tasks.baseMarker')
completeMarker = atom.config.get('tasks.completeMarker')
cancelledMarker = atom.config.get('tasks.cancelledMarker')
Expand Down Expand Up @@ -250,11 +249,22 @@ module.exports =
# no archive? create it!
archiveText = """
___________________
Archive:
"""

# Before adding the final archive section,
# we should clear out the empty lines at
# the end of the file.
for line, i in editor.buffer.lines by -1
if editor.buffer.isRowBlank i
# remove the line
editor.buffer.deleteRow i
else
break

# add to the end of the file
newRange = editor.buffer.append archiveText
insertRow = newRange.end.row
Expand Down
19 changes: 10 additions & 9 deletions lib/tasksUtilities.coffee
Expand Up @@ -15,6 +15,7 @@ module.exports =
sPt = new Point lineNumber, match.index
ePt = new Point lineNumber, match.index + match[0].length


nameStart = new Point(
lineNumber,
match.index + match[0].indexOf match[4]
Expand All @@ -23,15 +24,15 @@ module.exports =
lineNumber,
match.index + match[0].indexOf(match[4]) + match[4].length
)

valueStart = new Point(
lineNumber,
match.index + match[0].indexOf match[6]
)
valueEnd = new Point(
lineNumber,
match.index + match[0].indexOf(match[6]) + match[6].length
)
if match[6]
valueStart = new Point(
lineNumber,
match.index + match[0].indexOf match[6]
)
valueEnd = new Point(
lineNumber,
match.index + match[0].indexOf(match[6]) + match[6].length
)

tags.push
tagName:
Expand Down
18 changes: 13 additions & 5 deletions menus/tasks.cson
Expand Up @@ -2,24 +2,32 @@
'atom-text-editor[data-grammar~="todo"]': [
{'type': 'separator'}
{
'label': 'Add Task',
'label': 'Add Task Below',
'command': 'tasks:add'
}
{
'label': 'Add Task Above',
'command': 'tasks:add-above'
}
{
'label': 'Complete Task',
'command': 'tasks:complete'
}
{
'label': 'Cancel Task',
'command': 'tasks:cancel'
}
{
'label': 'Archive Tasks',
'command': 'tasks:archive'
}
{
'label': 'Update Timestamp Format',
'command': 'tasks:updateTimestamps'
'label': 'Convert to Task',
'command': 'tasks:convert-to-task'
}
{
'label': 'Cancel Task',
'command': 'tasks:cancel'
'label': 'Update Timestamp Format',
'command': 'tasks:update-timestamps'
}
{'type': 'separator'}
]
10 changes: 8 additions & 2 deletions project.todo
@@ -1,11 +1,17 @@
v2:
☐ Archive should minimize spacing on remaining lines (no more than one line away from last real line)
☐ Add pull-request to symbols view package
☐ Improving token matching to use package
☐ Clean up tasks.coffee file

v3:
☐ Add pull-request to symbols view package
☐ Add progress to status bar

___________________
Archive:
✔ Update menu @done(2015-04-10 21:55) @project(v2)
✔ Add benchmark @done(2015-04-10 21:52) @project(v2)
✔ Fix up tests @done(2015-04-10 21:35) @project(v2)
✔ Archive should minimize spacing on remaining lines (no more than one line away from last real line) @done(2015-04-10 12:21) @project(v2)
✔ Update readme @done(2015-04-10 11:37) @project(v2)
✘ Add method for updating all markers to new values @cancelled(2015-04-09 22:18) @project(v2)
✘ Fix awkward coloring in minimap @cancelled(2015-04-09 22:07) @project(v2)
Expand Down

0 comments on commit 0c4ee8b

Please sign in to comment.