If I use Saq’s Swifty slider, I can put that in a tiddler called ‘Gallery autoplay’ and then I have a series of conditions, which once met from my data input during the week, will automatically open the tiddler and using $:/tags/AboveStory, the gallery will pop up above everything else.
So, this works fine but the Spotlight option would give a better result. It’s just the button activation is the problem.
At first glance, your plugin might be a bit advanced for me, but I’ll have a go and failing that, I can stick to the Swifty Slider option and work with that.
If it works – your code should be safe. But you should still give it a proper test. Make a backup and try to break it – Just for testing. If you can not break it, it should be safe.
If you can break it, you have learned what you should avoid
It’s a disclaimer, because the trigger-widget can cause problems with endless loops. Which in turn can make the browser unresponsive and can lead to data loss. That’s why I need to make it clear.
Especially while developing, when variables are undefined because of a typo and so on – hickups can happen.
You should avoid eg:
In tiddler A you trigger “open tiddler B”
In tiddler B you trigger an action that modifies tiddler A
Modifying tiddler A will re-render it
Rendering tiddler A will trigger the widget →
That’s why action-widgets by default need to be manually triggered with buttons.
The trigger widget needs the “context” of the widget-tree, where it lives in. Eg: If trigger is inside a $let-widget it needs to have access to the variables defined by let. So if one of those variables are changed, the widget will trigger. – That’s intended.
The trigger widget was created, to run automated UI tests in the browser, without user interaction.