benjypng / logseq-todoist-plugin

MIT License
125 stars 19 forks source link

Feature Request: "todoist - send task" includes Backlink (deep link) to Logseq page and vice versa #24

Closed P1Rebo closed 2 years ago

P1Rebo commented 2 years ago

Thanks again @hkgnp for this great plugin! I'm heavily using it.

Since Logseq introduced the feature of Page URLs (deeplinks) it would be cool if possible to send a task to todoist and by default this todoist task is a markdown link that links back to the original page URL. Same goes for the Todo inside Logseq, it would be cool if it would include the Link to the Todo within Todoist (or even sync the state).

Example I've a logseq page that is a project description, e.g. "my new house". As part of this project I've a todo list, e.g. next steps. This list containts todos that I have send to Todoist.

When working with Todoist I want to be able to quickly open the project information page within Logseq. So therefore the complete todo header would be a link to this specific project page within Logseq.

When working with Logseq I want to be able to jump to the todoist task in order to see the status over there. Even better would be, if the Plugin could synchronize the states between Logseq and Todoist, but I guess this is more difficult.

Would be very helpful to at least be able to configure this behaviour.

Thanks a lot in advance!

Best, p1rebo

benjypng commented 2 years ago

Let me look into this.

P1Rebo commented 2 years ago

Thanks! Meanwhile I got you a fresh brewed coffee ;-) You deserve it for this great plugin!

benjypng commented 2 years ago

You can try v4.1.0. Go into the plugin settings and toggle on or off the adding of Todoist or Logseq URLs. Synchronising states are unfortunately not very possible so easily.

P1Rebo commented 2 years ago

Thanks for the fast reaction! I'd propose the following notation principle. Example within Logseq "I have to buy milk" => "/todoist send task" would lead to "I have to buy milk" completely as link within Todoist, so that the description field would stay empty. IMO I find this more convenient because it leaves the todoist task overview very clean, and you can open Logseq with just one click.

and "I have to buy milk" would then be a Markdown Link directly to the todoist task

Or alternatively "I have to buy milk (Todoist)" and "I have to buy milk (Logseq)" - so the links within brackets.

In my opinion this would mean more convenience for the user.

What do you think?

Example Logseq 2022-05-17_17h01_13

Example Todoist 2022-05-17_17h02_05

Thanks in advance! P1Rebo

benjypng commented 2 years ago

Oh how do you insert links in Todoist? Didn't know that is possible.

P1Rebo commented 2 years ago

Sure, links can be inserted with Markdown style text. so => [Hypertext](https://todoist.com/) See reference here: https://todoist.com/help/articles/text-formatting

benjypng commented 2 years ago

Thanks for sharing. Please give it a go in 4.1.1.

P1Rebo commented 2 years ago

I tested it. Without "DOING" in the beginning it works. With "DOING" it seems to create a log message and DOING is part of the Markup hyperlink text. Furthermore I guess that there is a "\n" character, to that the link is not in one line and won't be displayed correctly.

Is there a way to avoid the popup window, e.g. by setting default values? I'd prefer to have always priority 4 + inbox since I review the complete todoist tasks afterwards and prioritize then.

image image

benjypng commented 2 years ago

Hi, I will look into removing the prefixes.

As for setting defaults, let me think about them as previously the feedback I received was that defaults are not preferred, and users preferred to just set it as per the task.

P1Rebo commented 2 years ago

Ok thanks! It really depends on the user habit I guess. I prefer to avoid mouse actions :-) Maybe there is a good way to make this configurable, and by default to have this popup with each task. You are the master :-)

benjypng commented 2 years ago

Ok thanks! It really depends on the user habit I guess. I prefer to avoid mouse actions :-) Maybe there is a good way to make this configurable, and by default to have this popup with each task. You are the master :-)

Implemented in v4.1.8.

P1Rebo commented 2 years ago

Hi @hkgnp, the behaviour without the popup is perfect now. Still I have the issue that the todoist task will be modified using a newline which breaks the todo. See example.

image

Furthermore "DOING" is not been deleted on Logseq side, on todoist side the text is corrupted.

image

"TODO" is not removed on Logseq side, but in todoist.

Should I open a new issue?

benjypng commented 2 years ago

Could you try with v4.2.1?

P1Rebo commented 2 years ago

Sure. I tried with v4.2.1 now, but unfortunately I get the same result...

Logseq:

2022-05-24_09h17_12

leads to Todoist:

2022-05-23_11h15_01

Somehow, the deeplink doesn't work anymore in this version. See here: Logseq

2022-05-24_09h21_27

Todoist (works fine)

2022-05-24_09h21_58
benjypng commented 2 years ago

Are you on markdown or org mode?

On Tue, 24 May 2022 at 3:18 PM, Pedro Reboredo @.***> wrote:

Sure. I tried but unfortunately I get the same result... [image: 2022-05-24_09h17_12] https://user-images.githubusercontent.com/17112602/169971824-c0f60675-dc0c-48c4-b6a3-008d460ca646.png [image: 2022-05-24_09h17_12] https://user-images.githubusercontent.com/17112602/169971933-806f4acd-b733-44b0-9ba5-ef57fed930e1.png

— Reply to this email directly, view it on GitHub https://github.com/hkgnp/logseq-todoist-plugin/issues/24#issuecomment-1135501627, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALNXKGICADXNBJRGDBYICWTVLR7EVANCNFSM5VPNJ7QA . You are receiving this because you modified the open/close state.Message ID: @.***>

P1Rebo commented 2 years ago

In Logseq I'm using Markdown mode (default).

P1Rebo commented 2 years ago

Hey @hkgnp, any updates here?

benjypng commented 2 years ago

Hi, sorry, I still am not able to reproduce the issue. It works fine on my side. Do you mind copying your specific markdown block that doesn't work so I can test it out?

TomazWang commented 2 years ago

Hi @hkgnp,

I can reproduce the backlink issue mention by @P1Rebo in this comment (the second half: "This is a second test ..."). I found that in removePrefixWhenAddingTodoistUrl function, non-task blocks are not getting [] syntax attached. This PR might be a solution for this. Please check it out, thanks.

benjypng commented 2 years ago

Thanks for the PR. Have merged it! Will cut a release soon!