Hi! I deleted my previous reply to correct some things:
You can clone these tiddlers (they are tagged $:/tags/EditToolbar or $:/tags/ViewToolbar) and inject the hide-sidebar-action right before the closing </$button> tagadd show sidebar action:$:/core/ui/Buttons/cancel$:/core/ui/Buttons/delete
$:/core/ui/Buttons/saveadd hide sidebar action:$:/core/ui/Buttons/edit$:/core/ui/Buttons/clone$:/core/ui/Buttons/new-here
$:/core/ui/Buttons/new-here
$:/core/ui/Buttons/new-journalThen create these, with all of them having text: hide (so no core button gets overwritten):
$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/edit$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/clone$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here
$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-here$:/config/ViewToolbarButtons/Visibility/$:/core/ui/Buttons/new-journal
$:/config/EditToolbarButtons/$:/core/ui/Buttons/cancel$:/config/EditToolbarButtons/$:/core/ui/Buttons/delete$:/config/EditToolbarButtons/$:/core/ui/Buttons/saveThen all of the above buttons you can package as you wish!
In effect it's like you've replaced the core buttons with your own. I might go this direction with FS plugin but I'm not sure.. I don't want to interfere much with the Toolbar buttons hehe and I'm looking for a different experience (single-tiddler editting without using zoomin view and with sticky editor toolbar and general cleaner interface)- jd
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/OzlHFYjLPhk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/8cac3f0d-b56b-477d-b42e-adf1e6d75124o%40googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/OzlHFYjLPhk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/196c22a3-5645-46d7-8507-c3216eb100f3o%40googlegroups.com.
To unsubscribe from this group and all its topics, send an email to tiddl...@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f9ff984e-169a-4750-9df2-0e0b0a789a34o%40googlegroups.com.
Hi Tony! Yeah I think it boils down to a preference on which method to use?For the third bullet, cloning the svg, I think it's unnecessary when the intent is /just/ to change a color (of course when there are other changes I don't see why not ^^, ). So as to make the plugin more compact, why not just add a class to the custom button and retain the use of the core svg?The second bullet is a nice approach but will kinda break compatibility in a very miniscule way I think. When the intent is to always mimic the look of the core edit button with just the color change, it won't update when for some reason down the line, the core edit svg is updatedSo again I think it comes down to personal preference because they're all correct approaches! As you can tell I prefer fewer tids, which isn't a bad thing but is somewhat(?) against the principle of tiddlers: even the smallest should be ready to be reusable hehe.Thanks for outlining the different approaches!- jd
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f9ff984e-169a-4750-9df2-0e0b0a789a34o%40googlegroups.com.
Cool! But it should be a core feature to be able to go back to the previously selected state of the sidebar on save or cancel, atleast!
Just add this action before the hide-action on the edit button:<$action-setfield $tiddler="$:/state/sidebar/save" text={{{ [[$:/state/sidebar]is[tiddler]!text[]then{$:/state/sidebar!!text}else[yes]] }}}/>Then on your cancel and save buttons, instead of always showing it, get the value of the previous state/save:<$action-setfield $tiddler="$:/state/sidebar" text={{$:/state/sidebar/save}}/>Also, forgive me i'm just wondering, why the new svg's? Wouldn't it make for a smaller plugin to just add a single css tiddler targetting your buttons, then on your buttons add a class that's unique you?
Sample, add a stylesheet to your plugin with text:.am-green svg { fill: green !important; }And to your edit button, for example, return the core edit button image and just replace the class:\whitespace trim<$buttonmessage="tm-edit-tiddler"tooltip={{$:/language/Buttons/Edit/Hint}}aria-label="Am Edit"class={{{ [<tv-config-toolbar-class>addsuffix[ am-green]] }}}><$list filter="[<tv-config-toolbar-icons>match[yes]]">{{$:/core/images/edit-button}}</$list><$list filter="[<tv-config-toolbar-text>match[yes]]"><span class="tc-btn-text"><$text text=" "/><$text text="am edit"}/></span></$list><$action-setfield $tiddler="$:/state/sidebar/save" text={{{ [[$:/state/sidebar]is[tiddler]!text[]then{$:/state/sidebar!!text}else[yes]] }}}/><$action-setfield $tiddler="$:/state/sidebar" text="no"/></$button>
So there would be no need for identical images with just the color difference?Just a thought of course ^^,-jd