#microformats 2018-07-25

2018-07-25 UTC
[jgmac1106], [ryan339] and [kevinmarks] joined the channel
[chrisaldrich] and snarfed joined the channel
#
snarfed
hi all! hey aaronpk KartikPrabhu, i'm working on #11 on https://pin13.net/mf2/whitespace.html
#
snarfed
it expects six spaces before "one", and there are six spaces inside the <pre>...
#
snarfed
...but there's *also* whitespace after "World", which i get should be collapsed, but i'm surprised that it should be removed entirely...?
#
snarfed
as opposed to collapsed down to just one space, which would result in 6 + 1 == 7 spaces total efore "one"
#
KartikPrabhu
I don't have any whitespace expectations so don't ask me :P
#
snarfed
hah too late, that ship sailed when you accepted (even partial) maintainership of mf2py
#
aaronpk
Oh gosh i haven't looked at these in a while
#
KartikPrabhu
sure. but I don't have expected results in my head. Those all look as arbitrary to me as any other expectation
#
snarfed
KartikPrabhu: if you want to maintain mf2py effectively, you'll need to get them into your head!
#
KartikPrabhu
nope! just like I have gotten by without understanding VCP and just following spec
#
snarfed
hah, sorry, no. mf2py has to implement mf2 parsing. i don't think you can do that without understanding mf2 parsing :P
#
KartikPrabhu
I understand mf2 parsing spec. but have no expected results for whitespaces
#
snarfed
mf2 parsing spec includes whitespace
#
snarfed
via textContent
#
KartikPrabhu
if you say 7 spaces or 6 spaces they are the same to me
#
KartikPrabhu
I'll make sure mf2py does what people expect it to do
#
snarfed
that's not what you said in the PR review :P
#
KartikPrabhu
that is what I said. I said the test was modified and didn't match aaronpk's expected result
#
snarfed
right. but again, to be an effective owner, you'll need to at least try to understand what your code does :P
strugee joined the channel
#
KartikPrabhu
I know what the code does, but am completely ambivalent to "Expected" results
#
snarfed
ambivalent is fine! as long as you *understand* the expected results
#
snarfed
anyway. between aaronpk and Zegnat, i'm sure we'll find a 6 vs 7 answer
#
KartikPrabhu
I don't understand why they are "expected" like 7 vs 6 spaces
#
snarfed
yeah that's kind of a problem. but we can agree to disagree
#
snarfed
i mean hell, i can understand a rationale for either way. we just need an authoritative answer
#
KartikPrabhu
also, as you can see the "expected" breaks for <p> in mf2py are different from the whatwg thing
#
KartikPrabhu
so yeah, I don't know what is expected
[dougbeal], [matpacker] and [kevinmarks] joined the channel
#
tantek__
lots of whitespace discussion!
#
KartikPrabhu
more like any consensus on what is expected
#
KartikPrabhu
right now it seems lke the only people with "expected" whitespacing are aaronpk and snarfed. Zegnat is following some algorithm from whatwg (though not in its entirity) and I have no expectations
#
gRegorLove
snarfed: you mean the whitespace before <pre> should be collapsed to 1?
#
KartikPrabhu
gRegorLove: yes I think that is snarfed's point
#
KartikPrabhu
or expectation
#
gRegorLove
My reading of Zegnat's algorithm gives "Hello World" for the first child (Text node), then for the <pre> it runs the algorithm on its contents, giving "\n one..."
#
gRegorLove
Then append them, so 6 spaces looks right.
#
KartikPrabhu
yeahit deviates from Zegnat's algorithm
#
Loqi
[snarfed] #112 inner whitespace in p- values shouldn't be collapsed
#
KartikPrabhu
but in the process breaks other stuff
#
gRegorLove
what deviates?
#
KartikPrabhu
snarfed's new algorithm
#
KartikPrabhu
and hence expectation
#
gRegorLove
I don't follow why he's expecting 7 spaces instead of 6
#
KartikPrabhu
because to fix the issue 112 cited above, spaces between strings and HTML tags need to be collapsed to 1 and not 0
#
KartikPrabhu
if phpmf2 is doing something magically correct let me know
#
gRegorLove
Checking. It is giving the expected "foo bar" for snarfed's first example.
#
gRegorLove
I don't know. Probably. I was focusing on #11 since snarfed mentioned it, and now on the first example in #112.
#
KartikPrabhu
#11 is the one which is the incorrect one but only with respect to the \n,
#
gRegorLove
Here's php-mf2 parse with some debugging it gets "\n foo " for the first Text node
#
KartikPrabhu
"a \n after the <pre> opening tag is neglected"
#
KartikPrabhu
sure. that is also what snarfed's algorithm does
#
KartikPrabhu
but that probably also puts 7 spaces after the #11 example instead of 6
#
KartikPrabhu
unless phpmf2 is doing something really magical!
#
KartikPrabhu
yeah that is completely wrong since it collapses spaces inside a <pre>
#
gRegorLove
I guess that algorithm is missing <pre>
#
KartikPrabhu
yeah Zegnat's algorithm does not say anything about <pre>
#
gRegorLove
Personally I much prefer "Hello World one two three" for the p-name in this example
#
KartikPrabhu
well good, we have more different "expectations" now :P
#
KartikPrabhu
so everyone with some "expectation' can sort it out and let me know in the end
#
KartikPrabhu
that is the problem with this whitespace thing. There is one set of expectations from aaronpk and there is an algorithm by Zegnat and they don't match. And others have some other expectation
#
gRegorLove
I'm looking for the <pre> whitespace discussion but can't find it. I recall aaronpk talking about it. Maybe it was only in chat, not github
tantek joined the channel
#
gRegorLove
Looks like some of the whitespace-tests were added after Zegnat's draft algorithm, so that explains the divergence. https://github.com/microformats/microformats2-parsing/issues/15#issuecomment-375595529
#
Loqi
[Zegnat] It only took 2 months, but I have written a draft specification for handling `textContent` in the microformats context. The algorithm combines: * #17, always remove `<script>` and `<style>` elements, replace `<img>` elements, and strip leading an...
#
KartikPrabhu
gRegorLove: more examples if you want to document your expectations https://github.com/aaronpk/microformats-whitespace-tests/issues/4
#
Loqi
[kartikprabhu] #4 whitespace between tags
#
gRegorLove
I don't really have strong expectations, just thought that value looked better for a p-name
#
gRegorLove
Mostly trying to get up to speed on the topic
#
gRegorLove
I'll check that issue
#
KartikPrabhu
at this point the only way to speed up the topic would be collect test cases and get consensus on what is "Expected"
#
KartikPrabhu
oh sorry "up to speed" not "speed up" :P
strugee, tantek__, [kevinmarks] and KevinMarks joined the channel
#
sknebel
re <pre> tags, there's a good argument for adding newlines after <pre> too (if it doesn't already end with one), since browsers seem to by default treat it as display:block
strugee, jgmac1106, adactio, adactio_, KevinMarks, [jgmac1106], dmcweeney and [eddie] joined the channel
#
@cswordpress
↩️ Still working on adding microformats 2 support to #genesiswp child themes but I'm going to temporarily switch away because I don't want to wait for that to be done to start owning content and incorporating as many indieweb principles as possible on that website.
(twitter.com/_/status/1022132264682106882)
KevinMarks, snarfed and KevinMarks_ joined the channel
#
sknebel
snarfed: thoughts on the newline in front of <pre>?
#
snarfed
sknebel: not really, no, sorry. i never felt strongly about it; the WHATWG rule kartik pointed to always seemed fine to me
#
sknebel
that rule has nothing to do with my argument :/
#
sknebel
it's about what happens to newlines inside the <pre>
#
sknebel
I suggest treating <pre> like a new paragraph, like browsers do by default
#
snarfed
"In the HTML syntax, a leading newline character immediately following the pre element start tag is stripped."
#
sknebel
of course it applies
#
snarfed
ok, then i don't follow
KartikPrabhu joined the channel
#
snarfed
personally i'm more interested in the other q from last night: does the whitespace *before* <pre> get collapsed to one space or none?
#
snarfed
but i don't feel strongly about that either
#
sknebel
if you put "some text <p>content</p>" on a page, you get a newline for the <p>, and the whitespace after "text" gets removed cause there is a newline
#
sknebel
in a browser, <pre> does the same
#
sknebel
I ask for our code to do the same for <pre>, too
KevinMarks joined the channel
#
snarfed
ahh i see, got it
#
snarfed
sure, sounds godo
#
sknebel
which also solves your question about the whitespace before it ;)
#
snarfed
heh, not exactly, we'd still need to determine whether there would be a space before the newline or not
#
snarfed
we could just say, no space
#
sknebel
hm, I was under the impression space before newline gets always collapsed was clear, but I might be assuming too much
#
snarfed
nah, could be!
snarfed left the channel
#
sknebel
gonna wait for 1-2 more comments on the <pre> paragraph thing (aaronpk, opinions? since it is "your" whitespace repo?) and if they're positive prepare a few test cases. or should I just make a PR against the whitespace repo now, to make it clearer what I mean?
#
aaronpk
I think my expectations boil down to how do browsers render it
jgmac1106 and [snarfed] joined the channel
#
KartikPrabhu
aaronpk: that is misleading since browsers also take CSS into context, also the number of "new lines" for <p> from your expectations is different from the algorithm browsers are supposed to use (for example)
#
aaronpk
ignoring css
#
aaronpk
like lynx for example
#
sknebel
KartikPrabhu: oh, there was a difference with <p>? where?
#
KartikPrabhu
yeah trying to find the spec. I think now mf2py uses 1 newline before and 0 after but it is supposed to be 2 before or something
#
KartikPrabhu
Zegnat: do you recall which spec has the number of "new lines" for "<p>" when getting textContent?
#
KartikPrabhu
aaronpk: also I was wrong textContent is supposed to be CSS agnostic. innerText is not
[jsorge] and [cleverdevil] joined the channel
#
KartikPrabhu
these specs are annoying to parse!
#
sknebel
yeah. gotta admit, I've been playing with browser devtools and looking at what happens mostly recently
#
KartikPrabhu
gives up on finding a reference for the <p> spacing
#
sknebel
we'll find it again if it becomes important
#
Loqi
[sandeepshetty] aaronpk: based on the tone of his comment I doubt he will buy anything we have to say :) plus from his own admission ("I don’t write a blog" - https://twitter.com/ELLIOTTCABLE/status/348537348151193600) he is looking more at "apps" than content
[jgmac1106], KevinMarks_, KevinMarks and tantek__ joined the channel
#
@cswordpress
↩️ You'll want a theme with microformats 2 support baked in. There's an accessibility ready one at https://github.com/pfefferle/ZenPress
(twitter.com/_/status/1022162622932832258)
jackjamieson, gRegorLove and KartikPrabhu joined the channel; gRegorLove left the channel
#
gRegorLove
Following https://dom.spec.whatwg.org/#dom-node-textcontent, I don't get 2 newlines before <p>. Matches my test in Chrome devtools
KevinMarks, [snarfed], [eddie], jackjami_, KartikPrabhu and [cleverdevil] joined the channel
#
@MarcoZehe
@yellowled Aber hey, der Permalink ist jetzt da, das neue Theme ist also definitiv besser mit den Microformats.
(twitter.com/_/status/1022187382089678848)
[kim_landwehr] joined the channel
#
tantek__
Ja, besser mit den Microformats
[eddie] and [pfefferle] joined the channel
[jgmac1106] and [manton] joined the channel
#
sknebel
edited /mirrors (+112) "add note about update policy"
(view diff)
KartikPrabhu, bradenslen, [kevinmarks], [matpacker], tantek and jgmac1106 joined the channel
#
@rubygems
indieweb-post_types (0.3.1): IndieWeb Post Type Discovery for Microformats 2 JSON. https://rubygems.org/gems/indieweb-post_types
(twitter.com/_/status/1022240297718345729)
#
tantek
interesting
[jgmac1106] joined the channel
#
@kickscondor
Slurping up lots of HTML, so that I can get comment counts. But the microformats templates in use out there are all over the place. I can’t imagine the number of templates in use across the Indieweb.
(twitter.com/_/status/1022242694855311365)
[cleverdevil] joined the channel
#
KartikPrabhu
that is the point of microformats, you can use them in a variety of ways
#
sknebel
KartikPrabhu, snarfed: example proposals for <pre> https://github.com/aaronpk/microformats-whitespace-tests/pull/5
#
Loqi
[sknebel] #5 Add tests showing <pre> on same line as other content
#
KartikPrabhu
sknebel: in test number 13 why is the space between </pre> and "And Hello Mars" collapsed?
#
sknebel
Cause there's a newline, and that's what the browser does
#
sknebel
I don't think there's ever a reason to keep space around newlines except inside pre
#
KartikPrabhu
ok at this point I'm just going to go with what people want
#
gRegorLove
Zegnat's going to have fun catching up on all this when he's back :)
#
sknebel
Heh yep
#
tantek
KartikPrabhu: not sure about "what people want" - good technology, like science, is not democracy
#
KartikPrabhu
tantek: if you have some source of how whitespace should work other than people's expectation then sure
#
KartikPrabhu
you know like a theorem or experiment
#
tantek
or you point to an existing dfn per principle of least invention / least surprise
#
KartikPrabhu
yeah why me?
#
KartikPrabhu
I don't consume anything yet that needs whitespace stuff
#
tantek
even "people's expecations" can be measured better (by watching what they do) or poorly (by asking them and listening to them tell you)
#
KartikPrabhu
yes, which is what is going on here
[snarfed] joined the channel
#
[snarfed]
@kartikprabhu it's you (along with others) because you maintain an mf2 parser 😁
#
tantek
which?
[matpacker] joined the channel
#
[snarfed]
if you want to abdicate that responsibility, then yes, you wouldn't have to care nearly as much!
#
KartikPrabhu
ok, I wouldn't have done that if someone else had taken it up
#
KartikPrabhu
ok, I am abdicating mf2py
#
[snarfed]
hey, yup, the agony and ecstasy of open source
#
[snarfed]
oh man really? sigh, if so it will be abandoned again 😢
#
KartikPrabhu
there we go. officially done
#
[snarfed]
how about a deal: we help you get 1.1.2 out with the current time of fixes, then you can ignore it for a while
#
KartikPrabhu
naah it is done already
#
[snarfed]
right now it has a bunch of good, pending bug fixes. it's a particularly harmful time to abandon it
#
gRegorLove
:/ Well I hope you know your work on it has been very appreciated.
#
[snarfed]
hopefully you'll at least find a successor?
#
KartikPrabhu
no, if there was someone willing to take it up it would have been done a while ago instead of me
#
[snarfed]
not necessarily true. never underestimate the power of asking
#
KartikPrabhu
not my problem now
#
KartikPrabhu
I have my fork for my site
#
[snarfed]
please consider at least getting this release out before you abandon us!
#
tantek
KartikPrabhu: I apologize I didn't mean to discourage you!
#
[snarfed]
doesn't even need to settle open whitespace qs!
#
tantek
right that ^^^
#
[snarfed]
just merging the existing fixes would be enough
#
tantek
KartikPrabhu: feel free to ignore all the whitespace bugs etc until people have a strong consensus based on examples and reasoning instead of "what people want" literally, just ignore those issues
#
tantek
because fixing/merging all the others is so much more valuable
#
tantek
snarfed have you tried out the 'alt' handling BTW?
#
gRegorLove
^that's what I've largely been doing until recently when curiosity got my attention, heh.
#
tantek
I think we're still waiting to confirm that the prototype changes for doing 'alt' work as expected and satisfy your (snarfed) use-case
#
[snarfed]
[tantek] yes, i believe the new alt support works for me
KevinMarks_, tantek__ and snarfed joined the channel
#
snarfed
hey KartikPrabhu could you please add me to https://github.com/microformats and the mf2py pypi project? i'll get the release out myself if necessary. :(
#
KartikPrabhu
don't think I can anymore
#
KartikPrabhu
or even before
#
snarfed
try and see?
#
snarfed
if not that's ok
#
KartikPrabhu
yeah tried. Can't, not owner or something
#
snarfed
on both?
#
tantek__
snarfed, just added you to the org I think
#
tantek__
does that help?
#
snarfed
thanks. some, yes
#
snarfed
hey KevinMarks_, KartikPrabhu has abdicated responsibility for mf2py. could you please add me as a pypi project owner?
#
snarfed
tantek: i also need write access to the mf2py repo. any chance you can add me there? https://github.com/microformats/mf2py/settings/collaboration
[dougbeal] joined the channel
#
tantek__
I think so. just added both you and KartikPrabhu - not sure why / how Kartik wasn't there before?
#
KartikPrabhu
I just left
#
snarfed
tantek: thanks! i still need *write access* to the repo
#
tantek__
snarfed: I'm looking at https://github.com/microformats/mf2py/settings/collaboration and it says you have "Write"
#
tantek__
along with Tom and Kyle
#
snarfed
huh ok. still doesn't let me merge PRs. guess i'll give it a while
[cleverdevil] joined the channel
#
tantek__
snarfed, since the other two aren't around much, bumped you to "Admin" on there
#
snarfed
hah sure
#
tantek__
we should have at least one admin per project that isn't just a microformats admin
#
Loqi
yea!