Discussion:
[tw] [TW5] Way to open certain tiddlers as draft by default?
(too old to reply)
Zyb
2017-04-08 23:42:08 UTC
Permalink
Dear all,

I’ve noticed that there is a group of tiddlers in my main TW that I only
ever open to edit them, like custom stylesheets or tiddlers that collect
data: I don’t *look* at their content, I just add to it and manipulate it,
so that other tiddlers do stuff with their content. It would add to my
productivity if any links to these tiddlers (especially those in the ToC)
would open them as drafts immediately, without the need to open them first
and then click on the edit button.

Is there a way to change all links of, say, tiddlers with a specific tag,
into edit links (button widgets, if I’m not mistaken)? Or that a clickable
edit icon is appended to the (normal) link?

I’ve been using TWC and TW5 for a long time and can understand some code,
but I don’t have experience programming plugins, so any hint is
appreciated! :)

All best,
Tyll
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/c177fe06-11b6-44a7-9004-17a3cd56b288%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-04-09 20:34:55 UTC
Permalink
Good idea. I posted it as a github request issue
<https://github.com/Jermolene/TiddlyWiki5/issues/2825>. In deed, the
absolute majority of system plugins are just irrelevant ti view!

One route may be to use the EditTextWidget
<http://tiddlywiki.com/#EditTextWidget> for things you only want to edit.
I.e put it in another tiddler and have it display the contents from the
tiddlers you want to edit. If this sounds relevant for you then I'll see if
I can dig up an old template I made for this.

<:-)
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/3a9a8df9-76b6-4745-9f76-06540dbe2d63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Zyb
2017-04-09 21:15:35 UTC
Permalink
Thanks Mat!

What I came up with in the meantime was that I created a tiddler QuickEdit
and added this list filter to it

<ul class="quickedit">
<$list filter="[tag[QuickEdit]]"><li><$button message="tm-edit-tiddler"
param=<<currentTiddler>> class="tc-btn-invisible
tc-tiddlylink">{{$:/core/ui/Buttons/edit}} <<currentTiddler>></$button></li>
</$list>
</ul>

I tagged all the respective tiddlers with QuickEdit and transcluded the
tiddler in a designated sidebar section, fancied up with a little CSS. For
now, this serves the purpose well enough (sort by title is okay because I
have strict naming rules), but of course I will run into trouble once the
list becomes very long. Plus, such a separate list is not strictly
necessary, I’d prefer a universal solution where links to tagged tiddlers
are treated thus all through TW, no matter where they occur.

Re EditTextWidget: Do I understand you correctly that your suggestion would
be to actually work with two tiddlers, one content/data tiddler and one
edit tiddler? The latter would contain only the edit widget displaying the
content of the data tiddler, but I would use it for all intents and
purposes as if it were the data tiddler. Yes, okay, that could work. I
haven’t worked with the EditTextWidget before, I give it a try!

And what kind of template did you use for this?

Thanks again and all best!
Tyll
Post by Mat
Good idea. I posted it as a github request issue
<https://github.com/Jermolene/TiddlyWiki5/issues/2825>. In deed, the
absolute majority of system plugins are just irrelevant ti view!
One route may be to use the EditTextWidget
<http://tiddlywiki.com/#EditTextWidget> for things you only want to edit.
I.e put it in another tiddler and have it display the contents from the
tiddlers you want to edit. If this sounds relevant for you then I'll see if
I can dig up an old template I made for this.
<:-)
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/beb828be-6d4c-4a61-ac35-e77d5d2ad9c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-04-10 00:06:56 UTC
Permalink
Post by Zyb
Re EditTextWidget: Do I understand you correctly that your suggestion
would be to actually work with two tiddlers, one content/data tiddler and
one edit tiddler? The latter would contain only the edit widget displaying
the content of the data tiddler, but I would use it for all intents and
purposes as if it were the data tiddler. Yes, okay, that could work. I
haven’t worked with the EditTextWidget before, I give it a try!
Yeah, that basically it. But you can also use a EditTextWidget or perhaps a
SelectWidget for the title, meaning that when you enter the title, you get
the text in another bigger EditTextWidget field.


(Edit: This works in principle, but because the changes are applied in real
Post by Zyb
time things become awkward for stylesheets, when everytime I haven’t yet
closed a bracket, parts of the wiki layout disintegrate ... ;) Is there a
way to postpone the changes in the widget and send them on click of an
additional button or something? Yet, the more complex this becomes the more
it simply mimics the normal draft behaviour of TW, doesn’t it ...)
Yes, the trick is to use a temporary tiddler. So basically via a button
(e.g the SelectWidget... at least I think that should work) you'd copy the
current into the temporary and then when done you click another button that
overwrites the temp content into the original.


