Replies: 7 comments 24 replies
-
Yes, but it would be random and so users wouldn't know them. So how should they target them?
With the next sentence ... yes.
The problem is: To access "rendered" elements form a tiddler you have to render the complete tiddler first. The "widget-tree" which is the pre-stage of the html output, is not cached. So everytime the "calling" tiddler is refreshed, all the "referenced" tiddlers would need to be rendered, even if they are not visible. ... So this can make the whole process slow. That's the main reason, why this function was removed from TW5. TWclassic still has this function.
That's not right. ... eg: If the $text-widget will get a known ID=textWidget the qualify macro would create the same value, for every $text-widget in 1 tiddler. ... We need something that is unique inside the widget-tree. Which is more complicated, but doable. ... The problem here is that it can't be exposed to the users, since it will change, if you add a new paragraph to the transcluded tiddler text. So the widget-ID is way to dynamic to use it by humans. |
Beta Was this translation helpful? Give feedback.
-
The only practical way I can see is, that the author defines the "reference-ID" eg:
If you copy paste the above wikitext into https://tiddlywiki.com/prerelease/ and select widget tree as preview type you will get this.
html-output looks like this:
As you can see, it isn't an id that is assigned, it's a Which also means I'm not allowed to ever change the class-name. ... So as you see, we do have the same problem as we have with tiddler-links. So having this wikitext
would allow me to find idMario and idMarioX and also the text between idMario and idMarioX with the right definitions. BUT I assume that's more complicated as you want it to be. right? |
Beta Was this translation helpful? Give feedback.
-
.... BUT I do think with the new JSON store we would have a chance, to create "field-based" tiddler content. that would look like this:
With this configuration every element of the tiddler will be accessible eg: |
Beta Was this translation helpful? Give feedback.
-
edit:
I interpreted this to mean "inline-fields", i.e inside the Or would the new JSON store somehow enable "inline fields"? That would be fantastic... /edit @pmario - you bring up so much cool stuff I don't even know where to start. I think they are a kind of "parallel" case to what I'm after - let me explain: An underlying reason for my OP to brings up widgets and macros is because...:
I'm curious to see if your cool ideas are "parallel" to this or if they can even make my idea redundant. Your styling ideas where an applied class is findable in the widget tree is interesting. Maybe even more general than my idea above because widgets sometimes have a The "inline fields" idea is also super cool (and reminds me of #5468 ). How could they be made to work for multi line/paragraph? Crazy thought: What if such "inline fields" could allow applying styles just like with
One limitation here is that the field marker is not necessarily there when one wants to do the targeting. So one might have to do post-editing to enable targeting a specific text slice. Tying back to the OP, could somehow widgets and macros have a built in applying of an "inline field" marker? Again the user would need to add some kind of identifier. For example Maybe all wikitext could have built in potential to be a field!? ... so ...how about this syntax then ... Yeah... I'm in the middle of a crossfire between my two brain hemispheres ra-ta-ta-ta.. |
Beta Was this translation helpful? Give feedback.
-
Thanks for following up. What do you want to call this "field approach" of yours? In the following, I will just call it the "field approach": The field approach ...and what is a "part"? Actually, I can answer what a part is: It is whatever the user decides and there are often natural "clues" for what should define it, like one part can be a widget, another might be a bullet list, another might be three sequential paragraphs of text, etc. Pretty much like how one "feels" what should be a tiddler. - So how can the user ...so we need a UI that allows smooth creation of fields. Clicking "enter" to create the field and load a new empty one does not work since clicking enter is how to create a new line. Further, as noted in the OP (even if we've obviously deviated from the OP now) is that widgets and macros intrinsically encapsulate their content. The user doesn't have to do anything extra to define it is a distinct "part", so this is why I wanted them to be targetable. With a "field approach" can we somehow let the user just type wikitext like normal and have the system automatically identify when to cut off for the next field? The author should to the greatest extent possible be able to keep his mind on "Once upon a time there was a ..." and ideally not be interrupted by systemic TW matters. Many years ago I made (SuperTiddlers)[http://supertheme.tiddlyspot.com/#About%20SuperTiddlers] but it never reached publishing maturity. (As you see in the link, SuperTiddlers were part of a theme but just focus on the SuperTiddlers part if you look at it). So, a SuperTiddler is a kind of compound tiddler that transcludes from multiple other tiddlers both in view mode and the editors in edit mode. It doesn't fulfil the "Once upon a time" vision but it does provide a UI of some sort. Do you have any thoughts on UI and UX? |
Beta Was this translation helpful? Give feedback.
-
I am still interested in your other approach, i.e: Class as identifier In some sense this is closer to the original OP, i.e:
But how? Do we have tools for this at all? When I look at the widget tree it appears as if also widgets and macros can be targeted with this technique, and that they indeed could be made individually identifiable with some user set ID like so Defining a macro like
It appears like the output text ( ...and, actually, if a 3d party is to extract data from a remote TW, then this is how they would do it, right? Or are there other entries? Phrased another way; would an API be based on this technique? (I have basically no idea how APIs are built so, yeah, if I look like a fool now then this is why). |
Beta Was this translation helpful? Give feedback.
-
BTW, I asked previously apropos "field-types" and my concern that the user should not have to do be distracted with technicals when authoring:
Any thoughts on this? I understand it is not something that is created right away but what do you think of the idea overall? The technique to detect predefined strings as they are typed is actually something Saq and I have played with for a "popup autocompletion concept" (and it works!)... so for the "field approach concept" that we discuss here, this could mean that the user types his text freely and via an in-text command in the editor (e.g Even if I have only tested Saqs Streams briefly, a main strength with the UI/UX is that it hides the underlying system and tech as much as possible. The subtiddlers are automatically created when the user does something that he would do anyway (i.e click Enter/newline). Elegant. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Would it be possible to apply an ID to macros and even (some? all?) widgets so to target them?
Does the question make sense? What I want is to be able to, for example:
Use this ID to refer to the output of the macro/widget as a unit, so that it can be e.g transcluded? (If that were possible, we could transclude "slices" of tiddlers).
If the ID is accessible as a variable within the scope of the macro/widget, then the qualify macro could be made more easy to use by having it concatenate the ID to its output so to differentiate between multiple instances within the same tiddler. (Currently, the user has to explicitly call qualify with an argument) One use case would to much simplify the popular "slider/accordion" construct as outlined in #5839
Beta Was this translation helpful? Give feedback.
All reactions