Charlie, 

Much appreciate you taking time to explain the code. Now I understand what 
is in "DynamicSidebarWidth 
<https://tiddlywiki-programming.neocities.org/CJ_TiddlyWikiProgramming.html#DynamicSidebarWidth>
 
And indeed I have some reading to do about TiddlyWiki

Regards,
On Tuesday, April 6, 2021 at 2:13:08 AM UTC+2 [email protected] wrote:

> Yeah, you have a little bit of reading to do over a 
> https://tiddlywiki.com/.  
>
> For now, I hope I made it modular enough that you can easily alter it for 
> your purposes.
>
> If helpful, here are a few notes (quick, dirty, likely deserving of much 
> better explanation):
> *(note:  I've modified my local copy, reducing to one "vars" widget ... I 
> originally had two lines to make testing/debugging a little easier.)*
>
> *<$vars vCurrentTab= {{{ 
> [all[tiddlers]regexp[state/tab/sidebar]get[text]removeprefix[$:/core/ui/SideBar/]]
>  
> }}}>*
>
>    - VarsWidget <https://tiddlywiki.com/#VarsWidget>
>    - I could have used a  SetWidget, but I prefer the VarsWidget for some 
>       strange reason.
>    - Filters <https://tiddlywiki.com/#Filters> and Filter Operators
>       - This is what I call the programming language of TiddlyWiki.  It 
>       is powerful stuff.  It may be hard to wrap one's mind  around it.  
> Until 
>       something just clicks, and it all makes sense.
>    - The triple curly brackets *(i.e. {{{ }}} )* say "hey,  this is a 
>    filter, run it, give me the result"
>
> *<$list filter="[<vCurrentTab>match[Open]then[40%]] 
> [<vCurrentTab>match[Recent]then[35%]] +[else[25%]]">*
>
>    - ListWidget <https://tiddlywiki.com/#ListWidget>
>       - [<vCurrentTab>match[Open]then[40%]] says: hey, if the tiddler 
>       specified by vCurrentTab="Open", then return "40%", otherwise return 
> nothing
>       - [<vCurrentTab>match[Recent]then[35%]] says: hey, if the tiddler 
>       specified by vCurrentTab="Recent", then return "35%", otherwise return 
>       nothing
>       - Each of the two above are independent filters, results of which 
>       are a combined list of results, which will always result in either one 
> or 
>       no items
>       - +[else[25%]] says: hey, for everything before me amounts to 
>       nothing (i.e. is there one or more values results in false), then 
> return 
>       "25%"
>    
> *{{!!title}}*
>
>    - Transclusion <https://tiddlywiki.com/#Transclusion>
>       - {{!!title}} says:  hey, return the value of the field "title" for 
>       the current tiddler
>          - "!!" is the separator between tiddler name and field name
>          - when tiddler name is not specified, then "current tiddler" is 
>          assumed
>             - "current tiddler" is the current value being processed by 
>             the <$list> ... </$list> loop cycle  
>          
>
> *</$list>*
>
>    - for every value (each one treated as if it is a tiddler) returned by 
>    the filter, that value is considered "current tiddler" by the processing 
>    between <$list> and </$list> 
>    - so <$list> ... </list> is a loop
>
>
> *</$vars>*
>
>    - Everything between "<$vars> and </$vars> can refer to the variable 
>    vCurrentTab, by "<<vCurrentTab>>" outside of filters, and by 
>    "<vCurrentTab>" inside filters
>
>
> On Monday, April 5, 2021 at 7:42:41 PM UTC-3 Anomaly Spy wrote:
>
>> Hi Charlie,
>>
>> Though I don't understand the code snippet in the tiddler 
>> "DynamicSidebarWidth", I understand the concept and am able to do minimal 
>> modifications to serve my purpose. Thank you!
>>
>> Cheers!
>>
>> On Monday, April 5, 2021 at 7:28:41 PM UTC+2 [email protected] wrote:
>>
>>> You'll find my approach (instructions and working sample) in my TiddlyWiki 
>>> Programming <https://tiddlywiki-programming.neocities.org/> 
>>> TiddlyWiki's Setting Up Dynamic Sidebar Width 
>>> <https://tiddlywiki-programming.neocities.org/CJ_TiddlyWikiProgramming.html#Setting%20Up%20Dynamic%20Sidebar%20Width>
>>>  
>>> tiddler.
>>>
>>> That was actually a lot of fun.  It involved searching system tiddlers, 
>>> and I can't help but enjoy digging into the weeds.
>>>
>>> Cheers !
>>>
>>> On Monday, April 5, 2021 at 10:06:56 AM UTC-3 Anomaly Spy wrote:
>>>
>>>> Hello TiddlyWiki contributors, experts and users,
>>>>
>>>> I am an old school (manual) test engineer by profession, who recently 
>>>> stumbled into TiddlyWiki. Forced by the nature of my profession, I have 
>>>> been tinkering with it for a few days now, before starting to use it for a 
>>>> purpose :-) I am a bit familiar to programming, but a stranger to 
>>>> Javascript, HTML or CSS.
>>>>
>>>> Before getting into my first request/question, I want to join the 
>>>> multitude of users who are thankful to Jeremy for this creation and 
>>>> various 
>>>> additions that make it more useful.
>>>>
>>>> My request / question: Can I resize the SideBar based on certain 
>>>> actions? For example, when I click "Recent" in Sidebar, it should have 
>>>> 300px width . When I click tools the SideBar should resize to 600px px, 
>>>> all 
>>>> others should use default width. Can this be done? If yes, how?
>>>>
>>>> Regards,
>>>> Anomaly Spy
>>>>
>>>

-- 
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/a2846557-a95c-4059-86e9-767f0f3b45c7n%40googlegroups.com.

Reply via email to