logseq-notion-sync icon indicating copy to clipboard operation
logseq-notion-sync copied to clipboard

Error syncing indented blocks

Open duel0 opened this issue 2 years ago • 11 comments

Everything worked fine. I had the API issue but I restarted and all worked well. I tried to sync a whole page with h1 and indented text: in Notion I can see the heading but can't manage to see text. With no indentation works fine, but most of my documents are written the other way.

duel0 avatar Aug 21 '23 09:08 duel0

image image

duel0 avatar Aug 21 '23 09:08 duel0

Hello, in Logseq, when the indentation goes beyond 3 levels and you try to invoke Notion's API, an error occurs. This might be because I've converted the indentation in Logseq into toggle lists in Notion. Perhaps I shouldn't have done it this way?

b-yp avatar Aug 21 '23 09:08 b-yp

Hello, I tried with just 1 level of indentation. With no headings it's fine, it successfully converts to toggle lists. With headings maybe they should be converted to heading-toggle lists. I don't know if by avoiding the conversion to toggle list the problem could be solved. What do you think?

duel0 avatar Aug 21 '23 09:08 duel0

I think you're right. I just realized what you mentioned – the issue of having a title with no content – and it's not related to the problem of having three levels of indentation that I mentioned earlier. Perhaps I should convert them into heading-toggle lists instead of toggle lists. If I have time tonight, maybe I'll work on fixing it.

b-yp avatar Aug 21 '23 09:08 b-yp

Alternatively, I think we could completely abandon toggle lists and use a regular document structure.

b-yp avatar Aug 21 '23 09:08 b-yp

Glad to hear that. I think you should opt for the regular document structure with no toggles: in fact, on Notion it's pretty easy to convert a heading to a toggle heading with already indented blocks. I think it should be easier for you as well.

duel0 avatar Aug 21 '23 09:08 duel0

I'm really sorry. I wasn't able to fix this issue last night. Initially, I was thinking of handling the titles and content as different cases, with the text content being presented in notion as a bulleted list. However, the actual implementation turned out to be quite complex. After struggling with it for a while, I gave up and temporarily removed all levels, directly syncing to Notion. There are still some issues now, such as Notion only supporting up to three levels of headings. I'll fix it when I have some free time later on.

b-yp avatar Aug 22 '23 17:08 b-yp

Take your time man, I appreciate your effort!

duel0 avatar Aug 22 '23 17:08 duel0

Wow, I didn't expect you to reply in seconds. I have to go to bed now and it's already late. If I have time later, I will gradually fix other issues.

---Original--- From: "Francesco @.> Date: Wed, Aug 23, 2023 01:39 AM To: @.>; Cc: @.@.>; Subject: Re: [b-yp/logseq-notion-sync] Error syncing indented blocks (Issue#14)

Take your time man, I appreciate your effort!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

b-yp avatar Aug 22 '23 17:08 b-yp

Sleep well man, I am just getting started in Software Development, otherwise I could have given you more detailed suggestions in code!

duel0 avatar Aug 22 '23 17:08 duel0

Thank you. Work together and make progress together.

b-yp avatar Aug 23 '23 02:08 b-yp