CamelCase induced bug?

65 views
Skip to first unread message

Michael Wiktowy

unread,
Feb 4, 2021, 8:59:15 AM2/4/21
to TiddlyWiki
Hi,

I noticed something odd and just wondered if this was expected behaviour or a bug:

When putting together a list of palettes using different methods like this:

1)
{{{[all[tiddlers+shadows]tag[$:/tags/Palette]get[name]]}}}

All links

2)
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Palette]]">
     {{!!name}}
</$list>

Those with CamelCase names are links.

3)
<$list filter="[all[tiddlers+shadows]tag[$:/tags/Palette]]">
      <$button class="tc-btn-invisible">
        {{!!name}}
        <$action-setfield $tiddler="$:/palette" text={{!!title}}/>
      </$button>
    </$list>


Now they are buttons but the names with CamelCase break the buttons.

Is this expected behaviour? Should the CamelCasification even be happening in a button context? Are buttons with link labels even useful in some way?

Of course, workarounds exist like turning automatic CamelCase off globally (and saving/reloading) or just stripping off potential CamelCasing with the Text widget like this.

<$list filter="[all[tiddlers+shadows]tag[$:/tags/Palette]]">
      <$button class="tc-btn-invisible">
         <$text text={{!!name}}/>
        <$action-setfield $tiddler="$:/palette" text={{!!title}}/>
      </$button>
    </$list>

Just pointing out a potential setting-specific issue. Thoughts?

/Mike

Mat

unread,
Feb 4, 2021, 4:04:30 PM2/4/21
to TiddlyWiki
Links in button labels have annoyed me also. IMO it is a bug but I think it is intentional based on the repy to this related issue where Jeremy explains why it (i.e that related issue) is justified. See that post and the subsequent 2-3 posts.

<:-)

Michael Wiktowy

unread,
Feb 4, 2021, 4:31:48 PM2/4/21
to TiddlyWiki
Thanks for the pointer to previous conversations ... I would have never found that 5+ yro conversation.

If this is a known quirk then so be it. It is easy enough to work around. I'm not sure it is as useful in the button widget as the link widget but just wanted to document it somewhere.

/Mike

PMario

unread,
Feb 5, 2021, 8:40:35 AM2/5/21
to TiddlyWiki
Hi,
These are known "behaviour"

For 2. and 3. you can use
     <$text text={{!!name}}/><br>
or
    <$view field=name/><br>

add 1:
The {{{<filtered list>>}}} shortcut produces links by default. Jeremy mentioned several times in some github discussions, that in retrospect this was an error. But it won't be changed since it would break backwards compatibility.

There are some ideas discussed at github, which may fix this problem in the future.

-mario

On Thursday, February 4, 2021 at 2:59:15 PM UTC+1 mwik...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages