#jmacI 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
#jmacWhich I take to be "I don't know why you'd want to do that, but OK" behavior
#[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.
#jmacI want it to generate the proper variety of "OK, here's what you asked for! It's probably not what you wanted!"
#jmacAnd 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
#jmacSo 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
#jmacWhich is stupid, but it at least it's consistently stupid™
#sknebelwhat 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
#jmacsknebel: Pardon my weak attempt at humor -- I think that this is consistent and good
#jmacI am having a late morning and am still on my first coffee
#sknebelahh, that didn't register as a joke at all
#jmacI 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
#jmacAnd 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!
#Loqijmac has 6 karma in this channel over the last year (14 in all channels)
#ZegnatOr have you found that not to be a problem?
#Zegnatneeds to do a rerun on that PR. Wow. Been a year
#jmacI am afraid that I'm operating under the assumption that the tests are correct.
[chrisaldrich], myravery, [kevinmarks786] and gRegorLove_ joined the channel
#ZegnatMaybe stuff has been fixed in the last year, I would need to do a rerun, but I recall some oddities
#jmacTo 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
#ZegnatYes, that is what I am doing with PHPUnit too
#jmacAnd 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.)
#ZegnatI take the JSON generated by php-mf2, and compare it to the JSON given by the test repo
#ZegnatI should rerun that branch and see what the status currently is
#[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
#aaronpkI 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]I'm going to think about that at lunch (right now in Eastern Time)
#ZegnatThis 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.
#ZegnatSo then any mf2 h-entry that was pasted within is still not “upleveled”
#[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
#ZegnatThat 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
#ZegnatThe permalink tantek shared, that is, not the anomalily one
#ZegnatThe outer entry will be parsed as an mf2 h-entry, so not sure if the proposal still applies to that site at all?
#ZegnatYeah. 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?
#ZegnatGood catch. Are there any other objects we may be using as similar “collection” wrappers other than h-feed? I can’t think of any
#[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
#ZegnatMultiple 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.
#aaronpkTwo empty h-feeds would collapse to a single list of the children which is changing the meaning
#aaronpkthe 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.
#aaronpkoh yeah where is that fragment ID issue at?
#[tantek]no [schmarty] that's exactly the kind of theory-deflating question to ask
#Zegnatmore 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
#aaronpkIMO the mf2 parsing algorithm should do the least amount of surprising things
#ZegnatOoh, you meant to only ever collapse if the top object gets collapsed? I completely misunderstood you then, tantek
#[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
#ZegnatI 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.
#aaronpkI 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
#ZegnatBut 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
#ZegnatYes, I actually assumed they would both already be at the root
#aaronpkOk 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
#[tantek]it is more surprising to break existing support
#aaronpksince 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"
#aaronpkdo you have any evidence that the mf1 in these examples are actually used/consumed by anything ?
#ZegnatThis 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
#aaronpkSpecifically being consumed by things aware of mf2
#aaronpkbecause mf1 parsers like google will see no difference
#[tantek]that's a bit foolish, to not consider adoption transitions
#aaronpkevery 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)