[TW5] Can we use the html 5 "article" tag?

61 views
Skip to first unread message

Mat

unread,
Apr 6, 2015, 6:13:06 PM4/6/15
to tiddly...@googlegroups.com
Forgive me if I'm stating the obvious, but the joy of ignorance is that you continously find new stuff! Thus in my expolorations I just stubled over the html 5 article tag. The description of it read:

Definition and Usage

The <article> tag specifies independent, self-contained content.

An article should make sense on its own and it should be possible to distribute it independently from the rest of the site.

Potential sources for the <article> element:

  • Forum post
  • Blog post
  • News story
  • Comment


Hm, that reminds me very much of a little fish of ours. I'm not sure what the implications are, but when we go Federation... just maybe we could take advantage of this? Possibly already before Federation (...even if we should focus on Federation ASAP, IMO).

Maybe, somehow, <article> (coupled with an id) would simplify for non-tiddlywiki sites to contain tiddlers they find? (Does that make sense?) Or even for ourselves, to single out a tiddler e.g for embedding iframing instead of, as I believe it is now, whole TWs.


<:-)

Jeremy Ruston

unread,
Apr 9, 2015, 3:13:43 PM4/9/15
to TiddlyWikiDev
Hi Mat

TW5 doesn't use <article> for tiddlers at the moment, it just uses a <div> (it does use the related <section> element for the sidebar and the story river).

There's not much advantage that I'm aware of; the spec doesn't define any special behaviour for the <article> element, it's purpose is to identify structure for semantic purposes (so it might be used by a web crawler for instance).

Changing over to an article element has the potential disadvantage that it would break backwards compatibility with CSS selectors used to target the tiddler frame.

> Maybe, somehow, <article> (coupled with an id) would simplify for non-tiddlywiki sites to contain tiddlers they find?

So, yes, that's about right.

> Or even for ourselves, to single out a tiddler e.g for embedding iframing instead of, as I believe it is now, whole TWs.

It doesn't help embedding TW content, sadly.

Best wishes

Jeremy.





--
You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywikidev.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywikidev/f3a16f02-682f-49b6-a425-221c0d0e22cb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Ruston
mailto:jeremy...@gmail.com

PMario

unread,
Apr 10, 2015, 3:26:46 AM4/10/15
to tiddly...@googlegroups.com
On Tuesday, April 7, 2015 at 12:13:06 AM UTC+2, Mat wrote:
Maybe, somehow, <article> (coupled with an id) would simplify for non-tiddlywiki sites to contain tiddlers they find? (Does that make sense?) Or even for ourselves, to single out a tiddler e.g for embedding iframing instead of, as I believe it is now, whole TWs.

IMO IDs in the TW context are a no go, because IDs need to be unique. TW can open several tiddlers at the same time, so your IDs would need to be dynamically generated and they would be hard to grab for otheres. ...

just my 2 cents
mario

PMario

unread,
Apr 10, 2015, 3:32:41 AM4/10/15
to tiddly...@googlegroups.com
On Tuesday, April 7, 2015 at 12:13:06 AM UTC+2, Mat wrote:

... Or even for ourselves, to single out a tiddler e.g for embedding iframing instead of, as I believe it is now, whole TWs.

IMO using iframes to include TW content is bad behaviour, since it basically loads a whole new rendering instance to display the foreign content. So it highly increases memory consumption, which isn't good in a mobile context. If we have better possibilities, we should use them first.

-m

Mat

unread,
Apr 10, 2015, 1:25:09 PM4/10/15
to tiddly...@googlegroups.com
Jeremy, Mario - thanks for your replies.

@pmario

    IMO IDs in the TW context are a no go, because IDs need to be unique. TW can open several tiddlers at the same time, so your IDs would need to be dynamically generated and they would be hard to grab for otheres. ...


AFAIK, tiddler titles are unique. And therefore also permaviews would be unique (right?). Could we take advantage of this?

Could there perhaps be some mechansim to "apply" the title as an ID for the tiddler div? Or, reversed, to apply an <article>, or an additional surrounding <div> with identifier onto the tiddler?

If this is done as tiddlers are called then it woudn't need to break backward campatability. Could a TW "sense" if it is being called and read the incoming call and look up the tiddlers and then comehow wrap them as mentioned above? Alternative, on the other end, could the calling TW make it so that things are filtered before they are actually transferred? I figure we "own" both ends (both the caller and the source are TWs), so we should be able to control the process, no?

A better-than-nothing solution might be to actually load the whole external tw and then, locally, split out the desired tiddlers and store them locally. Then, the next time the caller is calling for a tiddler or a set of tiddlers, there is first a check to see if there are local copies and only if missing are tiddlers completed to this. This would, I guess, also require a way for a TW to read individual tiddlers, ideally also with non-nodejs TW. This would in itself be a desirable feature though.

Thoughts?

<:-)
Reply all
Reply to author
Forward
0 new messages