#microformats 2019-06-06

2019-06-06 UTC
#
jmac
Yes, that's my parser's expectation as well. So Kicks' HTML might be hinky.
#
jmac
All right, I'll let em know that, but there's homework for me too -- I don't know why my parser throws away the in-reply to
#
gRegorLove
Their reply-context there should probably also be all in one h-cite, instead of one h-cite on the `a` and another on the `div`
#
gRegorLove
works up a quick example
#
gRegorLove
I think this is more what Kicks intended: http://php.microformats.io/?id=20190606000458247
#
gRegorLove
No stray h-cite in the `children` of the parse results
[jgmac1106], [xavierroy] and gRegorLove_ joined the channel
#
jmac
I find that if I expand that attribute to e.g. class="u-in-reply-to h-cite p-name p-foo p-bar p-baz", then this parser happily creates and files an identical h-cite item under each of those p- and u- property names
#
jmac
Which I take to be "I don't know why you'd want to do that, but OK" behavior
#
jmac
Right?
[jgmac1106], KartikPrabhu, gRegorLove_ and [xavierroy] joined the channel
#
sknebel
jmac: yes, that's intended that way
[kimberlyhirsh], [tonz], [jgmac1106], mauz555, jgmac1106, [grantcodes] and [tantek] joined the channel
#
[tantek]
jmac, properties for a microformat must always be *inside* the root class for the microformat http://microformats.org/wiki/faq#Can_you_mix_properties_and_the_root_class_name
#
[tantek]
the *only* use for putting a property class name and a root class name on the same element is to *embed* that root class name microformat as a nested object value on that property which itself is inside its own microformat root class name higher up the document hierarchy
#
[tantek]
examples in that FAQ, like p-author h-card (inside its own h-entry), or p-location h-adr (inside its own h-event)
#
[tantek]
the example code you gave, class="u-in-reply-to h-cite p-name p-foo p-bar p-baz", illustrates this distinction (properties applying to ancestor root elements vs erroneous attempt by author to make properties apply to the element itself
TallTed joined the channel
#
[tantek]
that u-in-reply-to is part of the containing h-entry, and that's correct
#
[tantek]
the h-cite is intended as an embedded microformat on that u-in-reply-to
#
[tantek]
the rest of the properties are clearly intended by the author to apply to the h-cite itself and thus MUST be on an element *inside*, not on the same element
[schmarty] and [grantcodes] joined the channel
#
jmac
[tantek]: I get it, and thank you! My question is purely mechanical: What should my parser do when confronted with some likely-erroneous garbage like that.
#
jmac
I want it to generate the proper variety of "OK, here's what you asked for! It's probably not what you wanted!"
#
jmac
And because it's so weird, it's both not in the official MF2 test docs (as of last summer), and had never come up for me in the wild before yesterday
KartikPrabhu joined the channel
#
jmac
So I'm currently aiming to have it replicate what the official PHP parser does (https://php.microformats.io/?id=20190606030911222), just rubber-stamping the same h-format item repeatedly under different property names
#
jmac
Which is stupid, but it at least it's consistently stupid™
#
sknebel
what would be less stupid in your opinion? it applies the same rule for nested objects than for plain properties, that feels consistent to me, even if it doesn't come up often
#
aaronpk
I think that is in the tests
#
jmac
sknebel: Pardon my weak attempt at humor -- I think that this is consistent and good
#
jmac
I am having a late morning and am still on my first coffee
#
sknebel
ahh, that didn't register as a joke at all
#
jmac
I just meant that the input is probably erroneous but of course it's the parser's job to handle it gracefully and consistently even if the output is a bit strange. :) That's my only goal
#
jmac
And to be 1000% clear the behavior of the PHP parser makes complete sense to me, and I'm in the process of aping it now.
[tonz] joined the channel
#
[tantek]
jokes don't usually register well in plain text
#
[tantek]
jmac++ thank you for your patience in this conversation!
#
Loqi
jmac has 6 karma in this channel over the last year (14 in all channels)
#
[tantek]
I'm also pretty sure it is in the tests
#
[tantek]
we may need to add some negative tests
#
[tantek]
e.g. h-cite p-foo does not put a p-foo inside the h-cite
#
jmac
Where in the tests might it be? (I am using a copy of https://github.com/microformats/tests/tree/master/tests/microformats-v2 fwiw)
#
Zegnat
Or have you found that not to be a problem?
#
Zegnat
needs to do a rerun on that PR. Wow. Been a year
#
jmac
I am afraid that I'm operating under the assumption that the tests are correct.
[chrisaldrich], myravery, [kevinmarks786] and gRegorLove_ joined the channel
#
Zegnat
Maybe stuff has been fixed in the last year, I would need to do a rerun, but I recall some oddities
#
jmac
To be clear, I'm not running these tests through PHPUnit or whatnot; I've been using them strictly as HTML/JSON textfiles that my own parser uses for input & expected output, respectively
#
Zegnat
Yes, that is what I am doing with PHPUnit too
#
jmac
And when I was building my parser last year, I *did* find a number of inconsistencies in some tests, and I worked em out with y'all! This included my pushing up at least one or two pull requests of my own, if I recall correctly. (Which got merged.)
#
Zegnat
I take the JSON generated by php-mf2, and compare it to the JSON given by the test repo
#
Zegnat
I should rerun that branch and see what the status currently is
#
jmac
I'd support that!
#
Loqi
I agree
#
jmac
fist-bumps Loqi
#
[tantek]
I think I want to introduce a class of backcompat changes to parsers that I think will help ignore lots of authoring errors (that otherwise produce noise) in the wild
#
[tantek]
if when / after backcompat parsing a mf1 root, if no properties have been found, uplevel any children microformats, and throw away the mf1 compat structure without any properties
#
[tantek]
so if there was an hentry with no properties except an h-entry inside, the outer hentry would be thrown away, and the nested h-entry would become a top level object
#
[tantek]
and repeatedly
#
aaronpk
I would go one are further and just discard the mf1 classes entirely if any mf2 are present
#
[tantek]
if there was an hentry without properties, with an hfeed inside without properties, and then an h-entry inside, the outer hentry and hfeed empty wrappers would get removed, moving the h-entry to the root
#
[tantek]
like root classes on the page?
#
[tantek]
ok that's interesting
#
[tantek]
I'm going to think about that at lunch (right now in Eastern Time)
#
Zegnat
This proposal probably would not fix the problem aaronpk is seeing. The backcompat parsed hentry in the theme may very will have a correct mf1 entry-title.
#
Zegnat
So then any mf2 h-entry that was pasted within is still not “upleveled”
#
Zegnat
s/will/well/
#
[tantek]
[Zegnat], please don't presume "may very well have" theoreticals, that's not helpful to this kind of discussion
#
[tantek]
you "may very well have" all kinds of nonsense in markup, but in practice that's not how it works, either for authors, or in the ecosystem
#
Zegnat
Alright: anomalily.net has correct entry-title, thus she still cannot create the RSVP, as per aaronpk’s example
#
[tantek]
reject all assertion of "probably" based on such theoreticals
#
Zegnat
not more hypotheticals
#
Zegnat
let me know if you have examples of property less hentry :)
#
[tantek]
aaronpk, your proposal https://chat.indieweb.org/microformats/2019-06-06/1559837354160900 is sufficiently worthy of consideration (I don't know the answer yet but I want broader input) to create an issue, please go ahead: https://github.com/microformats/microformats2-parsing/issues
#
[tantek]
Zegnat, see WordPress channel, permalink already posted there
#
[tantek]
(for property less hentry)
#
[tantek]
note that we've been trying to be more deliberate about backcompat and mf2 interactions, e.g. https://github.com/microformats/microformats2-parsing/issues/37
#
[tantek]
so there's going to be A LOT of related issues to consider (aaronpk)
#
Zegnat
For context in this mf chat, the permalink: https://myravery.me/2019/06/06/indieweb-summit-portland/
[aaronpk] joined the channel
#
[aaronpk]
Zegnat is right, more often I see entry-title and such, but when it's mf1 when there is also mf2 on the page I pretty much want to ignore all mf1 content
#
Zegnat
That permalink is especially interesting because it does not really have an mf1 hentry at all. The only mention of that class that I see is on an element that also has the mf2 h-entry class, so the hentry will never be parsed
[xavierroy] joined the channel
#
Zegnat
The permalink tantek shared, that is, not the anomalily one
#
Zegnat
The outer entry will be parsed as an mf2 h-entry, so not sure if the proposal still applies to that site at all?
#
[aaronpk]
There's still an hfeed in there
#
Zegnat
Yes, so if you ignore the property-less hfeed you end up with an h-entry that has nested h-card, h-event, and h-entry items.
#
Zegnat
Unless we also discard property-less mf2 objects
#
Zegnat
the outer hentry is not an mf1 hentry, it is an mf2 h-entry
#
[tantek]
and yes the outer hentry does also have an h-entry on it
#
[tantek]
it's both
#
[tantek]
so that's another case
#
[tantek]
regardless it has no properties
#
[tantek]
that's the point
#
Zegnat
It does not get parsed as an hentry, according to the spec
#
Zegnat
And your proposal said discard empty mf1s. That was the only thing I tried to point ouy :)
#
[tantek]
yes the key aspect here is the "no properties"
#
Zegnat
If we are discarding property-less mf2 objects too, that seems fine to me
#
[tantek]
that's worth considering
#
[tantek]
unless someone actually has a use-case
#
[tantek]
it's like the opposite of implied properties
#
[tantek]
implied no null objects
#
Zegnat
Yeah. I can’t think of a usecase right away, but need to think a bit. If the author did not mark any explicit properties, and the parser did not find any implied properties, why keep the object at all?
#
[tantek]
alright let's file that as a separate issue
#
[tantek]
discard objects without properties, upleveling any children objects accordingly
#
[tantek]
I feel that will help produce cleaner results
#
[tantek]
and then an mf2 validator should warn about empty objects
#
[kevinmarks786]
warning about empty objects is good; objects with children but no properties is a bit tricky. In practice we tend to infer an h-feed from multiple h-entry. We do have some empirical backcompat for hfeed that may be tense
[grantcodes] joined the channel
#
[aaronpk]
Yeah not sure about h-feed with no properties, that seems like a valid use case?
#
Zegnat
Good catch. Are there any other objects we may be using as similar “collection” wrappers other than h-feed? I can’t think of any
gRegorLove joined the channel
#
[kevinmarks786]
there's the collection case: https://indieweb.org/collection#how_to_markup_2
#
[kevinmarks786]
but the wrapper h-entry would be expected to have properties there
#
[kevinmarks786]
but it is a use case for h-entry inside h-entry
#
[kevinmarks786]
does anyone markup received likes/replies/comments with a wrapper object to contain them?
#
Zegnat
I do not think I have ever seen that
[jansauer] joined the channel
#
[jansauer]
Servus; Short question. Is there any particular reason why `h-feed` has only `h-entry's objects representing the items of the feed?
#
[jansauer]
Why not `h-card` or `h-event`?
#
[jansauer]
Did not find anything on this in the wiki.
#
Zegnat
There isn’t. In fact, I think we have examples in the wild that have both h-entry and h-event side-by-side in a single h-feed.
#
Zegnat
tries to track one down
KartikPrabhu joined the channel
#
Zegnat
An h-feed of h-events: https://jeena.net/events
#
Zegnat
An h-feed containing h-entry and h-event side-by-side: https://tantek.com/
#
[jansauer]
i thing `h-event` could be interesting for event series like indiewebcamps
#
[jansauer]
seems strange that the wiki explicitly narrows it down
#
Zegnat
Would definitely be doable. Not sure whether any of the pages on indieweb.org are h-feeds. Some of them are collections of h-event
#
GWG
I need to write those h-feed parsing issues I had up
#
GWG
Maybe propose some spec updates
#
Zegnat
[jansauer]: you are right, we may need to update that page to reflect current use!
#
Zegnat
Not sure anyone has been putting cards in feeds, but events for sure
#
GWG
What would an h-feed of h-cards represent?
#
[jansauer]
a friend list?
#
jacky
not necessarily 'friend'
#
jacky
but a contact list
#
[jansauer]
one could follow to see hows feeds i am following
[pfefferle] joined the channel
#
jacky
I think it hasn't been used heavily due to lack of consumption of tools _to_ use it
#
GWG
Is there any example in the wild?
#
jacky
like I could see someone providing a URL that has a h-feed of h-card and using that to define people they follow in a reader
#
GWG
So, a replacement for opml?
#
[jansauer]
I havn't seen any... I'm just starting do build a consumer 😄
#
jacky
GWG: more or less?
#
GWG
If you build it...they will come
#
[jansauer]
Yeah; Thx for the feedback; Was definitely wondering if i missed something.
#
GWG
H-feed is the most used h property that has the least amount of discussion in my opinion
#
GWG
I need to do a Zegnat level analysis
#
Zegnat
When is something Zegnat level?
#
jacky
GWG: agreed re: use vs discussion
#
jacky
this merits a session ;)
#
GWG
I was referring to your deep dives on usage of properties and prior art
#
GWG
jacky, I'm in at Summit
#
jacky
makes a note to bring it up then
gRegorLove__ joined the channel
#
[jansauer]
This way there is a place for this discussion.
#
jacky
[jansauer]++
#
Loqi
[jansauer] has 1 karma over the last year
#
jacky
h-feed might need its own repo
#
GWG
Yes, but you need someone with permissions to create one
gRegorLove joined the channel
#
[tantek]
jacky, yes, however see how we're still stuck trying to migrate h-event issues to their own repo
#
jacky
checks it out
#
[tantek]
jansauer++ good issue and well played description/example 😂
#
Loqi
jansauer has 2 karma over the last year
#
jacky
oh I thought it was a manual issue moving issue
#
[tantek]
no it's a policy / process change
#
[tantek]
the hard problems are social more often than technical
#
jacky
without a doubt
#
[tantek]
re: collapsing objects without properties, good point about only applying that to only the root (recursively)
#
[tantek]
also what's the downside to a property-less h-feed root collapsing out of existence and leaving the page with a bunch of h-entry objects at the root?
#
[tantek]
consuming code is already expected to handle such an "implied" h-feed of h-entry
#
[tantek]
and per jansauer's issue, perhaps that's worth expanding to an "implied" feed of any >1 h-any-x objects at the root
#
jacky
oh okay that changes things a bit
#
jacky
backcompat--
#
Loqi
backcompat has -1 karma over the last year
#
Zegnat
Multiple h-feeds could be a problem then, but I guess we’d expect a name/url/uid on the different h-feeds if you have multiple of them on the page, which makes sure they are not collapsed
[schmarty] joined the channel
#
[schmarty]
i think it only becomes an issue when h-feed collapses because it has no properties
#
[schmarty]
if they have even one name/url/uid property they won't collapse, right?
chrisaldrich joined the channel
#
[schmarty]
i guess i am just restating what zegnat is stating.
#
aaronpk
Two empty h-feeds would collapse to a single list of the children which is changing the meaning
#
Zegnat
feels validated ;)
#
aaronpk
So even if there isn't a property to distinguish them it still feels wrong
#
[schmarty]
is it being a jerk to ask what is a real-world use-case of a page that has two h-feeds with no properties of their own?
#
[schmarty]
then i'll just say: i am not aware of any real-world use cases for a page having multiple h-feeds but with no identifying properties
#
aaronpk
That's fair, but that feels like bringing semantics into the parsing algorithm which is what we've been avoiding in mf2 vs mf1
#
[schmarty]
however, that does bring to mind that maybe those h-feeds do have properties, just ones we're not implying yet.
#
jacky
what does 'collapse' mean in this case?
#
[schmarty]
two h-feeds on a page, with no way to identify them even by URL, isn't a semantic problem, imo
#
jacky
like collapse against the property list of `h-entry`?
#
aaronpk
the children of the two separate h-feeds would be merged into a single list
#
[schmarty]
buuuuut, if an h-feed is defined on (or inside of) an element with an addressable fragment ID on the page, then it *does* have an implied URL.
#
aaronpk
oh yeah where is that fragment ID issue at?
#
[tantek]
no [schmarty] that's exactly the kind of theory-deflating question to ask
#
Zegnat
more specifically, jacky: an h-feed that has no properties but has children would “collapse” in that its children will become children of the object one level higher. Thus if you have two h-feeds without properties on the same level, their respective children will end up as one list of children
#
[schmarty]
tantek: that's why i did worse by asking to ask it 😂
#
[tantek]
Zegnat see my revision about collapsing from the root
#
[tantek]
TBH why do I bother clarifying if it's going to get ignored
#
aaronpk
IMO the mf2 parsing algorithm should do the least amount of surprising things
#
Zegnat
Ooh, you meant to only ever collapse if the top object gets collapsed? I completely misunderstood you then, tantek
#
[tantek]
only collapse root objects (recursively)
#
[tantek]
so if you collapse, then a child becomes root, then the rule applies to it too, recursively
#
[tantek]
so a chain of empty ancestors would all get collapsed
#
Zegnat
I for some reason thought root as in root class names (e.g. the “root” as mentioned in current parsing spec), and therefor didn’t understand what you said.
#
aaronpk
I don't like the sound of this. What problem is this solving?
#
[tantek]
Zegnat, I understand the confusion, hence root *object* can only have one possible meaningful (non-redundant) meaning
#
Zegnat
But that would still merge propertyless h-feeds though, right? If the mf2 document has 2 propertyless h-feed objects, both will be collapsed and see their nested objects all move to the same level?
#
[schmarty]
aaronpk: the discussion was around possible changes to backcompat to workaround badly nested mf1/mf2 in the wild.
#
[tantek]
Zegnat, only if they both ended up at the root themselves
#
[tantek]
yes this is driven by actual real world examples
#
Zegnat
Yes, I actually assumed they would both already be at the root
#
aaronpk
Ok did I miss something that ruled out the possibility of tossing out all mf1?
#
[tantek]
and that's where [schmarty]'s question applied
#
[tantek]
aaronpk, no this is a less drastic (less surprising) alternative
#
Zegnat
Not at all, aaronpk
#
[schmarty]
e.g. a root "hentry" with an "hfeed" with an "h-entry" would collapse until the "h-entry" becomes the root object.
#
Zegnat
[schmarty]: yes
#
[tantek]
correct
#
[schmarty]
(per tantek's example further up)
#
aaronpk
IMO this is more confusing to explain
#
aaronpk
and more surprising
#
[tantek]
it is more surprising to break existing support
#
aaronpk
since the actual examples are cases where ppl didn't even know they had mf1
#
[tantek]
surprises in existing support (being broken) is FAR worse than "more confusing to explain"
#
aaronpk
do you have any evidence that the mf1 in these examples are actually used/consumed by anything ?
#
Zegnat
This would be able to fix the empty h-entry > empty hfeed > real h-entry problem that was linked in #indieweb-wordpress; I guess. It would not fix the anomalily rsvp problem as linked by aaronpk.
#
[tantek]
aaronpk, that's the wrong question. the right question is whether the mf1 in *any* hybrid page is being consumed
#
[tantek]
because that's what you're proposing breaking
#
aaronpk
Specifically being consumed by things aware of mf2
#
aaronpk
because mf1 parsers like google will see no difference
#
[tantek]
that's a bit foolish, to not consider adoption transitions
#
[tantek]
between "consume mf1" and "aware of mf2"
#
aaronpk
every instance I've seen of this has been the mf1 getting in the way of mf2
#
[tantek]
and yet, as you point out, existing mf1 consuming *is* useful, and if those folks started also consuming mf2, they would be greatly surprised to stop seeing even *some* of the mf1 they used to be consuming
#
[tantek]
given the widespread existence / utility of mf1 consuming, I don't want upgrading to mf2 consuming to break that, and the presence of a single h-card (like in a footer) should not break the consuming of a perfectly fine hCalendar vevent for example
#
[tantek]
while that's a theoretical description, it's based on practical data (tons of vevent out there), and a very reasonable change a new person would make to a site (h-card in footer)
#
[tantek]
certainly it would be a *very bad surprise* to the person adding the h-card contact in the footer if it all of a sudden invalidated the vevent on the page
#
[tantek]
I'm worried "throw out all the mf1 in the presence of any mf2" is a throw away the baby with the bathwater approach
#
[tantek]
(I'm hoping we can avoid that though I admit it is something we have to consider)
#
gRegorLove__
Does the "toss mf1" issue actually solve the issue with the rsvp http://anomalily.net/indie-web-summit/? It would still require adding `h-entry` to the theme, right?
#
GWG
I love conversations like this
#
GWG
Gregorlove, the mf2 plugin can do that using filters
#
GWG
Back to how unreliable that is though
#
gRegorLove__
I though theme editing / plugin installing was something aaronpk was trying to avoid.
gRegorLove_ joined the channel
#
GWG
Plugin installing is easier than theme editing
#
Loqi
[aaronpk] like literally she can't RSVP because of this, and doesn't have time to mess with plugins and risk breaking other stuff
gRegorLove_ and gRegorLove joined the channel
#
aaronpk
gRegorLove: anomalily initially copied the RSVP example markup from the wiki which includes h-entry
#
aaronpk
when that didn't work, my first thought was "oh it's because it's a nested h-entry, try taking out the h-entry div"
#
aaronpk
and then i realized the problem is much worse
#
jacky
<cues narrator voice>
gRegorLove_ and gRegorLove joined the channel
#
[tantek]
why jump to "initially copied the RSVP example markup"?
#
[tantek]
if the existing WordPress-specific instructions are problematic, we should fix those, not steer WordPress users towards other instructions
#
[tantek]
installing the mf2 plugin requires zero setup right? there is no "messing with" AFAIK
#
aaronpk
i don't know her thought process
#
aaronpk
but those instructions require plugins
#
[tantek]
sorry this is getting toward meta
#
[tantek]
taking it there
[aaronpk], [grantcodes] and [tantek] joined the channel