Mario,

There is a discussion of a use case for multi-line fields in Discord 
General Chat with RK Shaw

This issue raises my ongoing frustration with editing fields in the current 
tiddler. I know and have implemented the work around to make it "appear to 
work".

We do have a work around however the cognitive load it places on the 
designer to make it work is immense because it involves "self referential 
code at a distance".  

It seems to me we should be able to build a mechanism to hide the 
complexity from the designer and provide a way to appear to edit the 
current tiddlers fields, thus empower the use of forms to be simplified.

Regards
Tony


On Thursday, May 9, 2019 at 12:56:58 AM UTC+10, PMario wrote:
>
> Hi Folks, 
>
> Just reading an other thread in the group: Change initial field/textarea 
> setup <https://groups.google.com/forum/#!topic/tiddlywiki/g4dHKMJOSSw>.  
>   I had an idea about multi line fields, which are requested here quite a 
> bit. 
>
> The default UI for inserting fields is a bit "heavy weight", if you have 
> many of them. AND because of the concept, how fields are stored in the html 
> file and the .tid file, it's not possible to use line breaks atm.
>
> The idea now is, to use the text area for "multi-line" fields. This 
> wouldn't change the .tid file spec, because those fields are part of the 
> text area. 
>
> We already know macro definition pragma <https://tiddlywiki.com/#Pragma> 
> in tiddlers eg: 
>
> \define test()
> Paragraph 1
>
> Paragraph 2
> \end
>
>
> <<test>>
>
> A similar "pragma" could be used to define fields. eg: 
>
> \field my-field
> Paragraph 1
>
> Paragraph 2
> \end
>
> {{!!my-field}}
>
>
> The macro parser does exist already. So the field parser should be very 
> similar. ... 
>
> PROS
>
>  - This idea, wouldn't need to change the .tid file format, like other 
> ideas discussed here. 
>  - Database recorde-like tiddlers that contain many different fields, 
> wouldn't need much UI witchery
>    - They could be easily copy / pasted in text edit mode
>  - If new "field-text" is added to old TWs, it will be recognized, as 
> "plain text"
>  - NO new edit-multiline-field widget needed, since the existing 
> edit-widget should do it. 
>    - We need to test this. 
>  - If users want a form-like UI this is the same work as now. 
>
> CONS
>
>  - There is some overhead for \field start end \end
>  - Since existing versions of TW don't ignore unknown pragmas, the new 
> text format wouldn't be backwards compatible. 
>    - but it wouldn't hurt too much (see pros above)
>  - New .tid templates will be needed. 
>    - may be fields-widget will need some extensions
>
> -------- *A little bit more "specs"* ----------
>
> 1) field names must be lower-case (same a now)
> 2) Fields, that contain 1 line of text stay in the text area eg:
>
> \field my-field 
> 1 line of text
> \end
>
> 3) "1 liners" will be converted into fields when the tiddler is saved eg:
>     - they go to the field input area of the edit-template
>     (probably worth more discussion)
>
> \field test-field 1 line of text
>
> 4) multi-line fields will always be transcluded in "block-mode" like
>
> <$transclude tiddler=x field="my-field" mode=block/> even if the shortcut 
> is used: {{!!my-field}}
>
> 5) ... ???
>
> just some thoughts
>
> @Jeremy and others
> What do you think?
>
> have fun!
> mario
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/6683e3b9-e386-45d4-872f-8af5ab83a360%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to