#microformats 2018-03-11

2018-03-11 UTC
KartikPrabhu and [kevinmarks] joined the channel
#
KartikPrabhu
[kevinmarks]: could you take a look at my PR https://github.com/microformats/mf2py/pull/94 most of it is doing the same upgrades as the last PR except Ihave added the new implied-name-parsing rules and updated the backcompat processing with new tests
#
Loqi
[kartikprabhu] #94 new implied name parsing rules and better backcompat
[eddie], Garbee, [tantek], tantek, chrisaldrich, KartikPrabhu, rMdes, [jeremycherfas], barpthewire and [Vanessa] joined the channel
#
@pstuifzand
Implemented source queries on the micropub endpoint. This is really easy now, because of the microformats backend.
(twitter.com/_/status/972834419626176512)
KartikPrabhu and webchat254 joined the channel; justme23 left the channel
#
Loqi
[kartikprabhu] #24 Parsing <noscript> tags
chrisaldrich joined the channel
#
sknebel
ohh, that's a fun one
#
KartikPrabhu
I didn't even address microformats nested inside <noscript>
#
sknebel
do we have any in the wild examples?
#
KartikPrabhu
I used to have one on my site but my site code has changed since then
#
sknebel
I remember seeing one on snarfeds homepage recently, with his h-card
#
KartikPrabhu
sknebel: if you can find examples that would be neat
#
KartikPrabhu
is also looking
#
sknebel
adding it to the issue
#
KartikPrabhu
a lot of image lazy loading use this <noscript> technique
#
sknebel
I guess this isn't actually in scope of your question though
#
sknebel
or at least your 4 detail questions
#
KartikPrabhu
right I can add more questions :P
#
KartikPrabhu
basically properties nested inside <noscript>
#
KartikPrabhu
sknebel: updated with your found example as Q5.
[snarfed], [Vanessa], [eddie] and [cleverdevil] joined the channel
#
KartikPrabhu
is now looking at vcp for datetime parsing
#
aaronpk
attempts to use github Projects to plan the 0.4.0 release https://github.com/indieweb/php-mf2/projects/1
#
aaronpk
is eager to get that out the door and upgrade xray
#
gRegorLove_
aaronpk: one more quick update that could go into 0.4.0 https://github.com/indieweb/php-mf2/pull/146 just needs the php55 test run again.
#
Loqi
[gRegorLove] #146 Update test and add fix for #116
#
aaronpk
I just did!
#
gRegorLove_
oh, nice!
#
aaronpk
looks like it was just a travis glitch
#
Loqi
[indieweb] php-mf2: php-mf2 is a pure, generic microformats-2 parser for PHP. It makes HTML as easy to consume as JSON.
#
KartikPrabhu
should add changelog in mf2py
#
KartikPrabhu
is lost in regex land
#
aaronpk
gives KartikPrabhu a lookahead to help find his way out
#
KartikPrabhu
stomps on the lookahead
#
aaronpk
i've been running the 0.4.0-alpha release in my reader for a few days now and everything looks fine still
#
KartikPrabhu
<isgh> mf2py over-normalises datetimes! adding in "00" seconds and converting "am/pm" to 24 hour!
#
KartikPrabhu
gRegorLove_: does phpmf2 do that ^ ?
#
KartikPrabhu
or aaronpk^^
#
aaronpk
I don't think so
#
aaronpk
it does add a colon to the timezone offset which I can't tell if that's correct or not
#
gRegorLove_
I think it used to, but should be fixed.
#
aaronpk
I think that was fixed a long time ago
#
KartikPrabhu
basically nothing should be normalised right? everything as authored?
#
gRegorLove_
See my comments on the 4th block in aaronpk's requested changes (click "show outdated") https://github.com/indieweb/php-mf2/pull/131
#
Loqi
[gRegorLove] #131 Improve dt- parsing
#
gRegorLove_
php-mf2 now normalizes to remove colons in TZ offset
#
KartikPrabhu
but they shouldn't be removed if authored
#
aaronpk
i'm on the fence about that tbh
#
KartikPrabhu
the spec allows for colon tz
#
aaronpk
there is no change in meaning in having them vs not having them, so in that sense it's fine to remove them
#
aaronpk
whereas there is a change in meaning if you add :00 seconds
#
KartikPrabhu
aaronpk: yeah seconds should definitely not be added
#
gRegorLove_
iirc, that normalization only happens with VCP, when we're constructing dates from other authored parts.
#
KartikPrabhu
aah! so in vcp the timezone does not have a colon but otherwise it does if authored
#
KartikPrabhu
will go with that; but first to fix this seconds stuff
#
gRegorLove_
I'd need to review VCP and the tests. I don't remember offhand.
#
KartikPrabhu
are there any "correct" tests? :P
#
gRegorLove
I mean, to the spec, sure.
#
KartikPrabhu
the one in mf2py are wrong basically matching wrong parser behaviour
tantek joined the channel
#
gRegorLove
Oh, I think there's normalization of offsets like "700" to "0700" too
#
KartikPrabhu
this is going to take longer than backcompat fixes
#
gRegorLove
Or "+2" to "+0200"
#
gRegorLove
Yeah, VCP is a lot. It's like I have to re-learn it every time I look at it.
#
KartikPrabhu
yeah, I have never loked at it because kylewm did :P
#
KartikPrabhu
gRegorLove: which according to spec tests do you use?
#
gRegorLove
Not sure I follow. To clarify, I meant I write tests against the spec.
#
gRegorLove
I could go either way on the TZ colon thing, but yeah it doesn't change the meaning at least.
#
gRegorLove
Heading out for a bit
KartikPrabhu joined the channel
#
KartikPrabhu
<phew> removed adding 00 seconds
[snarfed] and [kevinmarks] joined the channel
#
Loqi
[gRegorLove] > Would someone like to take a crack at suggested minimal spec edits to implement the proposal? On http://microformats.org/wiki/index.php?title=microformats2-parsing&oldid=66695#parsing_a_u-_property Replace: > * else if img.u-x[src] or audio....
#
Loqi
[AljoschaMeyer] #5 Handling Non-Standard Formats
#
KartikPrabhu
gRegorLove: aaronpk: what is going on with the dt-start here http://pin13.net/mf2-dev/?id=20180311203129053 !
#
KartikPrabhu
I was actually testing if it picks the first found value
#
gRegorLove
It's just really really in -0600, ok? ;)
#
KartikPrabhu
which it does but then barfs somewhere else
#
gRegorLove
Let me see if I can make a quick fix.
#
Loqi
[kartikprabhu] #25 Should timezone also be implied from previous dt-*
#
gRegorLove
Is this a real example somewhere?
#
gRegorLove
Will still fix, just wondering.
#
Loqi
[tantek] #4 vcp: imply dates should also imply tz if needed
#
KartikPrabhu
oh opps! should have searched
#
KartikPrabhu
gRegorLove: the mulitple ones isn't but that is a test I wrote according to spec
#
KartikPrabhu
looks like phpmf2 does use the implied TZ why is that not in spec yet?
#
Loqi
[gRegorLove] #147 Timezone issue when multiple dt-*
#
KartikPrabhu
yup got 2 notifications already
#
gRegorLove
Not sure why it's not in spec. I haven't had a chance to review sknebel's last comment on parsing issue 4
#
KartikPrabhu
aah that seems valid
#
sknebel
given that it's in php-mf2, we have not knowingly encountered a case where it actually was an issue?
#
sknebel
(that said, I don't know who'd have looked at stuff like that in detail...)
#
KartikPrabhu
ok enough python for the day
#
sknebel
I really should set aside an hour or two in the next days to read through all your input
#
KartikPrabhu
sknebel: maybe by reviewing https://github.com/microformats/mf2py/pull/94 to see if everything looks OK?
#
Loqi
[kartikprabhu] #94 new implied name parsing rules and better backcompat
#
sknebel
that was the plan
#
KartikPrabhu
cool, it does not have the vcp fixes yet since I don't want to burden the PR too much
#
sknebel
KartikPrabhu++
#
Loqi
kartikprabhu has 15 karma in this channel (181 overall)
#
aaronpk
VCP is pretty obtuse to write so I'm not surprised we haven't seen many instances of it being a problem yet
#
Loqi
Multiple date and time values
#
KartikPrabhu
gRegorLove: yes, apart from the implied TZ which is not in spec
#
KartikPrabhu
what was the error?
#
gRegorLove
complicated loops and if conditions within them :)
#
Loqi
hehe
[eddie] joined the channel
#
gRegorLove
Basically needed an "else" to do nothing when certain dt parts already found, haha.
#
KartikPrabhu
aah yes. I just added those in mf2py too :)
[cleverdevil] joined the channel
#
gRegorLove
Re https://github.com/microformats/microformats2-parsing/issues/2#issuecomment-372150186 I was thinking if we have <img src="/photo.jpg" alt=""> we still wanted the old behavior of just the URL instead of the dictionary.
#
Loqi
[kartikprabhu] Absence of `[alt]` is different from `[alt=""]` https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img So I suggest the following modification to @gRegorLove 's suggestion - else if `img.u-x[src][alt]` - return a dictionary with two k...
#
gRegorLove
Maybe got turned around on the "no non-empty alt" though
#
KartikPrabhu
yeah, I think alt="" is supposed to have semantic meaning as compared to no alt
#
KartikPrabhu
I would prefer preservation of whatever was authored
#
gRegorLove
So you'd expect a dictionary when parsing <img src="/photo.jpg" alt="">?
#
KartikPrabhu
I think so
#
Loqi
[aaronpk] Of the current options in the brainstorming section, everyone who has commented there agrees on the following: - If a u-\* property is parsed on an <img> element with a non-empty 'alt' attribute, then: - Create a structure similar to the e-content...
#
KartikPrabhu
huh! I wonder why "non-empty"
#
gRegorLove
Well, from a consumer perspective if you get just a string (the img URL), you can presume either alt="" or no alt in the authored HTML.
#
KartikPrabhu
right, but you don't know which
#
gRegorLove
No information seems to be lost
#
gRegorLove
It's the same effect, isn't it?
#
KartikPrabhu
the information lost is the semantics of whether the <img> is content (no alt) or presentational (empty alt)
#
gRegorLove
I don't follow the content vs presentational?
#
KartikPrabhu
paraphrased
#
sknebel
gRegorLove: afaik e.g. screenreaders will announce an image without alt, but completely skip one with alt=""
#
gRegorLove
TIL :) Revised version sounds good to me then.
#
KartikPrabhu
updated my comment with fragmentioned URL
[snarfed], [eddie], tantek and webchat254 joined the channel