A new/better way to add/view/edit fields?

242 views
Skip to first unread message

Diego Mesa

unread,
Jan 30, 2018, 5:51:30 PM1/30/18
to TiddlyWiki
Hello all,

I see how powerful fields are. They create a clear division of text that tiddlywiki knows how to deal with well. However, I hate adding/editting fields. Its cumbersome, and annoying. I would like to suggest an alternative: a "field" text box that is default collapsed that works something like a dictionary tiddler (not exactly). Each line is a new field like:

name: field value
name2: field val2
name3: """ field value with "quotes" and
multiple lines"""
name4: etc.

This, to me, seems an easier, more intuitive way to view and manipulate field contents. After all, its all text! Note: This is my opinion. Everyone is free to disagree. I would just like to bring up this idea, see if anyone thinks something like this is incredibly easy, or absolutely impossible to implement.

If anyone has a different idea, please share!

Best,
Diego


 

coda coder

unread,
Jan 30, 2018, 6:59:52 PM1/30/18
to TiddlyWiki
Hi Diego

Yes, I've done this, so yes, I like the idea ;)  I took it to another level of abstraction by prefixing the field-names with a standard piece of text that suited my purposes (perhaps you could use "custom-" as a prefix or "recipe-" if they are recipe related fields and so on).

To define them, I used a data tiddler:

name: 25
age
: 4
address
: 50
bio
-ta: 5


The number represents the desired size of the edit field and I would create (using the "custom-" prefix) custom-name, custom-age, etc.  Notice the suffix "-ta" meaning "textarea", giving me custom-bio-ta which renders as a textarea with five rows.

I also create custom-name-style, custom-age-style, etc which have css applied via a stylesheet tiddler that uses macros to compute the class names (again using the names from the data tiddler) which are applied to the edit fields as they are created in the editTemplate.  You will need to create an editTemplate and use tagging to display/hide whichever batch of fields is appropriate for your tiddlers.

Maybe my idea is going further than you intended... maybe I even confused you ;)  Hope not...

Coda

Mark S.

unread,
Jan 30, 2018, 7:35:36 PM1/30/18
to TiddlyWiki
This was called "Slicing" in the old TWC. It was a much-loved feature that didn't make it into TW5.

I believe Thomas Elmiger has an extract macro which can be used in a similar fashion. See the thread: https://groups.google.com/forum/#!searchin/tiddlywiki/thomas$20extract%7Csort:date/tiddlywiki/iuxR63gU2Tc/gP19TeavAwAJ .

Good luck
-- Mark

TonyM

unread,
Jan 30, 2018, 7:53:31 PM1/30/18
to TiddlyWiki
Diego,

I share your desire to make fields more usable and accessible.

I am working one making fields first class citizens, I have posted on this previously.

Just as a tag can have a tiddler, I allow a field to have a tiddler, and I call it a field tiddler.

the intention is to define fields further in their tiddler, and allow this to influence, display, edit and other behaviour for the field.

I would like to combine your suggestions and coda codas in this as well.

Tony

Diego Mesa

unread,
Jan 31, 2018, 3:35:57 PM1/31/18
to TiddlyWiki
Thanks all for your comments.

Tony Im looking forward to your work!

Mark, thanks for pointing me to Thomas' extract. Ill take a look. Also, I need to take a look at "slicing" in TW classic.

Coda thats an interesting idea of actually using a data tiddler to define fields and their respective sizes for edit fields.

Personally, I think the most transparent mechanism would just be another text area, perhaps the same size as the text edit area for a normal tiddler, where everything you type in there (as per the format above) will be parsed/interpreted as fields. 

Its really just like when you look at a naked .tid file. Everything is so transparent, tangible and easy to understand.

Diego



On Tuesday, January 30, 2018 at 4:51:30 PM UTC-6, Diego Mesa wrote:

coda coder

unread,
Jan 31, 2018, 3:49:27 PM1/31/18
to TiddlyWiki


On Wednesday, January 31, 2018 at 2:35:57 PM UTC-6, Diego Mesa wrote:

Personally, I think the most transparent mechanism would just be another text area, perhaps the same size as the text edit area for a normal tiddler, where everything you type in there (as per the format above) will be parsed/interpreted as fields. 

