Replies: 14 comments 27 replies
-
Hi @pmario
Overall, I would take these proposals as interesting starting points for establishing conventions for the use of field names, but I don't think we're ready to bake those conventions into the core |
Beta Was this translation helpful? Give feedback.
-
@Jermolene wrote
That's fair. ... IMO underscores are not really good separators for a namespace. What about |
Beta Was this translation helpful? Give feedback.
-
The field named: IMO With the hint, I think there wouldn't be any confusion |
Beta Was this translation helpful? Give feedback.
-
@Jermolene wrote
If I change a field |
Beta Was this translation helpful? Give feedback.
-
@Jermolene What do you think about multiline fields like this:
|
Beta Was this translation helpful? Give feedback.
-
All, I would like to support what Mario is trying to achieve here there are two key reasons we need some change which is appropriate at the same time as the field namespace expands. Another is the possibility that the JSON tiddler structure that allows these field extensions also opens up the use of editing the current tiddlers and their fields through the view template without the old focus problem. I believe this will stimulate the development of interactive forms and thus the demand for fields to have better handling, ie become first class citizens (like tags)
Mario, Perhaps rather than defining the field as a system field using a name prefix perhaps we externalise it to a tiddler or data tiddler. This may be necessary any what to support field definition and field types. We can then flag the field definition tiddler as system or hide etc... I have done this many times so can demonstrate this in more detail. It keeps the solution much more open. Separate field types allows a set of generic display and edit features to be developed for reuse in many field definitions. eg one field type for date applied to many date fields. Field definitions and types would allow the sharing of these for import without insisting on a wiki edition that supports a given field. Perhaps ultimately some field definitions would move to the core (or replace the existing magic fields) . Such definitions and field types can be cloned by the designer to extend or customise new fields. I think this solution also more closely resembles other systems and is not yet another TiddlyWiki quirky implementation, of a common or garden element such as fields. Regards |
Beta Was this translation helpful? Give feedback.
-
New possible .tid format
|
Beta Was this translation helpful? Give feedback.
-
A new try with mime-types and different elements.
|
Beta Was this translation helpful? Give feedback.
-
Mario et al, Ok this is "out of left field". Another approach to "system fieldnames" and "tiddler titles for that matter" is the use of unicode. If a field is named with a Unicode character or an alternate Alphanumeric set, without help, people can not enter the name in the search box, so they remain hidden from the basic search however with a unicode font that displays the name it remains readable. To support such a method we could do with an in wiki Unicode keyboard. Of course we need to consider the implications of this, but we also need to take account of this possibility with the new expanded field naming. Perhaps we could have a single Unicode character acting as a Synonym for $:/ when used as a prefix to a field OR tiddler name? I have played extensively with Unicode, and tiddlywiki is quite accommodating with tiddler titles but currently not with fieldnames. Tony |
Beta Was this translation helpful? Give feedback.
-
On the topic of how to encode multi-line values, could we use an existing standard instead inventing our own? How about YAML? |
Beta Was this translation helpful? Give feedback.
-
The only thing which is new in my proposal is the "start" and the "end" definition of a multiline field. Everything else is already part of the TW core parser primitives. .. |
Beta Was this translation helpful? Give feedback.
-
I agree the the overhead of adding js-yaml to the core is probably a blocker for using YAML. But I just want to mention the idea of using something standards based instead of "special for TiddlyWiki" in case it leads anywhere. One more comment: it seems weird to include the width and height of a text area in the tid file. Could there be some other way to associate a specific UI template with particular field name? |
Beta Was this translation helpful? Give feedback.
-
@pmario's proposal in the OP is an attempt to resolve a long-standing niggle with the way the TW5 core gives special behaviour to certain fields that is hardcoded and can't easily be extended to user defined fields. The core of the proposal is to use much longer multipart field names that embed type information and other metadata. It's an interesting approach, and it's helpful that you've followed it through with a lot of detail. Generally, I like this kind of speculative design thinking and the discussion it engenders. In this case, I think the proposal ends up being overly complex because it essentially turns fields into tiddlers: as soon as we add metadata like a "type" to a field, it just becomes a mini-tiddler. Having two levels of the design with the same general features leads to a lot of complexity. I think that as far as the core is concerned, fields should just be strings. At the application level, the kind of conventions you outline might be useful, but those usages need to evolve in the wild. There are a number of other topics covered here, too. If we want to discuss these further, please can we do so in a separate thread/issue
|
Beta Was this translation helpful? Give feedback.
-
Referring to: #5805 (comment)
Now I thought about it again. We do have very complex type definitions already. We are just not aware about them. The ViewTemplate defines "how" the class field is used. So the combination between the field-definition and the template is a complex "type" definition. I think my configuration is less complex, because it is defined in 1 place and not scattered over several places. eg: the
Now I want to try to define that definition using predefined Ontologies IMO it's a nie:plainTextContent. So the question now is, does using this info add more context to the definition.
IMO it did and it made the configuration easier too. The description of
And the context where it is defined NEPOMUK Information Element Ontology actually adds a lot of context. just some more thoughts while thinking about: A PageTemplate from Scratch #7086 |
Beta Was this translation helpful? Give feedback.
-
Inspired by: #5804
Latest example: #5805 (comment)
We do have system-tiddlers that start with
$:/
which makes them almost invisible for ordinary users. The same thing could be true for system-fields ... BUT ... There needs to be an additional property for those fields.We always had problems with some special system-fields:
created, modified, tags ..
those fields do have a "special handling" in the core. .. They use "setters" and "getters" to convert them on the fly. Such a behaviour would be nice to have for "user fields" too.Proposed system-fields spec
(edited 18.6. changed
$:/
to#/
to reduce confusion. see: #5805 (comment))#/
:
char may be problematic. see: [BUG] Tiddlers with multi-line fields can be incorrectly exported as .tid files #5809 ... (22.6) removed it from all posts<type>
snippet as the first element iin the namespace:#/<type>/
eg:#/date/
<author>
snippet in the namespace .. eg:#/date/<author>/
<plugin>
snippet in the name .. eg:#/date/wikilabs/<plugin>/xxx
#/user/<type>/<name of the field>
#/user/multiline/<name of field>
or#/multiline/<author>/myDescription
. So themyDescription
field would automatically show a multi line editor.Possible Types
user
... the field will create a visible "user-field" (22.6 changed)_
... user ... a convenience type, to create shorter names (22.6 changed)string
... string (22.6 changed)date
... similar to modifiedtag
... similar to the tags fieldlist
... similar to the list fieldtype
... MIME type .. So an automatic "dropdown" can be shown (22.6 replaced by mime)color
... A color selector can be shownmime
... A field that can be defined by an official mime-type (22.6 new) see: How could system-fields look like with 5.2.x #5805 (comment)multiline
... shows a multiline edit field .. (22.6 replaced by mime)relations
... I don't know how this will look like .. But may be multiline with akey: value
pair ...json
... A multiline field, that contains a JSON structure. ... IMO this may be nestable (22.6 replaced by mime)(remark 22.6) With the MIME-type idea, it may be possible to reduce or get rid of this configurations. -- Will need to be explored
Needed
Beta Was this translation helpful? Give feedback.
All reactions