Zim

[Feature request] Add a comment to a task

Bug #1457558 reported by Murat Güven
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
Fix Released
Undecided
Murat Güven

Bug Description

I happen to add some comments to a task which is either not yet completed or to summarize the outcome of the task.

Examples:

[ ] I really need to bring my plugins into a single branch [d:2015-06-30] @Murat !!!
                [comment: [2015-05-21]> Need to respond to Jaaps email]

[x] Finalize my task comment plugin [d:2015-05-21] @Murat !!!
                [comment: [2015-05-21]> Implemented the cursor to move inside the brackets for easier typing]

I hope to utilize such comments within the task list plugin in a separate column one day... ;)

Save attached taskcomment.py into the plugins folder of Zim.

Have Fun!

Murat

Murat Güven (muratg)
description: updated
Revision history for this message
Murat Güven (muratg) wrote :

Little bug fix for cursor positioning. (V0.51)

Revision history for this message
Murat Güven (muratg) wrote :

# V0.52: Added bold option and tab multiplier

Revision history for this message
Murat Güven (muratg) wrote :

# V0.53: Added italic option

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1457558] Re: [Feature request] Add a comment to a task

Hi Murat,

Would make sense to me to use bullet list items for these comments,
checkboxes are also list items, so they can have child items with bullets.
In that case I would drop the "[ ... ]" brackets.

So the keybinding would start a new bullet item and insert the date etc.

Does make sense to have some visualization of sub-items in the tasklist
dialog, maybe some extended view where you can expand these.

Regards,

Jaap

On Thu, Jun 11, 2015 at 6:30 PM, Murat Güven <email address hidden> wrote:

> # V0.53: Added italic option
>
> ** Attachment added: "taskcomment.py"
>
> https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4413308/+files/taskcomment.py
>
> ** Attachment removed: "taskcomment.py"
>
> https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4404838/+files/taskcomment.py
>
> ** Attachment removed: "taskcomment.py"
>
> https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4402257/+files/taskcomment.py
>
> --
> You received this bug notification because you are subscribed to Zim.
> https://bugs.launchpad.net/bugs/1457558
>
> Title:
> [Feature request] Add a comment to a task
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/zim/+bug/1457558/+subscriptions
>

Revision history for this message
Murat Güven (muratg) wrote : Re[2]: [Bug 1457558] Re: [Feature request] Add a comment to a task
Download full text (3.3 KiB)

Hi Jaap,

I think I see where you want to go. Let's see, if I get you right.

[] This is a task
     * [DATE] this is a comment
     * [DATE] this is another comment

But how do I get the right indentation? Or do I expect the user to hit
return after the Task, then delete the Task Icon [] and then press CTRL
+ > to add a comment?

And how can I make the bullet list item visible without having to change
the page and change back to make Zim recognize * as a bullet list?

I think, it would be easier, if the user adds the bullet item himself
and then hit CRTL+> to add a comment. What do you think?

I have avoided to mess with the tasklist plugin as I don't have enough
Python knowledge yet. So I have no idea how to make the dialog recognize
child items of a task :)
But I'll see. I little hint would be helpful ;)

Regards,
Murat

------ Originalnachricht ------
Von: "Jaap Karssenberg" <email address hidden>
An: <email address hidden>
Gesendet: 13.06.2015 10:17:19
Betreff: Re: [Bug 1457558] Re: [Feature request] Add a comment to a task

>Hi Murat,
>
>Would make sense to me to use bullet list items for these comments,
>checkboxes are also list items, so they can have child items with
>bullets.
>In that case I would drop the "[ ... ]" brackets.
>
>So the keybinding would start a new bullet item and insert the date
>etc.
>
>Does make sense to have some visualization of sub-items in the tasklist
>dialog, maybe some extended view where you can expand these.
>
>Regards,
>
>Jaap
>
>
>On Thu, Jun 11, 2015 at 6:30 PM, Murat Güven <email address hidden> wrote:
>
>> # V0.53: Added italic option
>>
>> ** Attachment added: "taskcomment.py"
>>
>>
>>https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4413308/+files/taskcomment.py
>>
>> ** Attachment removed: "taskcomment.py"
>>
>>
>>https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4404838/+files/taskcomment.py
>>
>> ** Attachment removed: "taskcomment.py"
>>
>>
>>https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4402257/+files/taskcomment.py
>>
>> --
>> You received this bug notification because you are subscribed to Zim.
>> https://bugs.launchpad.net/bugs/1457558
>>
>> Title:
>> [Feature request] Add a comment to a task
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/zim/+bug/1457558/+subscriptions
>>
>
>--
>You received this bug notification because you are subscribed to the
>bug
>report.
>https://bugs.launchpad.net/bugs/1457558
>
>Title:
> [Feature request] Add a comment to a task
>
>Status in Zim desktop wiki:
> New
>
>Bug description:
> I happen to add some comments to a task which is either not yet
> completed or to summarize the outcome of the task.
>
> Examples:
>
> [ ] I really need to bring my plugins into a single branch
>[d:2015-06-30] @Murat !!!
> [comment: [2015-05-21]> Need to respond to Jaaps
>email]
>
> [x] Finalize my task comment plugin [d:2015-05-21] @Murat !!!
> [comment: [2015-05-21]> Implemented the cursor to
>move inside the brackets for easier typing]
>
> I hope to utilize such comments within the task list plugin in a
> separate column one day... ;)
>
>...

