c6p / logseq-habit-tracker

Habit tracker for Logseq
MIT License
95 stars 5 forks source link

Using [[Habits]] as a linked parent block #3

Closed santiyounger closed 2 years ago

santiyounger commented 2 years ago

Hey, In order to make it quicker to create the daily block "Habits" I wanted to make it a linked block like this: image

However, If I modify this in the plugin settings like this: image

it doesn't' work, plus it also send's the plugin window to the further left, unable to access the settings

image

The only way to reset it to normal is by accessing the logseq-habit-tracker.json file manually from a text editor and reset it to default.

This is slightly different to #1 since with the solution I'm proposing we'd still be keeping the current parent block. However if the method from #1 is implemented, then that might replace the need to what I'm saying in this issue. Either way I think both methods would be beneficial for different types of users

Thanks a lot for the hard work, this is soon becoming my favorite logseq plugin!

c6p commented 2 years ago

Thank you for the appreciation.

Could you try #Habits for now? I am going to fix linked blocks.

Also, could you update to the latest version, if you are not already? I cannot reproduce plugin moving further left, hiding settings, though I will look into it.

santiyounger commented 2 years ago

thanks! Regarding the moving plugin it's really strange. I'll see if there might be another factor that makes it happen, because I can confirm I'm on the version 0.1.5 of the plugin and of Logseq 0.4.3

Regarding the suggestion to use #habits would this be correct?

Feel free to let me know if you have suggestions, such as Upper case "H" for habits, or if Lower case "h" is better.

image

Thanks!

c6p commented 2 years ago

It should be fixed in v0.1.7. If it doesn't let me know, so I can reopen it. I also hope, layout is more stable now.

In case of "H", upper or lowercase, one is not better than another. But string is case-sensitive, use the case the block content has.

santiyounger commented 2 years ago

Thank you for taking the time. Does this look correct? image

Is it normal that [[habits]] is displayed as a habit itself?

Thanks a lot!

c6p commented 2 years ago

@santiyounger Oops, please try v0.2.1

santiyounger commented 2 years ago

thank you that seems to have solved it appreciate it!

donkikos commented 1 year ago

@c6p I tried using this regex ((\*{2}\d{2}:\d{2}\*{2})|(\d{2}:\d{2})|())(?<habit>.*((#habit)|(\[{2}habit\]{2}))(\s|\b)) so that I can label the blocks with either #habit or [[habit]]. It works for #habit, e.g. 09:14 meditation #habit , but does not recognize the [[habit]], e.g. 09:14 meditation [[habit]].

I can open a separate issue, if this is not a regression.

c6p commented 1 year ago

@donkikos currently habit marker accepts a single form (and it is not regex capable). Let's make it a seperate issue.

Update: Fixed in 5ab817eacad33e8189ce4dc1d68c21efcdc7a5fa (v0.4.3)