dvargas92495 / SmartBlocks

Useful examples from developer community for Roam42 SmartBlocks
147 stars 7 forks source link

Create recurring blocks / events / tasks / reminders and allow to defer each to a later date #119

Open GitMurf opened 3 years ago

GitMurf commented 3 years ago

✂️ Copy of your 42SmartBlock from Roam

📋 Describe the SmartBlock

Recurring events / reminders! Also can for example set it to do "every other week" (2w)... or once a quarter (3m which means every 3 months).

Lastly, TODO items... if it is a TODO you can either use the Alias option where it just [*] block ref links back to the original, OR what i prefer is a block reference to the whole block so that you can update the main TODO task and it will update all the recurrences accordingly BUT I want them each to still have their own checkbox TODO so you can mark when you've done them individually and not have it check them all through the block reference. So I added in logic that if it is a TODO and you are doing the full block reference, it will add its own TODO on the front of each block so you can check them individually each time they come up!

Also adds a "Defer" button to each recurring block so that when it comes to that day, you can defer it (snooze) until x number of days. It also has a tracker that counts how many times you have deferred it.

✅ Describe any prerequisites or dependencies that are required for this SmartBlock

roam42

📷 Screenshot of your 42SmartBlock workflow/template from Roam

It is quite large. But here is a few pieces of it.

image

image

💡 Additional Info

GIF Demo:

ZB7w3rFnZj


[label_example]

GitMurf commented 3 years ago

By RH:

<@U01147Z3CMQ> first request for a “RANDOM” date option :-) View in Slack

GitMurf commented 3 years ago

A couple questions:

1) what constraints on random date? Clearly can’t have a date in 2036 pop up haha. 2) do you want this random date to be the basis for the start of the recurring dates? Or do you mean just for the “defer” button? View in Slack

GitMurf commented 3 years ago

By Brandon:

Ideally, defer to “sometime this week” “sometime this month” “sometime next week” “sometime next month” “sometime this year” View in Slack

GitMurf commented 3 years ago

<@U012PCRUL8P> interesting. That is doable. So what do you think of this workflow?

1) click defer button 2) pop up asks for number of days to defer. 3) instead of a number you enter “r” for random. 4) a new pop up asks for time frame. tw = this week, nw = next week, tm = this month, nm = next month, ty and ny = this and next year. 5) picks random day based on that parameter.

Or actually. Can combine steps 3 and 4 for one less popup. Instead of listing number of days. Just put tw or nw etc. thoughts?

View in Slack

GitMurf commented 3 years ago

By Brandon:

What about, second popup =number range of dates. (SUPER flexible then)

(0,7 = this week; 7,14 = next week; etc) View in Slack

GitMurf commented 3 years ago

You’re not afraid that is too much typing? For me if I use defer it’s likely cuz I’m busy and don’t have a lot of time so want to quickly defer something. Would this require too much thought on the fly? Versus just quick initials tw nw tm nm ty ny View in Slack

GitMurf commented 3 years ago

By Kate Foy:

Thank you <@U01147Z3CMQ>. Wonderful stuff. I wonder whether I’ve found a :beetle:. I’ve set a recurring item starting today for 3 occurrences at W intervals. The first 3 appear on cue i.e., 15, 22, 29 Dec , but there’s a random at the end 1 May, 2021. Your birthday? :wink: View in Slack

GitMurf commented 3 years ago

By Kevin Murray:

<@U01147Z3CMQ> found the holy grail! :first_place_medal:Now an extra epic challenge, can you set recurrence to be the nth day of the nth month (e.g,. first Saturday of every third month)? View in Slack

GitMurf commented 3 years ago

that wouldn't be too hard to add. Just need to find the time to do it :wink: Especially with the new dayjs library

You see that already have ability to do 3m for every third month, right? so then it would just need to be take that month found and find the first saturday of that month.

ok so what about if added ability to add a : parameter to specify the "day of week" type like you said where you can do 2su is 2nd sunday of the month. or 3m is the third monday. So your request above for First saturday of every third month would look like 3m:1sa . Or to do the "last saturday" of every month you could do m:Lsa or last day of the month (could be 30th or 31st depending) would be m:L View in Slack

GitMurf commented 3 years ago

By Kevin:

<@U01147Z3CMQ> This thread is getting fractal. 3m:1sa looks good. One issue would be how to determine the starting date. First Saturday is consistent, but third month depends on the baseline. Does it make it too complicated to include a start date? View in Slack

GitMurf commented 3 years ago

For anyone using my recurring SmartBlock, there may be some bugs with some recent changes to smartblocks as <@U016YEJAKT4> mentioned in this post. I will check it out today and keep you posted and update github with the changes when I figure it out. Thanks!

https://roamresearch.slack.com/archives/C0190JLGDUJ/p1608383869368100 View in Slack

GitMurf commented 3 years ago

Fixed and added new features for:

GitMurf commented 3 years ago

Here is a video showing how to copy from Github into Roam and start using the smartblock.

https://user-images.githubusercontent.com/64155612/103949793-a83ee780-50f0-11eb-89a4-4fe07bc339ea.mp4

wismie commented 3 years ago

First, MANY THANKS for this wonderful SmartBlock, this is exactly what I needed!

Maybe it exists already, but I need recurring tasks that happen on the 15th if it is a working day each month, and the last working day of the month (i.e. every 15th if not Sat or Sun - in that case, I would do it on Friday), same for the end of the month - 30/31 if not a Sat or Sun

Hileotech commented 3 years ago

HI! Big, big, BIG thanks for your SmartBlock! I just "installed" it into my graph and went for a "test ride". I don't know if it's a bug or my inability, but if I create a normal block and set it to repeat everything is ok. If I create a {{TODO}} block and set it to repeat, I see two squares

Schermata 2021-03-26 alle 15 12 32

Adding strange things to strange things: if I tick the left square that todo is marked as done, but if I tick the right one, the whole series of todo's (including the parent one) are marked as done at once (in this image I clicked the second todo):

Schermata 2021-03-26 alle 15 18 19

Thanks for any hint on how to fix this

Jmartinez490 commented 2 years ago

I have been hoping to use this. It keeps saying that ‘the block threw an error’ i am not a coder so I don’t really know how to look for the problem. Help please