#microformats 2017-04-25
2017-04-25 UTC
nitot, KartikPrabhu, [cleverdevil], tantek, [pfefferle], [colinwalker], [kevinmarks], fls-bbx-jonost|O, barpthewire, GWG and rodolfojcj joined the channel
# ben_thatmustbeme making some slow progress on fixing up the microformats2-ruby parser
# ben_thatmustbeme well maybe not that slow, between last night and a train ride this morning it at least has the children array
# ben_thatmustbeme doesn't parse it quite right yet, but its certainly an improvement
nitot joined the channel
# martymcguire[m] ben_thatmustbeme++ \o/ ? microformats2-ruby improvements!
[kevinmarks] joined the channel
# [kevinmarks] nice ben
# [kevinmarks] I wonder if we should take another pass at the 'parse all the tests with all the implementations' thing that we had before
gRegorLove joined the channel
# ben_thatmustbeme i'm updating the tests to actually use that repo, so ideally it will be
KartikPrabhu and [jeremycherfas] joined the channel
# gRegorLove sknebel: I don't think so. You mean like it keeps track of the specific HTML tag?
# ben_thatmustbeme not that i know of. i think thats because many of the parsers depend on libs that don't keep that around (at least not as HTML)
# ben_thatmustbeme looking at the ruby one you parse it into a tree, and then descend the tree to create a new tree, you could keep the nodes around, but i don't think it gives you an easy way to get back the html, at least not that i could tell
# KartikPrabhu mf2 parsing is supposed to be tag-agnostic that way
tantek joined the channel
# gRegorLove What are you wanting to do with that information, sknebel?
adactio joined the channel
[colinwalker] joined the channel
# gRegorLove Ah, yeah it could be cool to run an extension that adds an overlay in the browser
pniedzielski[m], martymcguire[m], nitot, pfefferle and [chrisaldrich] joined the channel
# ben_thatmustbeme martymcguire[m]: if you want to check out my progress github.com/dissolve/microformats2-ruby
[jeremycherfas] and KartikPrabhu joined the channel
# martymcguire[m] ben_thatmustbeme: sweet! i like that this mostly looks like simple tweaks/additions.
# ben_thatmustbeme well, i'm going to be doing a bunch more yet possibly
# martymcguire[m] passing around that "parsing_children" boolean feels "wrong" somehow.
# ben_thatmustbeme yes, but then having those in seperate files is sort of a messy way to do it
# martymcguire[m] what happens if that check is skipped? the properties get stuffed into a children object?
# martymcguire[m] as in, properties end up attached to the wrong things?
# ben_thatmustbeme so if you don't have it know if its parsing children or not, you get any h-* child in the children array, whether its a p-* or not
# ben_thatmustbeme so like p-author h-card items always end up duplicated in the children array
# ben_thatmustbeme it needs to know about its sort of weird the way it works though, its parsing the tree twice
# ben_thatmustbeme once for properties, once for children
# ben_thatmustbeme because the property_parser can't pass child h-* items up to the format_parser
# ben_thatmustbeme which is why it ends up messy and slow because its in mutliple parsers like that
# martymcguire[m] ahh, interesting. not proposing this as a code change right now, but would it make sense to do something like parse it all as formats and then collapse the appropriate formats as properties in a second pass?
# ben_thatmustbeme well i'd like to remove the second pass altogether
# ben_thatmustbeme so i think i'm going to just join those two classes together
# ben_thatmustbeme i could make it work this way, but as you can see, there are some messy bits
# ben_thatmustbeme well, i'm sort of on the fence with it, it works like this, its not as pretty, but its working now
# gRegorLove Does it do backcompat parsing yet? Have to keep the parent element in mind, whether it's mf2 or mf1
# gRegorLove I made some recent improvements to php-mf2 along those lines. It's an open PR, not in master yet.
# ben_thatmustbeme no, it doesn't do backcompat
# gRegorLove Ok, disregard :)
# ben_thatmustbeme well, thats something i want to add
# ben_thatmustbeme i want to get this thing as done as i can
# ben_thatmustbeme i'm not totally sure that the test suite is correct at the moment though
# gRegorLove It has some issues in places, but at least we can fix them in one place
# gRegorLove Offhand I know we need to get rid of the h-as- in there
# ben_thatmustbeme comparing JSON isn't that great, since rels: {} will break the test suite
# ben_thatmustbeme i was going to use microformats-tests as an npm module (as a way to just get all the test objects)
# ben_thatmustbeme i meant the test suite in the microformats-ruby gem itself
# ben_thatmustbeme huh, weird its changing -'s to _'s
# ben_thatmustbeme was wondering why things were failing
# ben_thatmustbeme ruby methods cannot have -'s in the name can they
[colinwalker] joined the channel
# @AndrewMiguelez #microformats question: How do I use #h-entry's #u-photo without an img element? Primary image is outside of the article for design reasons. (twitter.com/_/status/856926832041578497)
# Loqi [@aaronpk] @andrewmiguelez The u- prefix tells the parser where to find the value, so you can use a <data> element http://pin13.net/mf2/?id=20170425174631720
[mko] joined the channel
# KartikPrabhu u-photo and u-featured have been confused in the past
# KartikPrabhu yes
# KartikPrabhu right, that s what I meant. u-photo has been confusingly used for "photo post" and also the featured decorative image
[eddie] joined the channel
# KartikPrabhu [mko]: big top photos can easily be inside the article
# KartikPrabhu [eddie]: it is an external embedded post
AndrewMiguelez joined the channel
# KartikPrabhu [eddie]: yup :) I did it manually though :P
# AndrewMiguelez Hey, OP for the u-photo question here. For clarification, I have the featured image of the post as a banner placed in the DOM on the same level as the site header and content area.
# KartikPrabhu AndrewMiguelez: welcome. u-photo is used when you are explicitly posting a photo
# gRegorLove Welcome, AndrewMiguelez
# AndrewMiguelez Example: http://rechargeworkshop.com/diy-pallet-wood-bunting/
# Loqi [Written by Andrew Miguelez
» see all posts
Andrew Miguelez Andrew is the owner of Recharge Workshop. He loves to fix and build things, especially with pallet wood. His baby is the best baby out of all the babies. Primarily a web designer, Andrew found a wonderful overlap in blogging about his DIY hobby here on Recharge Workshop. You can follow him socially on facebook, instagram, and twitter.
andrewmiguelez.com] DIY Pallet Wood Bunting Written by: Andrew Miguelez
March 19, 2017Tutorial
If you do a Google search for “pallet wood bunt...
# KartikPrabhu for indicating a "Featured" image" you might want to use u-featured instead
# gRegorLove h-entry could be on the <body> or even <html>. The properties for child elements (like e-content) will indicate what the actual article's contents are.
# AndrewMiguelez I see that I should be using u-featured now. I wasn't considering it because it's in the "proposed" section.
# KartikPrabhu AndrewMiguelez: yes. Like gRegorLove said, I'd put the h-entry on the <body> and use "u-featured" for the image
# gRegorLove How easy that may be to set up depends on your CMS, though
# KartikPrabhu looks like WP
# AndrewMiguelez Yeah, not a noob here, let me have it.
# gRegorLove :)
# AndrewMiguelez haha. I am concerned about including too much non-relevant content inside the h-entry. Should I not be worried about that at all?
# gRegorLove With the class=e-content and class=p-name (or, looks like microformats1 equivalents) only the article's title and body will be parsed.
# gRegorLove So the parent h-entry can go anywhere higher in the DOM
# gRegorLove I don't know WP theming very well, but my understanding is a fair bit of the microformats are handled by the core code. The "hentry" is added on the <artlcle> element there, for example.
# AndrewMiguelez Okay, thanks. I haven't pushed my microformats2 updates yet. I was waiting to get the primary photo issue resolved to get it all done in one shot.
# gRegorLove mf1 is still fine, btw. Most mf2 parsers have backcompat
# AndrewMiguelez @gRegorLove you're right, they use mf1 very poorly in my opinion.
# gRegorLove pin13.net/mf2 is useful for testing parsing by URL or direct input too
# AndrewMiguelez WordPress Core only implements a couple mf1 tags and then leaves everything else up to the theme. But there are no settings, so switching to mf2 isn't exactly a simple thing.
# gRegorLove There's some #indieweb members pushing for better mf/mf2 in WP core, but it's a slow road. I think there's resistance because people have applied CSS to mf classes over the years. Anyway, different topic
# AndrewMiguelez Last question: is using mf1 and mf2 tags at the same time an issue? What's best practice?
# gRegorLove Not an issue. If mf2 is present, mf1 classes should be ignored.
# gRegorLove *ignored by mf2 parsers.
# gRegorLove So it gives you better coverage, if there's legacy, mf1-only parsers
# AndrewMiguelez Exactly what I was hoping for. Thanks gRegorLove!
# gRegorLove And in some cases, like hReview, mf1 is still a good idea because Google parses it, but not h-review
# AndrewMiguelez good to know
rodolfojcj and tantek joined the channel
# @AndrewMiguelez Why doesn't Google's Structured Data Testing Tool recognize h-entry and #microformats2? #microformats #mf2 (twitter.com/_/status/856957771249569792)
[cleverdevil] joined the channel
# gRegorLove Ohh
# gRegorLove I can update it in composer in the PR if you want?
# gRegorLove Hah
# gRegorLove I'll try it out locally
# gRegorLove Hmm
# gRegorLove Ok. phpunit 4.8.*?
nitot joined the channel
# gRegorLove Ok, pushed
# gRegorLove Ack, an issue on PHP 5.4 now. Wut.
# gRegorLove tantek: No, this is updates to php-mf2 for better backcompat parsing
# gRegorLove It's the phpdocumentor stuff that phpunit includes I guess, which requires PHP 5.5
# gRegorLove Maybe phpunit's composer.json is too loose on version number? I'm not sure
# gRegorLove I'm not sure how to exclude certain dependencies within dependencies
# gRegorLove (yo dawg)
[dgold] joined the channel
# gRegorLove I think the only way to exclude would be to manually edit the composer.lock. Sounds like dragons.
# gRegorLove Nudging phpunit to fix their composer might be better
# gRegorLove k
# gRegorLove At least we're passing PHP nightly now
# ben_thatmustbeme GAH, the deeper i go into this ruby gem the worse it feels
# ben_thatmustbeme i'm having to duplicate so much stuff just to get it to store the original names of things and not change street-address to street_address
KartikPrabhu joined the channel
# gRegorLove Why's it converting to underscores?
# gRegorLove Heh
# aaronpk there we go. used https://github.com/madumlao/phpenv instead
# KartikPrabhu does u-featured count as experimental?
# KartikPrabhu h-entry mf2
# KartikPrabhu tantek: seems to be in proposed additions : http://microformats.org/wiki/h-entry#Proposed_Additions
# gRegorLove woot
# KartikPrabhu what is h-entry?
# KartikPrabhu aaronpk: can I haz Loqi "what is" on this channel?
# KartikPrabhu hmm yeah nvm
# KartikPrabhu funny that microformats wiki does not use mf2 :P
# KartikPrabhu actually it does use some. I see h-entry, and some h-card
# KartikPrabhu for the h-entry URL
# gRegorLove Would probably need to update the MediaWiki version first
# KartikPrabhu tantek: body has a h-entry
# KartikPrabhu tantek: no http://microformats.org/wiki/h-entry has h-entry on the <body> and the Editor has a h-card and p-author
# gRegorLove I meant if it was to use the same plugin as indieweb.org does
# KartikPrabhu has become un-cannily good as scanning mf2 in source!
# KartikPrabhu tantek: oh ok not so good then :P
# gRegorLove Whoa. PHP 5.2 http://microformats.org/wiki/Special:Version
# KartikPrabhu yeah
# tantek we've tried to document the wiki "setup" here: http://microformats.org/wiki/mediawiki-customization in case you're curious
# gRegorLove ponders, very briefly, adding "update MediaWiki" to the Leaders summit
# KartikPrabhu yes likely
# gRegorLove Good idea
# gRegorLove aaronpk: Heh, Dreamhost kills the php process trying to run composer now, for taking too long. Let me try on a different server.
# gRegorLove Need the composer.lock though, right?
# gRegorLove Yeah
# KartikPrabhu precision
# KartikPrabhu aaronpk: yeah I think so, let me find ref
# KartikPrabhu aaronpk: something from here : https://en.wikipedia.org/wiki/Accuracy_and_precision#Common_definition
# KartikPrabhu anyway might not be important for h-measure semantics
# gRegorLove confidence interval? Think that's usually for stats, though
[chrisaldrich] joined the channel
# KartikPrabhu tantek: yes, quite possibly
# gRegorLove Or maybe just "interval" to be more generic
[cleverdevil] joined the channel
# gRegorLove Geez, so many dependencies
# aaronpk tantek: does this look right for backcompat? https://gist.github.com/aaronpk/932a351bfc13be0cf6919ce5d466c430
# gRegorLove It's from microformats2-issues
# gRegorLove Haha
# gRegorLove Argh. Now the build fails 5.4 AND 5.5
# gRegorLove Oy. Like 20 more dependencies failing
# gRegorLove (ok, 16)
# gRegorLove Sure. WIll that cause problems with PHP 5.5+ though?
# gRegorLove Yeah, my composer.lock comes from 5.6
# tantek edited /microformats2-parsing-issues (+30) "/* uf2 children on backcompat properties */ use a more nonsensical h-acme-some-acme-object rather than the possibly normal looking h-custom" (view diff)
# gRegorLove Excellent. Didn't realize composer varied it. Maybe that was the initial problem?
# gRegorLove Like do we need to specify phpdocumentor?
# gRegorLove Today at your request, yeah
# gRegorLove aaronpk: Ok, updating with your lock file.
# gRegorLove tantek: Want me to update the test case?
# tantek edited /admin-to-do (+281) "/* for site update to microformats2 */ update wiki skin to mf2" (view diff)
# aaronpk tantek: might want to update the example here then too http://microformats.org/wiki/microformats2-parsing-issues#uf2_children_on_backcompat_properties
# tantek edited /mediawiki-customization (+372) "note skinning, plugins, more to be documented" (view diff)
# gRegorLove Yayyyyy!
# gRegorLove I feel like I was asking tantek about this a while back. Let me check logs.
# gRegorLove It was about adr in h-card, actually, but maybe applicable? https://chat.indieweb.org/microformats/2017-03-06#t1488831469687000
# gRegorLove "If an element has one or more microformats2 root class name(s) (h-*) ... all backcompat properties, without an intervening root class name, are ignored inside that element" on http://microformats.org/wiki/microformats2-parsing#note_backward_compatibility_details
# gRegorLove I read that as: backcompat properties on the same element as an h-* get upgraded, but no backcompat properties inside that element
# gRegorLove So the updated backcompat does not upgrade the "locality" inside h-acme... http://gregorlove.com/php-mf2/test.php?id=15
# @jerrysievert parse your microformats from the command-line: https://github.com/JerrySievert/mf2 `mf2 https://www.jerrysv.xyz/` (twitter.com/_/status/856990061664976896)
# gRegorLove I thought the primary thing was to ensure it's not upgrading the mf1 locality
# gRegorLove What else should it add?
# gRegorLove Ah, gotcha
# gRegorLove Unmung matches: http://www.unmung.com/?html=%3Cdiv+class%3D%22vcard%22%3E%0D%0A++%3Cdiv+class%3D%22adr+h-acme-some-acme-object%22%3E%0D%0A++++%3Cdiv+class%3D%22locality%22%3EMF1%3C%2Fdiv%3E%0D%0A++++%3Cdiv+class%3D%22p-locality%22%3EMF2%3C%2Fdiv%3E%0D%0A++%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E&pretty=on
# gRegorLove As does microformats-shiv
# tantek yep, and that's likely because we resolved *this issue* http://microformats.org/wiki/microformats2-parsing-issues#any_h-_root_class_name_overrides_and_stops_backcompat_root but implementations didn't yet get updated
# gRegorLove From that chat log link above, "adr" is both a property and root class name though, right? That's why it gets upgraded to p-adr h-adr
# gRegorLove Current mf2 returns both types as well, just messes up the h-acme.... properties http://pin13.net/mf2/?id=20170425220609848
# tantek edited /microformats2-parsing-issues (+15) "/* uf2 children on backcompat properties */ use obv non-standard h-acme" (view diff)
# gRegorLove I'm confused by that example. "adr" would be ignored regardless since it's not inside a root class, right?
# gRegorLove Here it is with my PR: http://gregorlove.com/php-mf2/test.php?id=16
# tantek gRegorLove: no. "adr" is its own backcompat mf1 http://microformats.org/wiki/adr
# gRegorLove How do we tell if adr is being used as a root or a property?
# gRegorLove Heading out shortly for an appointment. Will catch up with logs and update/add tests later.
# gRegorLove Ok, I think that makes sense
# gRegorLove So for http://gregorlove.com/php-mf2/test.php?id=15 "adr" is a property of vcard
# gRegorLove aaronpk++ thanks for all the PHP work and reviewing
# aaronpk gRegorLove: i think i captured that all in the review https://github.com/indieweb/php-mf2/pull/111#pullrequestreview-34702768
# tantek edited /microformats2-parsing-issues (+679) "/* any h- root class name overrides and stops backcompat root */ add examples" (view diff)
# tantek gRegorLove: added examples to http://microformats.org/wiki/microformats2-parsing-issues#any_h-_root_class_name_overrides_and_stops_backcompat_root which should hopefully help with that one in case implementations haven't been updated to pass it yet
[kevinmarks] and [cleverdevil] joined the channel