Hi again Thomas, Thank you very much for taking the time to share your mechanism in such detail!
I was able to reproduce your approach, which opens so many new possibilities :) Thank you again, I really appreciate your help with this. Best regards, Hubert On Sunday, 3 May 2020 10:32:45 UTC+1, Thomas Elmiger wrote: > > Hi Hubert, > > Thanks for your kind words and sorry for the delayed response. > > I'm not interested in timers or anything processing-heavy. Your solution >> that triggers the alert when the user is interacting with TW is perfectly >> suitable for me (I assume that the alert is triggered when the refresh >> mechanism fires, which again is triggered by user interaction). >> > Good to see you have the same preferences as me. > > I've had a look at the tiddler $:/plugins/telmiger/reminders/messages >> which is where, I believe, most of the logic happens. You've built it >> beautifully, but unfortunately it's not immediately obvious to me what >> "holds off" the alert from being displayed until, say, the double down >> arrow on the task in the Do section is pressed. >> > I had to take a look again myself ... this is where the messages are > generated according to user settings: either a reminder (don’ forget to > ...) or an alert (did you really forget to ...?!) with slightly different > styling to convey more or less urgency. > > >> As you've noted, an alert can be triggered just by interacting with the >> TW (as long as the deadline is passed), which must imply that the alert is >> not triggered by an action in the button but that some re-evaluation of >> conditions must happen on a refresh cycle. >> > *This is my magic trick: *$:/plugins/telmiger/reminders/display is tagged > $:/tags/TopRightBar > and thus injected and always present in the top right bar. You are not > able to see it, as it is hidden via CSS, but it is re-evaluated as you say > with every refresh cycle. No need to set a tag here :) > > After evaluating if alerting is active and setting the necessary > variables, it creates a list for all tiddlers that have a deadline-field. > The list item <li> will be empty as long as no message should be shown. > When a deadline is near or a task is overdue, the result of the > reminderCheck macro will be a reminder or an alert. The message will be > visible until either the duedate is changed OR the task gets the tag > ToDoNow: > > <section class="te-reminders"> > <ul class="te-list"> > <$list filter="""[has<field>tag<tag>!tag[ToDoNow]!sort<field>]""" > variable="tiddler"> > <li class="todo-item te-flex-item"><$macrocall $name="reminderCheck" > reminder-field=<<field>> tiddler=<<tiddler>> reminderspan=<<span>>/></li> > </$list> > </ul> > > The sorting should make sure the list is sorted according to urgency so a > user can push the first task into the ToDoNow section and postpone the rest. > > So far I see that it's impossible to both have a tiddler tagged >> $:/tags/Alert and not see it displayed as an alert immediately upon >> creation, because once so tagged, such a tiddler *becomes* an alert and >> so it *must *fire. >> > Tagging requires pushing a button as far as I am aware, so i did not use > that. > > I have automated alerts that show on startup (if conditions are met) but >> this uses actions such as <$action-createtiddler/> (creating alerts on the >> fly) embedded in $reveal widgets that narrow down the conditions for >> displaying such alerts. But I can't fire such actions by merely interacting >> with the TW itself, so I can't create alerts on demand in this way without >> running <$action-createtiddler/> somewhere. >> > Ïf this was a question, I hope it is answered now ;–) > > All the best, > Thomas > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/25889c93-7da9-4111-8535-fbf897c30ed6%40googlegroups.com.

