Reveal Gradually The Contents of a Tiddler

225 views
Skip to first unread message

Mohammad

unread,
Jun 21, 2018, 10:17:47 AM6/21/18
to tiddl...@googlegroups.com


Announcement




I have developed a small code to gradually reveal contents of tiddler using shortcut keys by KeeBoord pluging (here keeboord.tiddlyspot.com by BTC is used)
An example is created to show the concept. By pressing Arrow keys
  • Right arrow for next  
  • Left arrow for previous
To use this code you need to pass your content to a macro. There are three macros
  1. part01
  2. part02
  3. part03
Each macro will reveal the contents passed to it. Use Right arrow to show the contents in sequence. Use Left arrow to back to previous step.
Note: this feature will be used for slideshow and presentation by Tiddlywiki but can be used for other applications too


Need help

Right now I have to pass contents to a macro for revealing gradually as below

<<part01 "Hi, this is me">>


For complex content I have to use macro like this

<<part01 "
! Hi
This is a text


* one
* two
"
>>



How can I pass content like a widget! (or like html tags) I mean how can I use a syntax like this

<part01>
Contents goes here!
</part01>


I dont want to develop a full widget with JS!

Please advise.





@TiddlyTweeter

unread,
Jun 21, 2018, 10:27:10 AM6/21/18
to TiddlyWiki
Brilliant idea! Many uses!

Just as great you can reverse it too!

Best wishes
Josiah

Mohammad

unread,
Jun 21, 2018, 10:31:48 AM6/21/18
to TiddlyWiki
Thank you Josiah!

If I can use tag like <part01> Contents </par01> then it would be much easier to use.
Credits go to BurningTreeC for his great help and also people like you in this forum which are quite helpful.

Cheers
Mohammad

Jeremy Ruston

unread,
Jun 21, 2018, 11:36:13 AM6/21/18
to tiddl...@googlegroups.com
Hi Mohammad


On 21 Jun 2018, at 15:17, Mohammad <mohammad...@gmail.com> wrote:

How can I pass content like a widget! (or like html tags) I mean how can I use a syntax like this

<part01>
Contents goes here!
</part01>


I dont want to develop a full widget with JS!

I’m afraid that you would need to write a widget to use a syntax like that.

Best wishes

Jeremy

Mohammad

unread,
Jun 21, 2018, 11:47:14 AM6/21/18
to TiddlyWiki
Hi Jeremy
 Thank you for your comment!
Seems I have to learn JS :-).
I found some resources on developing widget for TW. I appreciate to have your advise!
Or if you think there is a simpler solution for reveal content gradually.

Cheers
Mohammad

Jed Carty

unread,
Jun 21, 2018, 12:33:08 PM6/21/18
to TiddlyWiki
I think that you can do this without a new javascript widget.

You can make a list widget that uses first{!!position} and then put a number in the position field of the tiddler and increment that number. I think that this can be done with only core widgets and filter operators. My internet connection is going down every few minutes but I may be able to throw together a quick demo of what I mean.

Mohammad

unread,
Jun 21, 2018, 12:59:50 PM6/21/18
to TiddlyWiki
Thank you Jed!

I wait for you to get a better internet connection! I have uploaded a demo on http://revealgradually.tiddlyspot.com/
and I send the pass in a private email to be able to directly edit and implement your idea!


Cheers
Mohammad

Jed Carty

unread,
Jun 21, 2018, 3:15:48 PM6/21/18
to TiddlyWiki
I may have spoken a bit too soon, it isn't quite as simple as just <part01> and </part01>, it is <$list filter=<<p 1>>> and </$list> where you increment the number in the macro and it will reveal things in order.

The problem I ran into is that any solution is either going to be specific to one wiki or have to point to the state anyway so this may be as concise as you could make it even with a custom widget. It would be something like <$part id=01> and </$part>

And this is just a quick proof of concept. Making it go through multiple tiddlers and reveal things in order like powerpoint would take a bit more work but it is possible using this setup.


I think that a more tiddlywiki-like way to do this would be to make each revealed section be a tiddler and then just show more of the list of tiddlers are you progress. That would be significantly simpler and possibly more reusable. But this way uses something not unlike tags the way you asked.

TonyM

unread,
Jun 21, 2018, 7:30:40 PM6/21/18
to TiddlyWiki
Mohammad,

One way to simplify the workflow for this would be to make an editor toolbar button to wrap a section eg <<part01 "section">>
or perhaps <<part01 """section""">> to account for Quotes in the text.

In fact if you follow the model of the more drop-down in the editor toolbar you could have an editor button that drops down to show all three parts, perhaps extend to 7 as a healthy maximum number of reveals.

Let me know if you want help, or me to build such an editor toolbar button, anthough other here can do it as well.