And what kind of template did you use for this; or more generally: I don’t
Post by Zyb
understand how templates come into play with the widget at all, could you
explain?
I might use the term sloppily. I merely referred to an old thing based on
what I described above with a EditTextWidget for the title and another for
the text. (Side note: A cool discovery in that process was that you could
create tiddlers *silently *by entering a new title and filling in text.
That evolved into QuickTid <http://quicktid.tiddlyspot.com/>.)

<:-)
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/4f1d89ef-8d32-4fa0-ada1-f8f2745bb7f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Zyb
2017-04-10 21:16:08 UTC
Permalink
Thank you, Mat, for your help! This makes me want to fiddle around with
code. :)
Post by Mat
Post by Zyb
Re EditTextWidget: Do I understand you correctly that your suggestion
would be to actually work with two tiddlers, one content/data tiddler and
one edit tiddler? The latter would contain only the edit widget displaying
the content of the data tiddler, but I would use it for all intents and
purposes as if it were the data tiddler. Yes, okay, that could work. I
haven’t worked with the EditTextWidget before, I give it a try!
Yeah, that basically it. But you can also use a EditTextWidget or perhaps
a SelectWidget for the title, meaning that when you enter the title, you
get the text in another bigger EditTextWidget field.
(Edit: This works in principle, but because the changes are applied in
Post by Zyb
real time things become awkward for stylesheets, when everytime I haven’t
yet closed a bracket, parts of the wiki layout disintegrate ... ;) Is there
a way to postpone the changes in the widget and send them on click of an
additional button or something? Yet, the more complex this becomes the more
it simply mimics the normal draft behaviour of TW, doesn’t it ...)
Yes, the trick is to use a temporary tiddler. So basically via a button
(e.g the SelectWidget... at least I think that should work) you'd copy the
current into the temporary and then when done you click another button that
overwrites the temp content into the original.
And what kind of template did you use for this; or more generally: I don’t
Post by Zyb
understand how templates come into play with the widget at all, could you
explain?
I might use the term sloppily. I merely referred to an old thing based on
what I described above with a EditTextWidget for the title and another for
the text. (Side note: A cool discovery in that process was that you could
create tiddlers *silently *by entering a new title and filling in text.
That evolved into QuickTid <http://quicktid.tiddlyspot.com/>.)
<:-)
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/09094746-cbd7-44b8-8b7c-edf37ba22a12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Elmiger
2017-04-11 05:40:07 UTC
Permalink
Hi Zyb and Mat

A simple way for a simple edit-text field (no full fledged editor) would be to establish a conditional view template like I did for my tiddler-notes recently: https://tid.li/tw5/hacks.html#Field%20for%20Notes%20on%20Tiddlers%20with%20a%20Defined%20Tag

You would have to change the start like this:

<$list filter="[all[current]tag[FooBar]]">
<$set name="tid" value=<<currentTiddler>>>
<$edit-text tiddler=<<tid>> placeholder="Your text goes here" default="" rows="3" minHeight="3em" class="te-vt-note-field"/>

Happy hacking!
Thomas
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/71cd66c0-7959-4012-88c4-55b3031ccf9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mat
2017-04-11 08:40:23 UTC
Permalink
Thomas, that's a good idea. And since it could be used/based on tagging,
one could also use the tag to repress the ordinary body field in view mode,
i.e something like

.tc-tagged-FooBar .tc-tiddler-body {display:none;}

One weakness is that unless it's part of core, you'd have to overwrite the
concerned tiddlers to begin with. I wish there was some way to tag tiddlers
without overwriting them. I've done a lot of experimenting before,
attempting to remotely change, or inject into, a tiddler without
overwriting it. One result is the @ttention
<http://attention.tiddlyspot.com/> plugin which, it strikes me now, is
somewhat similar to the idea here with a conditional viewtemplate. In order
to not overwrite the tiddler to begin with, maybe there could be a
predefined list of which tiddlers should be affected, i.e where the
EditTextWidget should show and where the tiddler-body should hide.

<:-)
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/650eba36-ec84-4714-bac7-7ea4223f6df1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thomas Elmiger
2017-04-11 09:13:41 UTC
Permalink
Hi Mat
maybe there could be a predefined list of which tiddlers should be
affected,
The view template plus a settings tiddler to choose where to show/hide. As
the template is applied via filters, we are flexible: some kinds of
tiddlers are tagged by nature: stylesheets, global macros, ... others could
be filtered by title. Maybe experienced users could fill in a filter field,
or the readme could offer popular filters to copy-paste 


As always. The possibilities are endless :)

Cheers, Thomas
--
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 tiddlywiki+***@googlegroups.com.
To post to this group, send email to ***@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/a16d241f-3559-4f86-8a06-ee7d1a289dcf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...