New View Toolbar icon details do not show in Control Panel

68 views
Skip to first unread message

David Nebauer

unread,
Jan 13, 2019, 7:33:11 AM1/13/19
to TiddlyWiki
Using the instructions in the TW5 page and tiddler layout customisation page I have created a new View Toolbar icon which generates a new draft tiddler from a template. It all works fine, except that the new icon does not display correctly in Control Panel > Appearance > Toolbars > View Toolbar.

Here is the tiddler defining the button and associated macro:

\define newTiddlerButton()
 
<$button class=<<tv-config-toolbar-class>>
           tooltip
=<<iconTooltip>>>

   
<!-- Create new tiddler from tiddler titled "$param" -->

   
<$action-sendmessage
      $message
="tm-new-tiddler"
      $param
="$(templateTitle)$"
      title
="$(tiddlerTitle)$"
   
/>

   
<!-- Add as toolbar button -->

   
<$list filter="[<tv-config-toolbar-icons>prefix[yes]]">
     
{{$(iconTitle)$}}
   
</$list>

    <$list filter="[<tv-config-toolbar-text>prefix[yes]]">
      <span class="tc-btn-text"><$text text="$(iconCaption)$"/
></span>
   
</$list>

  </
$button>
\end

<$vars
  iconCaption
="Create a new tiddler from a template"
  iconTitle
="Template Icon Showing a Green Form Regions"
  iconTooltip
="Create new tiddler from 'User Standard Tiddler Template'"
  templateTitle
="User Standard Tiddler Template"
  tiddlerTitle
="Tiddler Title" >

 
<<newTiddlerButton>>

</$vars>

As I said, this mechanism works fine, except for the appearance of the button in the View Toolbar button list in the Control Panel (see image below with a red arrow showing the new button) -- it does not display the icon's image (an svg formatted image tiddler), caption or tooltip (assuming those are the values that display for each icon. [Note: Because the image displays quite smaller than its actual resolution, I have attached it as well, but it is the same image.]
view-toolbar-settings.png
The button's appearance in the Control Panel is not a huge problem, but it is annoying. Are there any alterations I can make to the macro/button tiddler to fix the Control Panel display, or do the changes need to be made elsewhere?




view-toolbar-settings.png

Ton Gerner

unread,
Jan 13, 2019, 8:46:43 AM1/13/19
to TiddlyWiki
Hi David,

The caption field of your button needs an icon and a hint.
The description field of you button needs a description.

See the discussion at https://groups.google.com/d/msg/tiddlywikidev/GUbRjcWei-c/B2q_pD2RDgAJ

And have a look at my - just updated - Customization guide http://tw5custom.tiddlyspot.com/

Cheers,

Ton

David Nebauer

unread,
Jan 14, 2019, 8:41:41 AM1/14/19
to tiddl...@googlegroups.com
Thanks, Ton. I had to read over your instructions a few times before the light bulb went off, but then I was able to complete the setup very quickly and the button now appears properly in the Control Panel listing for the View Toolbar.

In the end I created five tiddlers as per your instructions and called them:
  • $:/core/images/new-from-skeleton
  • $:/language/Buttons/NewFromSkeleton/Caption
  • $:/language/Buttons/NewFromSkeleton/Hint
  • $:/core/ui/Buttons/new-from-skeleton
  • $:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-from-skeleton
Is there any problem using the system namespace, e.g., $:/core, $:/language and $:/config, with regard to future incompatibilties? Should I be using a different namespace with a parallel hierarchy, in the same way some *nix filesystems assign /usr for system files and /usr/local for local customisations?

Also, I don't get the option to mark my threads as closed. Please feel free to do that if you can see that option.

Thanks again for your help.

David

Ton Gerner

unread,
Jan 14, 2019, 10:46:54 AM1/14/19
to TiddlyWiki
Hi David,

Glad you managed to get your button


Is there any problem using the system namespace, e.g., $:/core, $:/language and $:/config, with regard to future incompatibilties? Should I be using a different namespace with a parallel hierarchy, in the same way some *nix filesystems assign /usr for system files and /usr/local for local customisations?

For the namespace I did look at the core buttons (with help of my Exploration guide: http://tw5exploration.tiddlyspot.com/) and just named the new tiddlers accordingly.


Also, I don't get the option to mark my threads as closed. Please feel free to do that if you can see that option.
 
I see a 'Mark as complete' link at the bottom; I'll click it.

Thanks again for your help.

You're welcome.

Cheers,

Ton

 
Reply all
Reply to author
Forward
0 new messages