Done Close and Cancel Close toolbar options

234 views
Skip to first unread message

TonyM

unread,
Sep 5, 2017, 2:59:09 AM9/5/17
to TiddlyWiki
Folks,

A Feature I added by plugin and loved in TWClassic used in edit mode was "Done Close" and "Cancel Close" toolbar options.

Has anyone developed same for TW5, or could suggest how to?

Thanks in advance
Tony

TonyM

unread,
Sep 5, 2017, 3:36:17 AM9/5/17
to TiddlyWiki
Folks,

Here is my steps to answering my own question. On the Cancel Close Button, see below for the last piece of the Puzzle I do not have.

  • Clone $:/core/ui/Buttons/cancel
    • Rename to $:/core/ui/Buttons/cancelclose
  • Clone $:/language/Buttons/Cancel/Hint to $:/language/Buttons/CancelClose/Hint
    • change content to "Discard and close this tiddler"
  • Clone $:/language/Buttons/Cancel/Caption to $:/language/Buttons/CancelClose/Caption
    • change content to "cancel/close"
  • Edit $:/core/ui/Buttons/cancelclose
    • Rename the Cancel/hint and Cancel/Caption to CancelClose/hint and CancelClose/Caption respectively
    • Place {{$:/core/images/close-button}} after 1st {{$:/core/images/cancel-button}}
      • Looks OK especially when using ControlPanel > Settings > Toolbar Button Style > Boxed but you could replace with another button Icon
    • add <$action-sendmessage $message="tm-close-tiddler"/> before last </$list>

This "Works" on the Draft Of Tiddler name but the original tiddler remains open, how do I also Close the Original tiddler?


I can publish this as a plugin (with better Icons) once working, and if not already available but It would be a nice option in the "Core" with little effort.


Thanks in advance

Tony






TonyM

unread,
Sep 5, 2017, 3:44:46 AM9/5/17
to TiddlyWiki
Post Script,

I would also like to toggle On/Off the Dialogue that asks "Do you wish to discard changes to the tiddler "

After all I will only loose the changes to this tiddler

Regards
Tony

Thomas Elmiger

unread,
Sep 5, 2017, 6:57:42 AM9/5/17
to TiddlyWiki
Hi Tony

You might be interested in the (itermediate) result of my latest hack ;–)

See: https://tid.li/tw5/hacks.html#Save%20and%20close%20Button%20Plugin

All comments I have are there. Sorry, I am in a hurry.

Good luck!
Thomas

@TiddlyTweeter

unread,
Sep 5, 2017, 7:19:38 AM9/5/17
to TiddlyWiki
Ciao Thomas

Excellent. Not least the icon. This makes what I'm already using--the great initial RichardWS version--into an even better version.

I hadn't really grasped the caveats on where it can't work. I just got confused. Hats off to you so I don't have to encounter that confusion.

Josiah, x

TonyM

unread,
Sep 5, 2017, 7:26:43 AM9/5/17
to TiddlyWiki
Ha Ha, Thomas,


Great minds think alike or is it fools never differ?



I am still trying to find out how to color them, and do not know how to close the original tiddler.

PS I would simply adopt your plugin however I am 90% of the way to making my own with the above two issues. I will see if I can harvest the answers from yours.

Argggh

Tony
Auto Generated Inline Image 1

Thomas Elmiger

unread,
Sep 5, 2017, 1:04:17 PM9/5/17
to TiddlyWiki
Only great minds in this group, Tony, only great minds :–)

The color can be adjusted via CSS fill attribute:

<style>
.tc-image-done-button {
fill:red;
}
</style>

Maybe you will have to add your own class or a span with an additional class to get the desired result.

Good luck!

@TiddlyTweeter

unread,
Sep 5, 2017, 1:12:41 PM9/5/17
to TiddlyWiki
I have a very, very small mind.

Am I excluded?

Thomas Elmiger

unread,
Sep 5, 2017, 1:51:19 PM9/5/17
to tiddl...@googlegroups.com
Obviously not. 

--
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/rujZUPCF3HY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/b5039d6c-a86d-43e2-8c25-3d22bf0e0233%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Mat

unread,
Sep 9, 2017, 9:29:07 AM9/9/17
to TiddlyWiki
In deed, I would very much like DoneClose and CancelClose. They were very useful in TWC.


@Thomas, I can only see/test one of your hacks there. And you have titled them "Save and close" and "Done and close".  but I'm wondering if you really mean "Done and close" and "Cancel and close" as in the OP. Or maybe you really do mean "Save [the TW] and close [tiddler]"?

<:-)

Thomas Elmiger

unread,
Sep 9, 2017, 10:01:12 AM9/9/17
to tiddl...@googlegroups.com
Mat, I should have called it "Done and close". 
My own TW is saved by Tiddlyfox when I am done … so the name seemed logical to me. Thank you for pointing out the difference! 
-t

Thomas Elmiger

unread,
Sep 12, 2017, 6:48:55 AM9/12/17
to tiddl...@googlegroups.com
Hi folks, 

Good things first: Both buttons are working now and you can download all 4 components of the prototypes from the link I posted before :–)

Not that good: I am a bit confused again about how to name the Done/Save-and-close button. 

Existing parts for similar functionality (without the closing) operate with the following terms: 

Hint: Confirm changes to this tiddler
Button: save
Image: done
Caption: ok

As stated before: Clicking the Done/Save button in my eyes saves the tiddler. Technically it deletes the prior version from TW internal memory and saves the new/updated version instead. And it triggers an autosave operation if you have TiddlyFox installed as I have. 
So «save» seems to reflect the user expectation after clicking on edit and applying changes, then you would want to save your work, wouldn’t you? Maybe you are just done or one is as good as the other?