Regards
Tony

David Gifford

unread,
Jun 21, 2018, 8:05:22 PM6/21/18
to TiddlyWiki
Hi Mohammad

This is a cool idea! You need to get your tiddler

'Test Gradual Reveal 01'

to hide by default, since you presume to demo gradual reveals. As it stands, the parts that should be hidden are showing, so hitting the right arrow key appears to do nothing. It was only after I hit the LEFT arrow key - twice - before I could see anything happen.

I will add it to the toolmap.

Mohammad

unread,
Jun 22, 2018, 12:28:58 AM6/22/18
to TiddlyWiki
Jed,
 I think the solution you proposed is better than me. And the 

<$list filter=<<p 1>>>
One
</$list>


is fine in comparison to

<$part p 01>
One
</$part>


What I learned here is, there is no need to use reveal widget, but list can do the same!
The problem is now, we cannot determined when all hidden parts are displayed. 

What you proposed is correct! My fault is I cannot think and implement the tiddlywiki way! I am from Fortran, Matlab, and C world, so my approach is like that.
I think one way is to have a divided content tiddler i.e instead of putting all content in the same tiddler, put the slices into separate tiddlers and reveal them in the main tiddler sequentially, So
 - The main tiddler can have the content to be seen when tiddler is viewed
 - Sub tiddlers can have parts to be displayed gradually in the main tiddler
 - We can count the number of subtiddlers and prevent endless increment the counter (here by 40 in $:/Numbers)



What do you think?

/Mohammad

Mohammad

unread,
Jun 22, 2018, 12:35:30 AM6/22/18
to TiddlyWiki
Thank you Tony!
That is right, we need to have some snippet to be used, but I don't know how to add a new editor button to tollbar. That would be great!
/Mohammad

Mohammad

unread,
Jun 22, 2018, 12:43:01 AM6/22/18
to tiddl...@googlegroups.com
Hi David,

The code uses state tiddler, so if everything is on the screen that means the forward key (here the Right arrow) has been pressed already and you should back to start.
I saved it again to hide sections at start and you could reveal things bye pressing the Right arrow key.

Many thanks to Jed and Simon for their great help and idea!

Lesson learned: I and Jed shared a wiki on tiddlyspot.com and this facilitates the collaboration very much!


/Mohammad




Mohammad

unread,
Jun 22, 2018, 2:00:28 AM6/22/18
to TiddlyWiki
Jed,
 One more thing, when there is two tiddlers with parts hidden because the reveal gradually code uses the same state and temp tiddlers, by revealing one part in the first tiddler, in the second tiddler we will have the first part displayed! I thought we may need to use fields from the tiddler under focus! For example instead of $:/temp/slideprogress we could have a slideprogress filed in the tiddler under focus.
I know this is more difficult, because the action tiddlers (NextPart2-action, PreviousPart2-action) cannot simply find what tiddler is under focus.

Of course for slideshow I have a solution. In slideshow mode as in tiddlyshow.tiddlyspot.com, I use zoomin story view and I also have another action tiddler to navigate among tiddlers (slides). That means I can have some actions when the tiddler is shown like copying the content of a filed into $:/temp/slideprogress or vice versa.

/Mohammad

On Thursday, June 21, 2018 at 11:45:48 PM UTC+4:30, Jed Carty wrote:

TonyM

unread,
Jun 27, 2018, 11:03:53 PM6/27/18
to TiddlyWiki
Mohammad,

I am ready to build you editor button(s), but is the requirement still there?

Can you give me a quick requirements statment eg

Button in the editor toolbar that wraps a "section" of text as follows

<<part01 """section""">>

<<part02 """section""">>

<<part03 """section""">>

How many is the maximum number of sections?

Regards
Tony

Mohammad

unread,
Jun 27, 2018, 11:26:30 PM6/27/18
to TiddlyWiki
Hi Tony
 I used different methods to do the job, but it general it can be like what you wrote:
<<partxx """contents""">>

I will modify it then to adopt other methods.

Thank you

TonyM

unread,
Jun 28, 2018, 12:07:21 AM6/28/18
to TiddlyWiki
Mohammad,

Here are some quick Editor Toolbar buttons attached for wrapping your parts. Just drag or import into a wiki.

Note if you go to Control Panel > Appearance > Toolbars > Editor ToolBar 
you can uncheck them and the well be behind the More dropdown within the editor toolbar, along with other header levels etc..

Let me know if they need an improvement.

Tony
wrapparttoolbarbuttons.bundle.json

Mohammad

unread,
Jun 28, 2018, 12:54:52 AM6/28/18
to TiddlyWiki
Thank you Tony!
It works for me.

/Mohammad
Reply all
Reply to author
Forward
0 new messages