{"action":"created","issue":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1324","labels_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1324/labels{/name}","comments_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1324/comments","events_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1324/events","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/1324","id":53403162,"number":1324,"title":"tag-fields (or lookup-fields / relationship-fields)","user":{"login":"tobibeer","id":97566,"avatar_url":"https://avatars.githubusercontent.com/u/97566?v=3","gravatar_id":"","url":"https://api.github.com/users/tobibeer","html_url":"https://github.com/tobibeer","followers_url":"https://api.github.com/users/tobibeer/followers","following_url":"https://api.github.com/users/tobibeer/following{/other_user}","gists_url":"https://api.github.com/users/tobibeer/gists{/gist_id}","starred_url":"https://api.github.com/users/tobibeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobibeer/subscriptions","organizations_url":"https://api.github.com/users/tobibeer/orgs","repos_url":"https://api.github.com/users/tobibeer/repos","events_url":"https://api.github.com/users/tobibeer/events{/privacy}","received_events_url":"https://api.github.com/users/tobibeer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-01-05T14:50:48Z","updated_at":"2015-01-09T22:05:58Z","closed_at":null,"body":"Introduce a **generic** way to declare fields to be \"lookup-fields\" that are treated and shown as if tags, thus \"semantic tags\" to model lookup relationships from one tiddler pointing to another in a **qualified** manner.\r\n\r\n**the problem**\r\n\r\nOne may wish to assign an *author* to a tiddler. However, assigning the *author* only via either of the following methods has pitfalls...\r\n\r\n1. a tag named `<AuthorName>`\r\n    * **problem:** when aggregating lists, there is no (easy way) to programatically identify...\r\n        * \"Is there and what is the author associated with this tiddler?\"\r\n1. a field defined as `author:<AuthorName>`\r\n    * **problem:** the *author* information is buried, hence not as easily accessible, visible, listed\r\n        * also, with no tag-popup, typos are more frequent\r\n\r\n**the solution**\r\n\r\nIt would be highly practical to be able to define a set of fields to act as if tags, in a way \"qualified tags\"... thus shown in a tiddler's taglist with a clickable button as described below which, however, actually looks up on the corresponding tag-field rather than an actual tag.\r\n\r\n**a tag-field-button-popup**\r\n\r\nIf one were to click such a tag-field-button in a tiddler's taglist, it would show...\r\n\r\n* a link to a tiddler called `<tag-field>`, or rather an associated tiddler title\r\n    * the title for the tiddler corresponding to the *author* field could be **Authors** instead of the user being forced to use a lowercase **author**\r\n    * this tiddler could then be used to output a list of all different *author* values and perhaps associated tiddlers, similar to how the timeline works, only just not based on dates\r\n* a link to a tiddler corresponding to `<TagFieldValue>`, e.g. the `<AuthorName>`\r\n* a list with all tiddlers where `[<tag-field>[<TagFieldValue>]]`\r\n    * e.g. where the value of *author* is the same as the current value, namely `<AuthorName>`\r\n* a list of any other, not yet listed tiddlers where `[tag[<TagFieldValue>]]`, e.g. tagging to `<AuthorName>`\r\n\r\nThis could even be a qualified button displayed with a title of `author:<AuthorName>`.\r\n\r\n**editing**\r\n\r\nEditing a tag-field should work exactly like editing tags.\r\n\r\n**\"multiple inheritance\"**\r\n\r\nJust like regular tags, in the sense of a tag modeling a **parent => child** relationship, it may be desireable to be able to assign more than one tiddler as a value to a tag-field. This would have implications to the popup above as it would raise the question what entries the popup should list, e.g. tiddlers for each *author* or tiddlers with the same combination of the current *authors*, probably the former. Thus, a number of the above qualified tag-field-buttons could be rendered...\r\n\r\n*tags*: `tagFoo` `author:<AuthorName1>` `author:<AuthorName2>`\r\n\r\n**independent plugin**\r\n\r\nIf this was not desireable as a core functionality, which I think it is in so many ways, one would have to be able to update and add to a dom element, e.g. to programatically add tag-field-buttons to the default taglist. How would and can that work? It seems to me there needs to be a way for one widget to hook into another widget as a \"dependent widget\" and thus tell that other widget to also update the dependent widget when being updated. Of course, a dependent widget must not (be allowed to) update the calling widget, otherwise we'd be endlessly running in circles."},"comment":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/comments/69407168","html_url":"https://github.com/Jermolene/TiddlyWiki5/issues/1324#issuecomment-69407168","issue_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/1324","id":69407168,"user":{"login":"Jermolene","id":174761,"avatar_url":"https://avatars.githubusercontent.com/u/174761?v=3","gravatar_id":"","url":"https://api.github.com/users/Jermolene","html_url":"https://github.com/Jermolene","followers_url":"https://api.github.com/users/Jermolene/followers","following_url":"https://api.github.com/users/Jermolene/following{/other_user}","gists_url":"https://api.github.com/users/Jermolene/gists{/gist_id}","starred_url":"https://api.github.com/users/Jermolene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jermolene/subscriptions","organizations_url":"https://api.github.com/users/Jermolene/orgs","repos_url":"https://api.github.com/users/Jermolene/repos","events_url":"https://api.github.com/users/Jermolene/events{/privacy}","received_events_url":"https://api.github.com/users/Jermolene/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T22:05:58Z","updated_at":"2015-01-09T22:05:58Z","body":"> I'm curious (and please tell me if this is better as a group discussion) - siimilar proposals, albeit never as specified and well expressed as here, have been put up previously and I recall you've expressed interest already then.\r\n\r\nI'm not uninterested in this proposal, I think it's an interesting area for exploration. I think that the best way to explore it is via a plugin: I think a lot of what @tobibeer is suggesting can be readily explored with custom segments for the view and edit templates. Then when we've got some experience of how well it works we can consider whether and how to fold it into the core.\r\n\r\n> Can I ask what your general reflections are on this idea, i.e the idea with \"semantic tags\", \"tag types\", \"using fields as tags\" and related? To me (and obviously Tobias, and a few others) it seems like a very powerful tool and a valuable addition to TW, but somehow I sense it never really... I dunno... \"catches on\"? I hope it's ok to ask this as I must assume you have some insights I've just not understood yet? Or am I misunderstanding something on the matter? \r\n\r\nI'd like it to be easy to map RDF-like structures onto TiddlyWiki. I think the primitives required are all already in the core, but there's not necessarily a suitable user interface.\r\n\r\n\r\n"}}