On the other hand under certain conditions your wiki might not be saved and users are not as safe as they would like to be until they save/download their whole wiki – then «done» or «confirm» would be more precise. 

As a new caption I thought about ”Confirm changes and close this tiddler". That seems consistent with existing wording to me.

What do you think? 

Stay safe 
Thomas 

Thomas Elmiger

unread,
Sep 12, 2017, 6:55:14 AM9/12/17
to TiddlyWiki
Here is the link again, the thread is already longer than I thought:

You might be interested in the (itermediate) result of my latest hack ;–)

https://tid.li/tw5/hacks.html#Save%20and%20close%20Button%20Plugin

-t

Mat

unread,
Sep 12, 2017, 7:36:27 AM9/12/17
to TiddlyWiki
Thomas, thank you very much for this. I will use them!!!

Not that good: I am a bit confused again about how to name the Done/Save-and-close button. 

IMO they should stay as close to the native non-closing versions as possible. The main reason is for when showing the button text instead of the icon. (That said, I do agree that the instinctive term is to "save a tiddler".)
 
BTW a nitpick:
It would be better if the icons kept the same dimensions as the other buttons. I did this little experiment and think it looks pretty good thanks to your idea to use both gray and black. IMO the X's are visible enough to instantly differentiate them from their non-closing variants.

<:-)


close-buttons.png

TonyM

unread,
Sep 12, 2017, 8:10:55 PM9/12/17
to TiddlyWiki
Thomas,

I am not sure if you have addressed this or not,

A quick comment from my perspective Done/Close and Cancel/Close are operations we do on a tiddler, of course when we click the Tic we expect it to save the tiddler, and cancel to not save the changes we just made. The Auto-save feature should in my view remain separate and distinct. Of course done/close can trigger the wikisave but we must be able to turn off the save of the tiddlywiki for large wikis or slow remote hosted wikis.

Surprisingly large wikis can be practical as long as autosave can be stopped.

I will test your plugin soon, thanks

Tony
--
--

Thomas Elmiger
Lorenwäldlistrasse 34
8630 Rüti ZH

Thomas Elmiger

unread,
Sep 13, 2017, 3:54:40 AM9/13/17
to TiddlyWiki
Hi Tony

There is no plugin yet, you will have to import 4 tiddlers atm. Maybe it can become a plugin later.

I did not change any standard behaviour of any kind, basically I copied the existing buttons, added the command to close the tiddler in the storyriver and an icon variant.

Good luck!
-t

@TiddlyTweeter

unread,
Sep 13, 2017, 9:07:15 AM9/13/17
to tiddl...@googlegroups.com
Ciao Thomas on Mittwoch,

A small, contentious, issue, perhaps, is the wording. I have an opinion on this ...

I see what you developed as just "Save & Close". Full Stop. Done.


The complications of the lexicon of "Done & Close So Long As You Are Running TiddlyFox"--which is the underlying semantic--is a different thing & it messes up simplicity by surrogate phrasing that way. It weakens the immediate relevance of what the button does.  

Lets NOT blur up basic EDITING ACTIONS with "HAVE I GOT THIS THING WORKING YET?" ...

You get my point?

Best wishes
Josiah

@TiddlyTweeter

unread,
Sep 13, 2017, 10:35:02 AM9/13/17
to TiddlyWiki
Ciao Thomas, still in Mittwoch,

FURTHER to last, looking at the current lingo on saving ... it reads very NEUTRAL ... "Confirm changes on this tiddler" ... that is fine ... so what about "Close this tiddler & save changes."

BTW, it was NOT a good a idea to say its a "plugin" before it is one. That will cause you hassle as people look for the plugin not yet created. Lol. :-)

Josiah, x

@TiddlyTweeter

unread,
Sep 13, 2017, 12:58:15 PM9/13/17
to TiddlyWiki
Ciao all

I'm really struck at what this simple extension enables.

I'm bemused why it was never done before.

IMO it supports a "model" of working where the editor can be used to create FOR a purpose more precisely.

Its gets away from the, I think, rather stupid idea, of the "random" story view where anything you created or edited ended up in the stream as a matter of course. That never made any sense to me. I was forever clicking "close" after edit.

This approach is maybe what the DEFAULT should have been.

Thoughts in a tetchy mood.

But, still, best wishes
Josiah

Thomas Elmiger

unread,
Sep 15, 2017, 5:05:48 PM9/15/17
to tiddl...@googlegroups.com
Hi all,

BTW, the buttons are available as a plugin EditButtons now: https://tid.li/tw5/plugins.html.

BTW, it was NOT a good a idea to say its a "plugin" before it is one. That will cause you hassle as people look for the plugin not yet created. Lol. :-)

In my eyes it should be near to core quality so I hope this works for you.

Cheers,
Thomas

@TiddlyTweeter

unread,
Sep 16, 2017, 6:07:46 AM9/16/17
to tiddl...@googlegroups.com
Ciao Thomas

Thomas Elmiger wrote:
BTW, the buttons are available as a plugin EditButtons now: https://tid.li/tw5/plugins.html.

I love how you often polish your stuff into THE FULL MONTY *---rather than leaving it as a half-done suggestion.

This one--letting you save a tiddler and immediately close it--simple as it is, is really, really useful IMO.

Kudos to you!
Josiah

P.S: * When Wikipedia says THE FULLY MONTY "is a British slang phrase of uncertain origin" its incorrect. A "Full Monty" is a complete breakfast--bacon, eggs, tomatoes, mushrooms & fried bread & a large mug of tea--in other words you get EVERYTHING.

Mat

unread,
Sep 17, 2017, 7:32:27 PM9/17/17
to TiddlyWiki
Thomas, this is already bringing value in my tiddly fiddling. Thank you!

<:-)
Reply all
Reply to author
Forward
0 new messages