Its really just like when you look at a naked .tid file. Everything is so transparent, tangible and easy to understand.


Good point.

Mark S.

unread,
Jan 31, 2018, 6:18:00 PM1/31/18
to TiddlyWiki
Reluctantly, perhaps,  I have to admit that Fields are really better than slices, because you can do filter manipulations on them, and not worry about strange regexp behaviors.

What you can do is create an input template with a drop-down list of tiddlers to filter. Then each field can be edited with a <$edit> widget, giving it as much space as you need for that particular field. Having a little structure in your tiddlers is a good thing if you're going to have lot's of tiddlers with a similar data structure. It makes reporting and extracting much easier.

-- Mark

HC Haase

unread,
Feb 2, 2018, 1:57:58 AM2/2/18
to TiddlyWiki
I agree that this would be an optimized way of using fields. Speaking of fields UI optimization..

I have an extra sugestion.

make it fast to make a field visible!
in current UI you have to edit the view template (for all tiddlers or for a subset ) to make a new field visible or add {{!!fieldName}} in the tiddler text. From time to time, to make text more structured I would like to use fields and show them, but it is just to cumbersome to be worth it for the most part.

a fast way to show/hide fields in the layout for the particular tiddler would be handy. something like
  • in current UI: a small button at the end of the filed line
  • in proposed text UI: it could be a prefix or sufix (like ! filedName1: value1) that would show or hide the particular field.

what do you think?

TonyM

unread,
Feb 2, 2018, 2:10:42 AM2/2/18
to TiddlyWiki
My Idea, for the display or edit of fields?

In any given tiddler have a field called field-view or field-edit which lists field names that are to be displayed or edited in the view template

Ideally for each field there will be a matching field-name tiddler with a field-caption that sets the heading to place in from of the fields view or edit value.

Regards
Tony

PMario

unread,
Feb 2, 2018, 6:28:15 AM2/2/18
to TiddlyWiki
On Friday, February 2, 2018 at 8:10:42 AM UTC+1, TonyM wrote:
In any given tiddler have a field called field-view or field-edit which lists field names that are to be displayed or edited in the view template

IMO it's named ViewTemplate for a reason. If you need to edit it, EditTemplate should be used. ...

May be we need something like a FormTemplate .. That allows "end users" to insert stuff into different tiddlers using Forms.

just my thought.

mario

TonyM

unread,
Feb 2, 2018, 7:22:34 AM2/2/18
to TiddlyWiki
Mario,

I understand where you are coming from but its a "view all" only, or "edit all only". I think when using tiddlywiki users and for matter, when acting as an application or website, this all or nothing edit approach forces the need for total acceptance of the idea of a tiddler. When for many users they are thinking about the book review, movie notes, expense record or something else, do they really need to see all fields, including  caption, color and icon fields if they only want to change a minor detail.

What if all they wish to do is select a due date for the tiddler?, why should they open the whole tiddler in edit mode, then have to look for where to make the change? when they could simply set the due date?

Whilst I have detailed knowledge of tiddlywiki I need not be an end user to want to have simple and direct ways to interact with a tiddler sometimes.

Perhaps "using forms" is a way to describe "custom edits" of a tiddler and its attributes, but I see value in letting the designer determine exactly which elements can be changed. Perhaps a concept of view, update and edit modes or let the difference between view and edit blur so any attribute (eg field, tag) of a tiddler can be made available to change/edit.

To me any tiddler can be considered a form, and we can programatically decide which attributes can be edited as needed. This is most definitely in the case of selecting at least which attributes/fields are visible to the user in view mode, because currently most additional fields are not visible.

What are you thoughts on my thinking here?

Tony

TonyM

unread,
Feb 2, 2018, 7:32:15 AM2/2/18
to TiddlyWiki
Actually,

On further consideration of the idea having view, update and edit modes, just imagine having another set of "templates" that describes an update mode for a tiddler, view would be totally read only, update would enable specified fields to be active for edit and edit is the current full edit view. Once a tiddlywiki is setup and running perhaps users will never go into the full edit mode only ever update mode (or a guided edit). Perhaps we could even have a user mode/security level where some users may only be permitted to use update mode, not the full tiddler edit mode.

food for thought?

Tony
Reply all
Reply to author
Forward
0 new messages