Read more...

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :
Download full text (4.8 KiB)

Hi Murat,

You can do all of that editing programmatically. So you can make it such
that when the user is at the task line and presses the key combo, a
sub-bullet is created with the date and the user only still needs to type
the comment text.

The API can be used as follows:

# get context information
buffer = pageview.view.get_buffer()
line_number = buffer.get_insert_iter().get_line()
indent_level = buffer.get_indent(line_number)
new_line = line_number + 1

# create new sub-bullet
iter = buffer.get_iter_at_line(line)
iter.forward_to_line_end()
buffer.insert(iter, "\n")
buffer.set_indent(new_line, indent_level + 1)
buffer.set_bullet(new_line, BULLET) # set bullet type

# place cursor in right spot
iter = buffer.get_iter_at_line(new_line)
iter.forward_to_line_end()
buffer.place_cursor(iter)

# insert date etc.
buffer.insert_at_cursor(.....)

Hope this helps,

Jaap

On Sat, Jun 13, 2015 at 10:32 PM, Murat Güven <email address hidden> wrote:

> Hi Jaap,
>
> I think I see where you want to go. Let's see, if I get you right.
>
> [] This is a task
> * [DATE] this is a comment
> * [DATE] this is another comment
>
>
> But how do I get the right indentation? Or do I expect the user to hit
> return after the Task, then delete the Task Icon [] and then press CTRL
> + > to add a comment?
>
> And how can I make the bullet list item visible without having to change
> the page and change back to make Zim recognize * as a bullet list?
>
> I think, it would be easier, if the user adds the bullet item himself
> and then hit CRTL+> to add a comment. What do you think?
>
> I have avoided to mess with the tasklist plugin as I don't have enough
> Python knowledge yet. So I have no idea how to make the dialog recognize
> child items of a task :)
> But I'll see. I little hint would be helpful ;)
>
> Regards,
> Murat
>
>
>
> ------ Originalnachricht ------
> Von: "Jaap Karssenberg" <email address hidden>
> An: <email address hidden>
> Gesendet: 13.06.2015 10:17:19
> Betreff: Re: [Bug 1457558] Re: [Feature request] Add a comment to a task
>
> >Hi Murat,
> >
> >Would make sense to me to use bullet list items for these comments,
> >checkboxes are also list items, so they can have child items with
> >bullets.
> >In that case I would drop the "[ ... ]" brackets.
> >
> >So the keybinding would start a new bullet item and insert the date
> >etc.
> >
> >Does make sense to have some visualization of sub-items in the tasklist
> >dialog, maybe some extended view where you can expand these.
> >
> >Regards,
> >
> >Jaap
> >
> >
> >On Thu, Jun 11, 2015 at 6:30 PM, Murat Güven <email address hidden> wrote:
> >
> >> # V0.53: Added italic option
> >>
> >> ** Attachment added: "taskcomment.py"
> >>
> >>
> >>
> https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4413308/+files/taskcomment.py
> >>
> >> ** Attachment removed: "taskcomment.py"
> >>
> >>
> >>
> https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4404838/+files/taskcomment.py
> >>
> >> ** Attachment removed: "taskcomment.py"
> >>
> >>
> >>
> https://bugs.launchpad.net/zim/+bug/1457558/+attachment/4402257/+files/taskcomment.py
> >>
> >> --
> >> You received this bug notification because you are subscribed ...

Read more...

Revision history for this message
Murat Güven (muratg) wrote :

Updated to V0.55 with bullet and indentation as suggested by Jaap + a little bug fix if cursor is placed inside a tag.

Murat Güven (muratg)
Changed in zim:
status: New → Fix Released
assignee: nobody → Murat Güven (muratg)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.