#microformats 2018-08-19

2018-08-19 UTC
icee25, justyns, [tantek] and bodeezl17 joined the channel
#
@dshanske
↩️ People continued working on it. Everything you need using W3C standards like Webmention, Microformats2…give it a try? https://IndieWeb.org/WordPress/Plugins (https://david.shanske.com/2018/08/18/2048/)
(twitter.com/_/status/1030980083446673411)
kunwon125, mort18, [kevinmarks], HollyW00d6, radiofree11, GigabytePro7, rasengan26, vans8, tantek__, [tantek], tantek, [jgarber], [chrisaldrich], cyberzeus3, Ishaq3, [eddie], [cleverdevil], GuntherDW25, eNbass15, darkmagic, vespaper, zhongfu24, jcline25, marig, Hello710, Guest89349, theresajayne5, jlf1, boser22, MeiR7, darxun29, k6ka15, RoBz27, nullrouted, funnel24, Kraps24, fossxplorer, [pfefferle], Char0n, koddsson and idn13 joined the channel
#
@sfsutcliffe
Great stuff this. #mastodon #microformats
(twitter.com/_/status/1031162049320116224)
spb15, ynyounuo20, barpthewire, raSter^20, [pfefferle], linear14, [kevinmarks], Galixte17, armin29 and [jgmac1106] joined the channel
#
tantek__
hey how far did we get with including per property value language information?
#
tantek__
I thought I saw something that a shipping parser already implements it?
#
tantek__
Zegnat ?
#
aaronpk
IIRC it’s in the php parser behind a flag, and pin13 has it enabled
#
tantek__
oh neat - does it work as expected? did we get consensus on the approach so we should adopt it?
#
tantek__
I feel like this may solve some key i18n challenges
#
tantek__
e.g. having multiple values for a "name" property in multiple languages!
#
aaronpk
I’m not sure how many actual consumers of it there are yet to make that determination
#
tantek__
which has uses for both humans and in that other thread, app names
#
[kevinmarks]
and for mutilingual posts
#
aaronpk
Multilingual posts are an edge case that haven’t even been agreed on how *people* want to consume much less machines
#
tantek__
not sure if multiple lang values work that way aaronpk
#
tantek__
I mean kevinmarks
#
aaronpk
Localizing interfaces is a well known use case
#
tantek__
and I agree with aaronpk's point
#
tantek__
"multilingual posts" don't have enough of a common pattern to be sensible to standardize, much less figure out a pulishing/consuming use-case
#
tantek__
post translations may be a better use-case to document, because that has an actual consuming use-case (show me the "en" version of a post if there are multiple)
#
Loqi
[Stephanie Booth] Description Allows you to set the language of individual posts and pages and to summarize them in other languages. The excerpts are automatically inserted right before the post content, with the correct language attribute. The correct language att...
#
tantek__
individual post != multilingual post
#
tantek__
sure there are plenty of such one-off examples, see above: https://chat.indieweb.org/microformats/2018-08-19/1534699099267100
#
Loqi
[tantek__] "multilingual posts" don't have enough of a common pattern to be sensible to standardize, much less figure out a pulishing/consuming use-case
[cleverdevil] joined the channel
#
[kevinmarks]
I think there is a huge amount of monoglot bias, massively encouraged by Google.
#
tantek__
vice versa - Google likely adapted to the existing monoglot biases
#
tantek__
web publishing predated Google, and had that bias to begin with. not sure Google has made any difference
#
tantek__
back to something with actual emerging patterns - pronouns
#
tantek__
Zegnat did you notice that Mastodon appears to have explicit pronoun support in their profiles? like a field to enter it, prominence in the UI etc.
#
sknebel
do we know anyone that planned to consume the lang details?
#
tantek
created /pronouns (+43) "r"
(view diff)
#
[kevinmarks]
No, Google explicitly tells you to make monolingual pages.
#
Zegnat
sknebel: voxpelli perhaps.
#
Zegnat
tantek__: I haven't used Mastodon so haven't noticed any pronoun support
#
tantek__
Zegnat see the top of andybaio's profile here: https://xoxo.zone/@andybaio
#
sknebel
yeah. he made a PR for it "long ago" for the node parser, so maybe he ran that somewhere already
#
Zegnat
Interesting. Also interesting that Mastodon itself doesn't seem to be awhere of it and still talks about Andy as "them" at the top of the page.
#
[kevinmarks]
Mastodon has key/value properties that you append to your profile. If the property is a url it puts rel-me on them
#
[kevinmarks]
I don't think it has a specific gender field
#
[kevinmarks]
But pronouns is a common convention
#
Loqi
[clarcharr] #3211 Add pronoun field alongside bio
#
tantek__
tl;dr, they added it, but purely for human publishing / reading. nothing machine-readable
#
tantek__
Zegnat ^^^ probably worth a read and adding to ufs.cc/w/pronouns
[eddie] joined the channel
#
tantek__
if you're curious about ufs.cc - ufs.cc/w/ufs.cc
#
Loqi
[Gargron] #6645 Add bio fields
#
tantek__
waits for kevinmarks to say something about multilingual pronouns ;)
#
Zegnat
tantek__ yeah. That issue shows why I use URLs for pronouns in microformats. Because writing out a limited set of the words doesn't actually define what you want. (Unless you want a pronoun that everyone already is familiar with.)
#
Zegnat
Also note that I have multilingual pronouns live 😉
#
tantek__
I figured you would :)
#
tantek__
point being, the presence in Mastodon shows it may be worth iterating again, going for some convergence
#
Zegnat
But yeah. I can definitely use some references to that issue!
#
[kevinmarks]
People specify pronouns in the language(s) they speak
#
tantek__
worth expannding the pronouns page with that info at least
#
[kevinmarks]
I told you about gendered friend lists before?
#
[kevinmarks]
Brad histogrammed all the group names people had made in Google contacts, then translated them into English
#
[kevinmarks]
Top ones were friends, family school, work, church, girl friends
#
sknebel
ok, gRegorLove mentioned once a use case he had for language parsing too
#
[kevinmarks]
But "girl friends" was mainly a translation of friends in gendered languages which distinguished amigos/amigas etc
#
sknebel
Zegnat's pronouns don't give any language-enhanced output from pin13, due to it only being parsed on e- and h- properties
#
Zegnat
Ha, I never actually checked how the language proposal would work together with my pronouns.
#
tantek__
worth trying to see if it works for you Zegnat !
#
Zegnat
If sknebel says it doesn't, I would tend to trust him on that ;)
#
tantek__
Zegnat: obviously not without changes. point being you could adjust your markup accordingly to try
#
sknebel
e-pronoun? or make up an h-x-object, but that's weird too, especially with zegnats approach to pronouns
#
sknebel
doesn't really fit
#
Zegnat
.u-pronoun.h-pronoun ?
#
tantek__
seems overdesigned for the 99% common publishing pattern of "he/him" "she/her" "they/them" (e.g. see pronoun stickers at conferences)
#
sknebel
so extend the parsing process instead?
#
tantek__
Zegnat, anyway, start by documenting the Mastodon etc. above links to the pronoun page / section
#
Zegnat
Yep. I specifically iterated to less properties for my pronouns property than some previous tries, because I didn't want to overdesign
#
Zegnat
Yes, definitely adding that when I get back to my laptop.
#
tantek__
sknebel: not sure. hence why need to document examples. maybe "he/him" is two values for a pronoun property.
#
tantek__
see that github issue https://github.com/tootsuite/mastodon/issues/3211 for a lot more discussion about the complexity of cross-language machine-readable pronouns
#
Loqi
[clarcharr] #3211 Add pronoun field alongside bio
#
sknebel
which is why Zegnats proposal doesn't really do that
#
sknebel
from my understanding
#
[kevinmarks]
I have seen "she/they"
#
Zegnat
Who is Zegnat?
#
Zegnat
... I thought I had he/they there. But apparently Loqi is taking a break?
#
Zegnat
See #indieweb-chat
#
sknebel
microformats channel doesn't have indieweb lookups
#
Zegnat
There was a brainstorm about multilingual pronouns with pronoun objects: http://microformats.org/wiki/microformats2-parsing-brainstorming#Pronouns_in_different_languages But I personally thought that would quickly become unworkable
#
sknebel
so yours currently only shows up as links in the parser result
#
sknebel
which I'm not sure how I'd be supposed to handle that as a consuming app, whereas I could at least just display it in e.g. a user profile if it were only text
#
sknebel
and if the language info came through, that could pick the localized version where a language is known
Lymia1 and RoBz11 joined the channel
#
Zegnat
Yes, I am just seriously doubting a string version of a pronoun is useful for anyone unless it is one of he/she/thry
#
Zegnat
*they
#
Zegnat
Which is why I ended up going with links to full descriptions of the pronoun
#
sknebel
anyone as in people or as in software?
Code_Red12 joined the channel
#
sknebel
so theoretically, wrap the link in some microformat so that there's text and a link? should I be extracting the title from your links when displaying your bio?
#
Zegnat
That's a good question.
#
Zegnat
A string is not useful for people nor software. See the tootsuit issue. What do you do with "ne/nim"?
#
Zegnat
As a person chances are you have never seen it. As software, even if you have a big database, it's not enough to figure out what the other cases are.
[jgmac1106] joined the channel
#
Zegnat
But a link can simply be https://pronoun.is/ne and it'll at least help people.
#
tantek__
thanks to you Zegnat I ended up on https://en.wikipedia.org/wiki/Nae_Nae
#
tantek__
linked from enwp.org/nene
#
sknebel
as a person, I treat it as an edge-case and handle it appropriately (e.g. google it). the link helps me in that case. In the 9x% of cases, I want to see some form of text though since my brain is happily capable of doing everything that follows
#
sknebel
so text with link to details sounds good to have
#
Zegnat
Yeah. Sadly as soon as we are talking about having text and link, we require a nested h- object. Which I was trying to avoid.
#
Zegnat
I am happy to send people down rabbit holes, tantek__ ;)
#
tantek__
now that song is stuck in my head
Guest31344, [manton] and tantek__ joined the channel
#
sknebel
Zegnat: could be a simple name:url pair still? no need to make the properties more complex
#
sknebel
closest we have is h-cite, which technically is a reference to a document in some way with name and url, but e.g. the name is supposed to be the document name, so overloading it is probably confusing
#
Zegnat
So: .[up]-pronoun.h-pronoun > .u-url && .[up]-pronoun.h-pronoun > .p-name
#
Zegnat
I’ll be adding all this to the brainstorming page in a bit. First documenting all the #indieweb-dev h-app/manifest discussion
#
sknebel
Zegnat++
#
Loqi
Zegnat has 17 karma in this channel over the last year (142 in all channels)
sjohnson7 joined the channel
#
aaronpk
wtf is MicroJSON
[kevinmarks] joined the channel
#
[kevinmarks]
A good idea, that, json output
[jgmac1106] joined the channel
#
[jgmac1106]
I think everyone who has ever tried microformats has published the oops...I used "u-photo" everywhere post..found [miklb] searching the web on a different topic: https://miklb.com/blog/2017/04/12/microformats2-wordpress-and-featured-images-classes/
ksx4system7 and sebsel joined the channel
#
aaronpk
i just added a microformats JSON validator to https://pin13.net/mf2/#json
#
aaronpk
includes some rudimentary debug info if it's invalid too
#
zegnat
edited /h-card-brainstorming (+1349) "/* Pronouns */ Add link to Mastodon discussion as discussed on IRC. Add feedback from [[User:Sknebel]] on [[User:Zegnat]]’s pronoun work."
(view diff)
#
Zegnat
sknebel, I documented the name:url pair idea there ^^^
#
[pfefferle]
aaronpk found a bug
#
[pfefferle]
this is valid isn’t it?
#
[pfefferle]
“items”: [
#
[pfefferle]
“type”: [
#
[pfefferle]
“h-entry”
#
aaronpk
whoops
[pfefferle] joined the channel
#
aaronpk
slack bridge got kicked by the server
#
aaronpk
paste into a gist or something instead
#
[pfefferle]
hmm, sorry, I make a gist
#
aaronpk
i really need to make the slack bridge do that
#
aaronpk
it says it's invalid
#
Zegnat
_id is not valid
#
Zegnat
contains an int and not a string
#
aaronpk
Item 0 was invalid: One of the values of "in-reply-to" is not an array
#
aaronpk
"in-reply-to" should be "in-reply-to": [{ object }]
#
aaronpk
not "in-reply-to": { object }
#
Zegnat
that too
#
[pfefferle]
the same with author on the h-entry?
#
Zegnat
Is there a good JSON validator online somewhere? We already have a JSON Schema for mf2 ...
#
aaronpk
but you have to paste the json schema in
#
aaronpk
the errors are not super helpful tho
#
[pfefferle]
ok, then I also have to fix my author markup and the jf2_to_mf2 function
#
Zegnat
I think the errors are pretty good, aaronpk
#
Zegnat
line 6: Invalid type. Expected Array but got Object.
#
Zegnat
What I saw when I validated using jsonschemavalidator.net: https://i.imgur.com/RjMZeNY.png
#
aaronpk
Zegnat: I tried one and got back 16 errors but there was only one actual error that caused a cascade
#
Zegnat
Huh. What schema were you using?
#
aaronpk
The one from cleverdevil
#
Zegnat
Hmm. I’ll have to look at why that would be so different from mine (https://gist.github.com/Zegnat/65ed9a9fb0546fb8c4aa0c0b790b8a40) then
#
Zegnat
I just had to remove the wrapping “"items": []” from the JSON, as my schema doesn’t do whole documents just yet, only single mf objects.
#
Zegnat
But then the error reporting seemed to be pretty solid
#
Zegnat
wonders if a validator like that would be useful for microformats.io
SporkWitch16 joined the channel
#
aaronpk
I have no idea how to make something that fancy but that would be great
#
aaronpk
I'd love if it could point out the line number the error is on, but I could only get mine to report an error as text
Alistair27 joined the channel
#
Zegnat
I’ll have a look tomorrow. Am about to shut down for the night
#
[pfefferle]
aaronpk, now the other way around
#
[pfefferle]
I fixed my markup and now it validates but, the in-reply-to error still exists
#
aaronpk
That’s still wrong
#
aaronpk
needs to be [{…}]
#
[pfefferle]
yes, but the validator says it’s valid
#
aaronpk
Oh weird ok
[stefp] joined the channel
#
aaronpk
ohh i forgot about children
#
Zegnat
Still shows multiple errors for me.
#
aaronpk
ok updated to validate children
#
[pfefferle]
and I always get an error “Item 0 was invalid: Object 0 is missing the “value” property”
#
aaronpk
author is an object still
#
Zegnat
Properties that are objects (like author) require a "value" key with a string value of the object
#
aaronpk
ill try to improve that error
#
Zegnat
So that might also trigger errors about missing value properties
#
Zegnat
E.g. if "author" is parsed from "p-author" it will not just contain the h-card object, but also an extra key "value" that inherits the value of the nested h-card’s "name"
#
[pfefferle]
ah, I see
#
Zegnat
“If a microformat2 object is used as the value of a property, it will gain the additional member value to express a plain string representation.” - http://microformats.org/wiki/microformats2-json#properties
#
aaronpk
one sec, that's not what this error is saying, but that is true
#
Zegnat
I recommend reading through that page, [pfefferle] ^^^
#
[pfefferle]
but even the example fails with: Object 0 is missing the “html” property
#
Zegnat
My example JSON on that page?
#
Zegnat
shakes imaginary fist at aaronpk
#
aaronpk
one sec, i broke something weird
#
Zegnat
The example h-entry on properties and the example h-feed on the section about children both validate 100% correctly with my (pretty strict) JSON Schema
#
[pfefferle]
thanks you both, will add the changes to the plugin…
#
[pfefferle]
I am off for now
#
Zegnat
Feel free to ping me tomorrow, in our own timezone, [pfefferle]. If you need more debugging
#
Zegnat
aaronpk, on a quick glance it seems most JSON validators in PHP work on the decoded JSON. So the errors can’t report line numbers :(
#
aaronpk
that's what i was afraid of
#
aaronpk
ok there we go
#
aaronpk
this does actually kind of help you find the error now heh
#
aaronpk
"Item 0 was invalid: One of the child objects was not valid: One of the values of "in-reply-to" is not a valid mf2 object: One of the values of "author" is not a valid mf2 object: Item is missing the "type" property"
#
aaronpk
i can probably at least display that with better nesting
#
willnorris
finally got around to filing an issue for the problem we were discussing Friday about expanding relative URLs in e-* html values (https://github.com/microformats/microformats2-parsing/issues/38) At the very least, we need to resolve the discrepancy between the spec and the tests
#
Loqi
[willnorris] #38 resolve relative URLs in e-* html
bradenslen, [grantcodes], KartikPrabhu and Exaeta joined the channel
#
ben_thatmustbeme
Hmmm. Thoughts from others on this..
#
Loqi
[willnorris] #4 normalize output of go parser to match tests
#
tantek__
hmm sounds reasonable and much smaller than what I thought it would be
#
Loqi
[willnorris] #38 resolve relative URLs in e-* html
#
tantek__
what is oath
#
tantek__
oops wrong channel
#
ben_thatmustbeme
Well, I mean wouldn't we want all outputs to match as identically as possible?
#
ben_thatmustbeme
Wonder if I can figure out some way to instead have a 'passing but with minor differences' result
#
ben_thatmustbeme
Or rather non-important differences
#
ben_thatmustbeme
The encoding I would definitely want to see differences of
#
willnorris
I could move some of these replacements into the parser, but they're not really "wrong" per se... They're perfectly valid output. They just fail an exact string match. Fwiw, I do this same replacement in testsuite_test.go in the library.
#
ben_thatmustbeme
I knew about the closing tag thing in Ruby, stuff like that is set of annoying as it depends on the language, but I guess it's a question if knowing these differences exist and wanting to determine if the passing rules want to dictate things like there
#
ben_thatmustbeme
These*. (On mobile)
#
ben_thatmustbeme
Parsing rules* sort if annoying*.
#
willnorris
I'm really gunning for 100% passing in the go library... At some point, thses will likely be the last holdouts. (Currently passing 101/117)