#wordpress 2017-11-02

2017-11-02 UTC
snarfed joined the channel
#
GWG
Hi, there
#
GWG
I think we should have a list of single value properties and multi-value properties
#
snarfed
most properties can and sometimes are multiply valued. the meaningful q here is which ones does sem-lb actually do anything with, beyond just storing in e.g. comment meta, and for those, can it handle multiple values
#
snarfed
we could still whitelist for that, but we'd have to keep the whitelist in sync with the code itself, which is bug prone
#
GWG
snarfed: Well is this an issue of storage or the display code?
#
Loqi
[snarfed] #117 bug with multiple u-photos
#
GWG
Well, why not force that only on the properties we know are an issue?
#
GWG
I use several of the properties in other plugins
#
GWG
Syndication, for example, is pulled and displayed in Syndication Links.
#
GWG
Wait.
#
GWG
I'm looking at what I did
#
[miklb]
if the syndicate-to is handled inside the micropub plugin then the bridgy syndicate-to links might be able to be stored so as to be used by other micropub clients?
#
snarfed
[miklb]: if i understand your q right, that's how the bridgy publish plugin currently works
#
GWG
[miklb]: Bridgy will still have to create its own syndication target. So, I'm not sure that the same targets should be reused by other plugins.
#
[miklb]
well, it stores the value as bridgy-publish_twitter so I wasn’t sure
#
snarfed
defers to GWG
#
GWG
[miklb]: It does that in case you wanted to have a 'SNAP_twitter' target to syndicate via SNAP, for example
#
[miklb]
gotcha
#
snarfed
GWG: re only changing properties we know about...yeah, i'm fine with that. sem-lb currently expects lots of properties singly valued though. eg everything in https://github.com/snarfed/wordpress-semantic-linkbacks/blob/master/includes/class-linkbacks-mf2-handler.php#L181-L210
#
[miklb]
GWG but if I want to use bridgy for Twitter from a micropub client, it won’t work I don’t think. Shouldn’t it? I might be confusing myself now.
#
GWG
snarfed: Looking at the code, right now, out of the 8 properties that are white-listed, syndication is the only one that should have multiple arrays. But, since the whitelist has a filter to add properties optionally, I suggest a filter that decides whether a property should be single or multiple.
#
snarfed
GWG: a filter?! that's for when multiple plugins need to interoperate, right? this seems internal to sem-lb...?
#
GWG
[miklb]: You are confusing me. But it will work. That is what it does. Basically, right now, if you set the property, it will trigger Bridgy Publish. Moving the logic for that into the server and having plugins hook into it is a better design.
#
GWG
snarfed: There is a filter to tell Semantic Linkbacks to store more properties than default, if another plugin wants to use them. Therefore, extending that...
#
GWG
Originally, I had a blacklist, not a whitelist. It was switched to a whitelist because you don't need properties clogging up your meta if you have no use for them.
#
snarfed
eh disk is cheap, store everything
#
GWG
snarfed: Disk is cheap. MySQL databases, on the other hand...
#
snarfed
extending the filter would mean properties are stored singly or multiply depending on which plugins were installed (or not) when, which is dangerously inconsistent, even within the same site
#
[miklb]
GWG I stand corrected. I can post from Quill to WP and use the syndicate-to bridgy twitter.
#
GWG
[miklb]: I tested with Quill.
#
GWG
snarfed: We could special case syndication and kick the rest of the issue down the road until someone has a use case for another property.
#
snarfed
yeah maybe. or special case u-photo. either. ¯\_(ツ)_/¯
#
snarfed
mind weighing in on the issue
#
snarfed
er, the PR
#
GWG
Doing it now.
#
GWG
Commented
#
GWG
Suggesting another approach
tbbrown joined the channel
#
snarfed
on second though, we really shouldn't drop any data on the floor, period. we should store everything. i can rewrite the display code to handle multiply valued properties more generally. i'll do that.
#
GWG
If there are two properties, display only one.
#
GWG
Why not right there?
tantek joined the channel
#
GWG
I need to get back to my WordPress to MF2 Post Class
dougbeal|iOS joined the channel
#
[miklb]
this is probably a dumb question, but acting on a syndication target is just sending a webmention?
#
GWG
[miklb]: For Bridgy Publish, yes. But for other plugins, it could be using an API, etc.
#
[miklb]
OK, cool. Then I’m reading the code correctly.
[sdepolo], tantek, [keithjgrant], [kevinmarks], [miklb], [colinwalker], agn1, jeremycherfas, [eddie], [chrisaldrich], spaceoyster and hvxgr joined the channel