Discussion:
[tw] [tw5] diffview macro plugin plus UI enhancements using jsdiff.js. Beta testers?
wjam
2017-12-08 17:24:33 UTC
Permalink
hi,

I am working on a modified version of jsdiff (GitHub - kpdecker/jsdiff
<https://github.com/kpdecker/jsdiff>) for tiddlywiki 5.1++,

The diffview macro plugin shows deletions and additions grouped by
small(=character) medium, word or large(=line) grouped data or just the
modified lines.
of strings, tiddlers, subtiddlers, e.g.:

<Loading Image...>

*UI enhancements using the macro:*

For tw5.1.14+ I use the macro to show TEXT field delta's during and after
edit (info tab), and before import.

*Preview diffs before commit edits, compare to shadow:*
When you edit a tiddler you can view the current changes, but also changes
compared to previous edits.
In the preview tab it shows the changes you made to the TEXT field during
the edit of the tiddler


The preview tabs.

<Loading Image...>

Please note: diffview is a macro not a widget, so it is not rendered in
real time, that would have too much performance impact,
You have to switch manually between preview tabs for an update you can use
the preview collapse tab on the left.

*Zen Edit:*
It also has a Zen Edit tab so editing without preview, tags, or fields is
now possible

some of the edit tabs

<Loading Image...>

*Tags()*
Alternative way to add remove tags, fields, type, also shows used by
(~infotidller references)

*TOC:*
Alternative way to add a tiddler to the table of Contents.

*Importing:*
Before importing (drag drop) tiddler, you can now view the modifications to
the TEXT field.


*Enable disable tabs:*
You can hide/show tabs using the ?-tab, which also contains some help info.

<https://lh3.googleusercontent.com/-yrFOZjhM84o/Wiq0vAaWwuI/AAAAAAAAALA/3u8cFBh9GAgcp13rg4O_tejr8aGaHL3ggCLcBGAs/s1600/Screenshot%2B-%2B2017-12-08%2B%252C%2B16_49_15.png>

*Current Status:*

it is about 92% ready,

to do
- some minor issues, mostly clean up
packaging :
-diffview macro (as a plugin) tw5.0 or tw51+
-edit enhancements (about 40 tiddlers, including some core tiddlers)
tw5.1.14+
-import enhancements (about 10 tiddlers, including some core tiddlers)
tw5.1.14+

Any beta testers for a pre-release of the above?

For more info see about tab at

* _ _ _ _ _ _*.tiddlyspot.com (url will be disclosed later)


KR
wjam/
wiemmore NL
--
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/a9b1db5a-4ea9-4d49-8e74-0f6d886af88b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Diego Mesa
2017-12-08 17:43:33 UTC
Permalink
I'd gladly help beta test!
Post by wjam
hi,
I am working on a modified version of jsdiff (GitHub - kpdecker/jsdiff
<https://github.com/kpdecker/jsdiff>) for tiddlywiki 5.1++,
The diffview macro plugin shows deletions and additions grouped by
small(=character) medium, word or large(=line) grouped data or just the
modified lines.
<https://lh3.googleusercontent.com/-He32OITR5dw/Wiq01lqDPnI/AAAAAAAAALE/_i3jjvGk_KsSD7iq_D0R63cJDpTTK17WwCLcBGAs/s1600/Screenshot%2B-%2B2017-12-08%2B%252C%2B16_46_56.png>
*UI enhancements using the macro:*
For tw5.1.14+ I use the macro to show TEXT field delta's during and after
edit (info tab), and before import.
*Preview diffs before commit edits, compare to shadow:*
When you edit a tiddler you can view the current changes, but also changes
compared to previous edits.
In the preview tab it shows the changes you made to the TEXT field during
the edit of the tiddler
The preview tabs.
<https://lh3.googleusercontent.com/-yjjusDdauuk/Wiq1yYMtpiI/AAAAAAAAALM/Fngy0p3IfcMHr9wF8CMHRZ9UcxkT-E9gQCLcBGAs/s1600/Screenshot%2B-%2B2017-12-08%2B%252C%2B16_54_37.png>
Please note: diffview is a macro not a widget, so it is not rendered in
real time, that would have too much performance impact,
You have to switch manually between preview tabs for an update you can use
the preview collapse tab on the left.
*Zen Edit:*
It also has a Zen Edit tab so editing without preview, tags, or fields is
now possible
some of the edit tabs
<https://lh3.googleusercontent.com/-yrFOZjhM84o/Wiq0vAaWwuI/AAAAAAAAALA/3u8cFBh9GAgcp13rg4O_tejr8aGaHL3ggCLcBGAs/s1600/Screenshot%2B-%2B2017-12-08%2B%252C%2B16_49_15.png>
*Tags()*
Alternative way to add remove tags, fields, type, also shows used by
(~infotidller references)
*TOC:*
Alternative way to add a tiddler to the table of Contents.
*Importing:*
Before importing (drag drop) tiddler, you can now view the modifications
to the TEXT field.
*Enable disable tabs:*
You can hide/show tabs using the ?-tab, which also contains some help info.
<https://lh3.googleusercontent.com/-yrFOZjhM84o/Wiq0vAaWwuI/AAAAAAAAALA/3u8cFBh9GAgcp13rg4O_tejr8aGaHL3ggCLcBGAs/s1600/Screenshot%2B-%2B2017-12-08%2B%252C%2B16_49_15.png>
*Current Status:*
it is about 92% ready,
to do
- some minor issues, mostly clean up
-diffview macro (as a plugin) tw5.0 or tw51+
-edit enhancements (about 40 tiddlers, including some core tiddlers)
tw5.1.14+
-import enhancements (about 10 tiddlers, including some core tiddlers)
tw5.1.14+
Any beta testers for a pre-release of the above?
For more info see about tab at
* _ _ _ _ _ _*.tiddlyspot.com (url will be disclosed later)
KR
wjam/
wiemmore NL
--
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/c30d7e30-007f-412f-a5eb-43bed6a6301b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
wjam
2018-02-14 14:27:12 UTC
Permalink
sorry for the delay, had some other priorities, I also made some UI
changes, which are not displayed in this version.

you can have a go at

twjam5beta.tiddlyspot.com

you can view the diff using different compare algorithms (char/small, word,
medium, line, delta show only changed lines)

this version includes versioning of the body text of the tiddler.
The old version is stored after pressing the V */\* in the edit toolbar
which appears when the draft text differs from the original text.
it will be stored in a separate tiddler with prefix
$:/oldtxt/tiddlerrtitle/datetimestamp

for more documentation see the about tiddler

KR
wjam
--
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/fec8b449-c753-4ebb-8f11-211233fadedf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
wjam
2018-02-15 10:58:57 UTC
Permalink
small update
corrected default tiddlers, to show demo tiddler
--
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/f6838f0d-dfa2-4db2-96d2-ea64f2c3cb52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jeremy Ruston
2018-02-15 13:41:54 UTC
Permalink
Hi wjam
I am working on a modified version of jsdiff (GitHub - kpdecker/jsdiff) for tiddlywiki 5.1++,
Awesome! I'm sorry I missed your original message: I kicked off something similar but less ambitious a couple of weeks ago:

https://github.com/Jermolene/TiddlyWiki5/pull/3112

It would be good to combine the best of the two implementations.

Best wishes

Jeremy

--
Jeremy Ruston
***@jermolene.com
https://jermolene.com
small update
corrected default tiddlers, to show demo tiddler
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
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/f6838f0d-dfa2-4db2-96d2-ea64f2c3cb52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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/CDF4A963-1A31-47FB-8D8B-570DF0299377%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
@TiddlyTweeter
2018-02-15 15:04:01 UTC
Permalink
wjam & Jeremy

I'm much interested in this from the point of view ...

1 - ... of an end user who writes zillions of drafts to hone writing. You
can't hone writing unless you can revisit your previous drafts. Its too
cumbersome in TW at the moment to remember to clone, rename and order. It
makes drafting too complicated

2 - ... as an experimenter with complex regular expressions. RegEx is
notoriously difficult once it gets complex to "debug". Auto-tracking and
Auto-Step-Back would make it more viable for me to do more RegEx work in
TW, which is what I'd like to do.

Best
Josiah
--
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/5ca83dff-d687-4b07-acc0-8081a900f479%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
wjam
2018-02-15 17:45:58 UTC
Permalink
@Jeremy,
thank you very much for your kind words.

@Josiah,
to support both sorts of drafting
you can use the tiddlerinfo tab to compare current version to previous versions of the tiddler.
NB if you do not want to make a backup use ctrl_enter or the standard V button.

i am also working on a versionstab for the side bar. it will show all the titles of modified tiddlers plus the titles of the oldtxt tiddlers. you can select one of those titles to compare current text with the oldtxt. or you can open the old text like the tiddler info tab. I'll upload it soonish.

wjam
--
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/37dd62e9-af67-4618-8119-1ef5b8a2a717%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
wjam
2018-03-11 14:52:06 UTC
Permalink
UPDATE

*Versions tab in the sidebar*

showing all revisions (last 80 days max 14/tiddler)

including options to preview/compare changes, delete oldtxt, or restore
oldtxt.

*Logs tab, *

showing log tiddlers (log_YYYYMMDD)

with time stamps when tiddlers were changed

including options to preview & delete one of the log tiddlers

KR
wjam...
--
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/321bbc18-2246-4b2b-8d36-cf812bbe9f6b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jeremy Ruston
2018-03-14 21:51:35 UTC
Permalink
Hi wjam

This is looking good, congratulations. As discussed above, we need to figure out how to reconcile this with the PR I’ve been working on (https://github.com/Jermolene/TiddlyWiki5/pull/3112 <https://github.com/Jermolene/TiddlyWiki5/pull/3112>):

The first thing to note is that your version has many more more features. That’s great, but I’m also mindful of the discussion we’ve been having about whether diffing should go into the core (https://groups.google.com/d/topic/tiddlywiki/tqVmYrWCXf0/discussion <https://groups.google.com/d/topic/tiddlywiki/tqVmYrWCXf0/discussion>). I believe that we should put it in the core for the reasons I’ve given elsewhere (because it is of universal utility, and to enable further development using the same library). However, because of concern about bloat I think only the most essential UI functions should go in the core).

The second point is that you are using a different JS library (https://github.com/kpdecker/jsdiff <https://github.com/kpdecker/jsdiff> vs. https://github.com/google/diff-match-patch <https://github.com/google/diff-match-patch>). I’m using the latter because it’s highly regarded and I’m familiar with it. There’s also the matter that your implementation incorporates the library as a macro, rather than a widget, which causes issues with the refresh mechanism.

So, I’m going to go ahead and merge #3112, and I hope we can work together to bring your additional features to the core implementation,

Best wishes

Jeremy.
Post by wjam
UPDATE
Versions tab in the sidebar
showing all revisions (last 80 days max 14/tiddler)
including options to preview/compare changes, delete oldtxt, or restore oldtxt.
Logs tab,
showing log tiddlers (log_YYYYMMDD)
with time stamps when tiddlers were changed
including options to preview & delete one of the log tiddlers
KR
wjam...
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
Visit this group at https://groups.google.com/group/tiddlywiki <https://groups.google.com/group/tiddlywiki>.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/321bbc18-2246-4b2b-8d36-cf812bbe9f6b%40googlegroups.com <https://groups.google.com/d/msgid/tiddlywiki/321bbc18-2246-4b2b-8d36-cf812bbe9f6b%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout <https://groups.google.com/d/optout>.
--
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/49B6AD25-5E4A-4B45-B097-15EEE2DE2214%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
@TiddlyTweeter
2018-03-15 20:24:12 UTC
Permalink
Ciao wjam & Jerremy

I am using wjam's version. I have been for some weeks now. Its really
excellent!

I can only comment from the surface level of what i do.

CASE 1 - *Developing Regular Expressions in TW*. It has been a godsend to
be able to backtrack multiple versions. IMO the number of PAST VERSIONS to
save should be user configurable from 1 up to infinity. The reason (that
working with Regex really brings out) is that you can be developing
something that later can be used to BRANCH a totally different way ...
Without that version saved you lose it.

But say I have versions 1 thru 20. And realise that only version 15 and 17
are special. Can I delete the others? What happens in the editor when I
load the TW associated with those versions I deleted?

To sum up: Versioning is Good. Very good. For my use case I do NOT need to
access in the editor directly to all the previous versions. Just know they
are there if I need. But also be able to delete what I don't.

CASE 2 - *Writing Screenplays*. Here my need is more limited. Two backsteps
is way enough for most practical purposes. There is no need for "branching"
or preservation beyond two previous drafts. I'd simply like to be able to
look at what I wrote before sometimes.

These variant cases indicate that in Case 1 I'd prefer infinite versions
saved. In Case 2, two would be enough.

HOW SHOULD IT LOOK? -- Well, in practice I'm only using the wjam view that
shows things down to character change level. I love how its configurable
in-situ. In practice I have most of the options OFF. In practice I'm likely
to just use one mode.

MOANS: Not sure this is solvable but full alignment of editing text and
what was in the previous version. The preview area is not exactly optimal
for easy comparison. Under wjam you get this (screenshot) ...



It would be better IMO to put the notes about past versions that currently
appear above the text in "preview" *under* the text.

And, if possible, have an option to totally switch off the display of the
menu in the preview pane so the previous version can be properly
top-aligned. Adjustable widths for the editor and preview windows would
enable better visual alignment too.

IMO that is the best way to compare versions--that the start of a line in
the editor you can align with the corresponding point in previous version.
at the moment that seems cumbersome.

Best wishes
Josiah
Post by Jeremy Ruston
This is looking good, congratulations. As discussed above, we need to
figure out how to reconcile this with the PR I’ve been working on (
--
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/19d03210-12a2-4e77-a0a7-749e912838bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
wjam
2018-03-16 09:19:29 UTC
Permalink
Josiah,
Post by @TiddlyTweeter
Ciao wjam & Jerremy
I am using wjam's version. I have been for some weeks now. Its really
excellent!
Thanks, glad to hear some actual user feedback
Post by @TiddlyTweeter
I can only comment from the surface level of what i do.
CASE 1 - *Developing Regular Expressions in TW*. It has been a godsend to
be able to backtrack multiple versions. IMO the number of PAST VERSIONS to
save should be user configurable from 1 up to infinity. The reason (that
working with Regex really brings out) is that you can be developing
something that later can be used to BRANCH a totally different way ...
Without that version saved you lose it.
But say I have versions 1 thru 20. And realise that only version 15 and 17
are special. Can I delete the others? What happens in the editor when I
load the Tiddler associated with those versions I deleted?
The revision contain a complete copy of original text (before you started
editing) The revision is only stored when you press the commit with */\*
(empty texts are not stored)
If you press the garbage can next to an old version is will have no effect
on any of the other oldtexts, , all others in */\-old tabs *will still
look the same.
If you don't want to save a revision , either use the ctrl-enter short key
or the commit without the small */\*
Post by @TiddlyTweeter
To sum up: Versioning is Good. Very good. For my use case I do NOT need to
access in the editor directly to all the previous versions. Just know they
are there if I need. But also be able to delete what I don't.
Indeed the [?] tab allows you to disable tabs which you do not need for
your use case and gives a short description for each of the symbols used on
the tabs.
Post by @TiddlyTweeter
CASE 2 - *Writing Screenplays*. Here my need is more limited. Two
backsteps is way enough for most practical purposes. There is no need for
"branching" or preservation beyond two previous drafts. I'd simply like to
be able to look at what I wrote before sometimes.
These variant cases indicate that in Case 1 I'd prefer infinite versions
saved. In Case 2, two would be enough.
HOW SHOULD IT LOOK? -- Well, in practice I'm only using the wjam view that
shows things down to character change level. I love how its configurable
in-situ. In practice I have most of the options OFF. In practice I'm likely
to just use one mode.
MOANS: Not sure this is solvable but full alignment of editing text and
what was in the previous version. The preview area is not exactly optimal
for easy comparison. Under wjam you get this (screenshot) ...
It would be better IMO to put the notes about past versions that currently
appear above the text in "preview" *under* the text.
I'm working on something like the radio buttons in the Versionstab in the
sidebar
Post by @TiddlyTweeter
And, if possible, have an option to totally switch off the display of the
menu in the preview pane so the previous version can be properly
top-aligned. Adjustable widths for the editor and preview windows would
enable better visual alignment too.
This would be difficult to implement.
Post by @TiddlyTweeter
IMO that is the best way to compare versions--that the start of a line in
the editor you can align with the corresponding point in previous version.
at the moment that seems cumbersome.
For the short term, maybe you can temporarily add some empty lines at the
beginning of your tiddler text in the draft part on the left, so the texts
are aligned
see attached image ;-)
Post by @TiddlyTweeter
Best wishes
Josiah
Post by Jeremy Ruston
This is looking good, congratulations. As discussed above, we need to
figure out how to reconcile this with the PR I’ve been working on (
--
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/884a4d18-25a9-4057-acb1-4ffd862d2b0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
wjam
2018-03-17 14:36:52 UTC
Permalink
Josiah,

update: added a tab with caption */\*-all, maybe this is more to your
liking?

KR
wjam
--
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/576185ef-9daa-46b8-9925-be84ade1749a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...