[TW5] Json Tools for TiddlyWiki v5.1.20!

79 views
Skip to first unread message

Joshua Fontany

unread,
Aug 12, 2019, 3:58:46 PM8/12/19
to TiddlyWiki
Hi everyone!

I am really excited to announce that I have my proof of concept ready for "modular" User Interfaces for TiddlyWiki!

I'm also very excited to officially announce updated JsonMangler and JsonEditor plugins for TW v5.1.20!

There were some last minute tweaks, but I've gotten new example wikis up and running. Any comments or bug reports are greatly appreciated!

https://joshuafontany.github.io/TW5-JsonMangler/


But, hey, wait Josh, that first thing you said. What does that mean? 

Screenshots are always nice. :D

JsonUI_conceptUI_viewTemplate_08.12.2019.png


JsonUI_conceptUI_editTemplate_08.12.2019.png



I'll try to keep the explanation high-level, but basically:

  • A Jsoneditor Widget uses a 'schema definition' (a json tiddler) to render one of two "data json tiddlers".
  • The first data-tiddler holds wiki-text (not raw data!) for the View Template. This wikitext points to fields on the current tiddler and renders a custom UI elements for each.
  • The second data-tiddler holds wiki-text for the Edit Template! It points to fields on the current tiddler and renders custom UI elements for each.
  • Finally, we have two system tiddlers - one tagged $:/tags/ViewTemplate and the other tagged $:/tags/EditTemplate.
  • The only real difference between the two template tiddler's TEXT is that one points a JsonEditor to the view-data, and the other points to the edit-data.

In this way, we can "group, organize, and modularize" our UI elements. This helps to greatly reduce cognative-load (how much stress it take you to think through designs).

Also, simply tag a new Tiddler in the wiki with the `Character` tag, and all of that slick UI automatically appears and is completely responsive. ;D

More information can be found in the "JsonUI" tiddler in my example wiki: https://joshuafontany.github.io/TW5-jsoneditor/#JsonUI

This is only a VERY rough proof-of-concept using a commonly known fictional character (lots of reference data). I have ideas for more complex (behind the scenes complex) versions later on. There are also a few gremlins to work out (jsoneditor tabs re-set state on each wiki update - wooops), and I'm going to be updating my fork of the base json-editor library, would like to be able to set a custom Font-Awesome glyph for the collapse button based on a tiddler's value, etc, etc.

This was inspired by working with other languages that use "Model, View, Vew-Model" architecture, and I think we can start to make some really cool complex things by combining this with all of the other plugins that are out there!!

Let me know if you all have any questions!

Best,
Joshua Fontany
JsonUI_conceptUI_editTemplate_08.12.2019.png
JsonUI_conceptUI_viewTemplate_08.12.2019.png
Reply all
Reply to author
Forward
0 new messages