Hi Mario

If I understand the proposal correctly, the idea is that one could type 
multiline fields into the main textarea of a tiddler with the following syntax:

\field my-field
Paragraph 1

Paragraph 2
\end

Then, when the user saves the tiddler, the content of the textarea is parsed, 
the field value(s) extracted and saved into the tiddler in the usual way. I’m 
assuming that the field pragma wouldn’t be replicated in the text field as well 
as the specified field?

Conversely, when initiating editing a tiddler, multiline fields are prepended 
to the text of the tiddler and placed in the textarea.

If I’ve got that right, my first thought is that the idea of a process to 
convert a tiddler back and forth to a single textarea representation is 
interesting, and doesn’t present any particular issues if it’s just a UI thing. 
Re-using the pragma syntax is confusing because this “parsing” is nothing to do 
with the main wikitext parser; perhaps it would be clearer to use an extended 
.tid file syntax.

However, your comments about re-using the wikitext parser suggest that my 
understanding is way off the mark, and you are thinking of a system where we do 
have to parse every tiddler before we can access its fields. That would have 
profound implications for almost every aspect of how TW5 works.

Best wishes

Jeremy.




> On 10 May 2019, at 05:23, Reece Shaw <caradine...@gmail.com> wrote:
> 
> Hey y'all, RK from the discord.
> 
> I think there is a lot to be said for making (better) use of multi line 
> fields. Text area with $edit-text has always seemed like a bandaid to a 
> bigger problem with fields.
> 
> Say I'm a user trying to make use of tiddlywiki fields. Ostensibly the 
> difference between the text field and the other fields is very blurred. If I 
> want to display the text field of Tiddler1 as it's displayed when not in edit 
> mode, I'm simply using the $view widget and pointing at the desired tiddler 
> (Tiddler1). 
> 
> If I want to display the text of a user field (say, user-defined-field) and 
> format it I have to then workaround by somehow editing Tiddler1 's 
> user-defined-field while also making sure to avoid using $edit-text in a 
> manner that would cause the re-rendering issue. For a user that wants to 
> build a UI that's a complete headache. There's a lot to be said for the 
> ability to have a multi-line field that is directly attached to the tiddler 
> itself and not as a sub-tiddler
> 
> User defined fields, when made multi-line would not impact core
> We already have the capability to embed multi-line fields into a tiddler, we 
> just have to use a workaround
> list filters would become less complex when displaying multiple pieces of 
> data linked to a single tiddler provided the user wishes to have multiple 
> formatted fields
> I am also of the opinion that organizationally multi-line fields are easier 
> to manage. I know it's a personal preference or opinion but sometimes I have 
> trouble navigating particularly long list fields because the data I want to 
> manipulate, change or reorganize might be over 100 characters in. Some list 
> fields when manually reorganizing can become cumbersome, and this would help 
> alleviate some of that as well.
> 
> In an ideal world I would love if a multi-line-field indicator was just a 
> checkbox next to the indicated field in edit mode. Then, we can default all 
> field editing to single line fields unless the user specifies otherwise. 
> There's a ton of untapped design space therein that can prevent the need for 
> "hacky" workarounds like users trying to over-utilize subtiddlers or creating 
> custom UIs.
> 
> Just some thoughts...
> 
> -Reece
> 
> On Thursday, May 9, 2019 at 11:40:55 PM UTC-4, TonyM wrote:
> 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 tiddlywiki+unsubscr...@googlegroups.com 
> <mailto:tiddlywiki+unsubscr...@googlegroups.com>.
> To post to this group, send email to tiddlywiki@googlegroups.com 
> <mailto:tiddlywiki@googlegroups.com>.
> 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/a184c225-0dc6-46b9-9d7e-45d35b32943e%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/tiddlywiki/a184c225-0dc6-46b9-9d7e-45d35b32943e%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+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@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/385D554A-5D0D-4593-BA61-1E11695B155C%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to