#dev 2018-04-02

2018-04-02 UTC
j12t, KevinMarks_, renem, leg, snarfed, KartikPrabhu, AngeloGladding, tantek and KevinMarks joined the channel; mblaney left the channel
#
Loqi
[Roland Turner] TL;DR: I have started a long-term project to substantially reduce my use of Facebook and increase my engagement with friends elsewhere, rather than outright quitting. I am interested to know where others are with this. They leave Omelas, they walk ...
#
tantek
what is original
#
Loqi
An original post link is a hyperlink from a POSSE copy to its original indieweb post https://indieweb.org/original
tantek and j12t joined the channel
#
tantek.com
edited /original_post_link (+668) "example: Roland Turner"
(view diff)
j12t joined the channel
#
tantek.com
edited /Facebook (+54) "/* How to delete your account */ shorten long headings"
(view diff)
AngeloGladding joined the channel
#
tantek.com
edited /Facebook (+1) "/* How to wean yourself from */ procrastination going well"
(view diff)
j12t joined the channel
#
lahacker.net
edited /projects (+80) "/* Canopy */"
(view diff)
KevinMarks, jeremycherfas, barpthewire, tantek, KevinMarks_ and j12t joined the channel
#
lahacker.net
edited /Canopy () "(-7012) Revamp after rewrite"
(view diff)
j12t, davy__, sebsel, tantek and KevinMarks joined the channel
#
petermolnar.net
edited /Facebook (+62) "/* How to wean yourself from */"
(view diff)
j12t joined the channel
#
petermolnar
css gurus: can two elements be forced not to allow linebreak in between them? in my case, dt and dd should always be on one line
#
KartikPrabhu
petermolnar: do you have a URL I could try in browser
#
Zegnat
petermolnar, make sure neither is set to display:block;? Even display:inline-block; may work if you still need margin/padding/etc support. (Though that may leave old IE in the dust.)
#
aaronpk
white-space: nowrap on an element that contains both should do it
#
Zegnat
Another option is of course float. And I bet someone who has played more with css flexbox/grids will have yet another solution.
#
petermolnar
aaronpk: that's the problem: there is no wrapper for the two elements
#
petermolnar
it's a regular definition list, dl dt dd, dt dd, dt, dd.... /dl
#
KartikPrabhu
Zegnat's display:inline-block should work
#
petermolnar
and on small screens, sometimes dt is on line 1, dd on line 2, which defeats the purpose
#
petermolnar
of course they are inline block; which makes it hard
#
petermolnar
I'm fairly certain it can't be done without a wrapper around them
#
Zegnat
If they are inline-block they should all ready be on one line?
#
petermolnar
Zegnat see my footer and resize
#
Zegnat
s/all ready/already
#
Zegnat
Ah, let me have a look
#
KartikPrabhu
petermolnar: it would be easier if you have an example?
#
Zegnat
just got home, so has a computer once again
#
petermolnar
what elements are allowed to have a <label> ?
#
Zegnat
Aah, you mean how there may be a linebreak between XMPP and the mail address?
#
Zegnat
label? Only form fields, I believe.
#
petermolnar
I mean yes, the linebreak; all the bold things are dt, the rest are dd
#
petermolnar
and the goal is to group dt and it's following dd
#
petermolnar
or to find a better way of doing this
#
Zegnat
Hmm. Yeah. white-space:nowrap; isn’t going to do it there either, as you do want the linebreak between the groups.
#
KartikPrabhu
is this even a <dl> sematically?
#
petermolnar
I don't understand this question
#
KartikPrabhu
is this a list of definitions?
#
petermolnar
I don't have a better to display something like this, but I'm open to suggestions
#
KartikPrabhu
why use <dl>? I would have used <div>s and <spans> or a normal <ul>
#
Zegnat
DL is merely a list-value grouping, so semantically this is fine, I’d say
#
aaronpk
oh nevermind I misread the error
#
petermolnar
I think dl is better, than random divs and spans
#
Zegnat
petermolnar, I believe it is legal to wrap the dt/dd pairs in divs within the dl. Surely that would fix it?
#
petermolnar
sure, but it's not elegant :P
#
petermolnar
KartikPrabhu: I wanted something which makes it nice and working without CSS, since Zegnat (khm) needs that
#
Zegnat
Alright. So somehow we want unbreakable whitespace between the dt+dd, and breakable whitespace between the dd+dt. Hmm.
#
Zegnat
This same problem would apply to any other HTML element you would choose, I guess. If you do not want a wrapper per pairing it gets frustratingly hard. Hahaha
#
Loqi
nice
#
petermolnar
I'm not looking into arcane css, + and ~ combinators
#
KartikPrabhu
petermolnar: set width: 50% and float: left on both ".content-footer dt, .content-footer dd"
j12t joined the channel
#
petermolnar
that would result in a table layout, which is not the goal
#
KartikPrabhu
some text things don't wrap and to fix that you might want "max-width: 100%; overflow-wrap: break-word" on ".content-footer *"
#
KartikPrabhu
what's the original goal?
#
KartikPrabhu
this will put the dt and dd on the same line
#
petermolnar
fluid, in line layout, but never break between dt+dd, only between dd+dt
#
KartikPrabhu
I am confused
#
KartikPrabhu
you want one solution that works across all viewport sizes?
#
petermolnar
ok. I want the same layout as now: fluid, everything in the same paragraph, filling up the space available (set to 72ch), but I don't want to allow line breaks between the definition title "dt" (eg. xmpp) and the definition details "dd" (eg. mail@petermolnar.net), only between "dd" and "dt"
#
petermolnar
and yes, one solution across any viewport
#
KartikPrabhu
you fine with using flex-box or grid?
#
petermolnar
if it works
#
Zegnat
Is that possible? I couldn’t find a way to specify where flexbox is and isn’t allowed to wrap :/
#
Zegnat
looking at grid now
#
KartikPrabhu
Zegnat: grid definitely won't help
#
KartikPrabhu
neither grid nor flex-box have some explicit breaking thing
#
KartikPrabhu
ok, I couldn't find any magic solution across all viewports
#
Zegnat
I was thinking grid might work if columns can have some sort of relative width and wrap, because we can then assign the dt and dd pairs to the same column? That way grid columns should only wrap the dt/dd pairwise?
#
KartikPrabhu
that won't work across viewports to convert it to inline I think
#
petermolnar
I didn't think this is possible, it's just curiosity
#
Zegnat
Everything whitespace:nowrap;, 7 grid columns, every column gets a DT/DD pair, wrapping within column can’t happen because we do not wrap on whitespace, but we do allow the grid columns themselves to map to fit the viewport.
#
Zegnat
Would that be possible, KartikPrabhu?
#
KartikPrabhu
Zegnat: if you assign same column to both dt and dd they won't split the same space in the column. they will stack
#
KartikPrabhu
vertically
#
Zegnat
Even if they are just inline elements?
#
KartikPrabhu
yes, that is how grid works. It works on individual elements not "groups"
#
KartikPrabhu
same with flex box
#
KartikPrabhu
CSS does not have any concept of "groups" of elements
#
Zegnat
In that case, you’re stuck using grouping <div>s for styling, petermolnar ;) Which is fine per HTML spec (“for styling purposes, each group in a dl element can be wrapped in a div element” - WHATWG HTML spec)
#
petermolnar
thx everyone
snarfed, j12t, KartikPrabhu, radedwork and [kevinmarks] joined the channel
#
[kevinmarks]
can you use dd +dt {} to select the dt after a dd?
#
Zegnat
But not sure how that helps?
#
skippy
snarfed: newest challenge with Granary for me: `content` has truncated links, rather that the expanded links. Since I'm going FROM tweets TO my site, the size limit isn't necessary for me. Is there an easy way for me to use expanded_url rather than display_url for all t.co links?
#
skippy
the tuncated links are all invalid, and I'd rather not have a bunch of links on my site that are all 404s.
#
snarfed
skippy: this is AS1 output?
#
snarfed
agreed, if you auto-link truncated links in AS1 content from tweets, you'll have a bad time
#
snarfed
the full urls are all in the AS1 tags field. but again, i definitely recommend using at least object_to_html() or render_content(), either of those will generate <a> tags that link to the full url
#
snarfed
(and you can html2text that HTML to markdown if you want)
#
[kevinmarks]
I was wondering if you could use that to do some clever float switching, but wrapping in <span> may be easier
#
skippy
snarfed: that should work for me. thank you!
#
snarfed
welcome!
j12t joined the channel
#
davy__
radedwork: that sounds pretty do-able.
#
aaronpk
doing that in JS is clever
#
[kevinmarks]
<video> fallback is still a bit annoying - for browsers that don't have it you can put a link in, but for unsupported format you still get a bad video.
#
[kevinmarks]
though I think h264 is supported almost everywhere now
#
radedwork
There's one format that's universally supported on everything a... yep that
#
radedwork
I also had this idea to do extreme fallback to bittorrent downloads for videos that are seeing very high traffic
#
radedwork
But I don't have an audience yet so it doesn't matter lol
#
GWG
Morning
#
Loqi
rise and shine!
#
[kevinmarks]
if you don't mind making your videos creative commons you can use internet archive to host
#
[kevinmarks]
they have bittorrent support
#
radedwork
ah cool. I didn't know
#
GWG
I am finding writing an authorization endpoint inside WordPress frustrating right now.
#
aaronpk
how so?
#
GWG
It's WordPress itself
[chrisaldrich] joined the channel
#
loqi.me
edited /series (+104) "[chrisaldrich] added "https://blog.medium.com/welcome-to-series-a-new-type-of-story-on-medium-bade380985c4" to "See Also""
(view diff)
#
GWG
I have to learn where to hook in
#
aaronpk
that does sound frustrating
#
GWG
I spent an hour wondering how I misinterpreted a redirect instruction before I realized that the command uses the WordPress safe redirect which only allows for same site.
#
GWG
So I have to roll my own login form
j12t, dougbeal|mb1, snarfed, davy__ and tantek joined the channel
#
Zegnat
Just nesting a bazillion functions is “functional programming”, right? https://gist.github.com/Zegnat/4fcfff20741a5f78a73bc7b717fd8396#file-pleaseno-php-L15-L44
#
aaronpk
#legit
#
KartikPrabhu
wow! what the what!
#
KartikPrabhu
is now worried about replicating this in mf2py
#
Zegnat
KartikPrabhu, it is steps 1 to 6 from https://html.spec.whatwg.org/#dom-innertext - you can of course implement those any way that makes sense in Python.
#
KartikPrabhu
I have never been able to read that spec
#
Zegnat
Maybe Python has a good way of doing step 4, where I am doing the whole double reverse.
#
Zegnat
If I get anywhere with implementing, I will of course also be happy to help with the spec reading!
#
KartikPrabhu
yeah 4 is tricky
#
tantek.com
edited /Falcon (+228) "/* Working On */ more details on how to show a map for an event, venue cache needs"
(view diff)
[cleverdevil] joined the channel
#
KartikPrabhu
Zegnat: actually step 5 is the trickiest
#
tantek.com
edited /Falcon (+0) "/* Working On */ bump up event post details"
(view diff)
#
Zegnat
That is actually being handled by my array_reduce, KartikPrabhu.
#
KartikPrabhu
Zegnat: yeah I am wondering how to do it in python
#
Zegnat
I keep count of how many linebreaks I have added to the string last. (This resets to 0 when I added a normal string.) If the current digit is less, do nothing. If it is higher, add the difference and up the counter.
snarfed, [miklb], KevinMarks, [snarfed] and kaushalmodi joined the channel
#
kaushalmodi
Finally got Markdown down "comments" (actually Webmentions sent by cweiske's commenpara.de) working on my site.. supports the triple-backquote Markdown code block syntax.. plus syntax highlighting too! :D
#
kaushalmodi
That's another big + against Disqus
#
kaushalmodi
That's another big + against Disqus
#
KartikPrabhu
kaushalmodi: how are you getting markdown from webmentions?
[kaushal_modi] joined the channel
#
[kaushal_modi]
Hugo's markdownify fn is doing the Markdown -> HTML conversion.
#
[kaushal_modi]
Each time webmention.io triggers the webhook, Netlify rebuilds the site using the latest JSON from wm.io
KevinMarks joined the channel
#
KartikPrabhu
[kaushal_modi]: no how are you getting the markdown in the first place? Webmentions are sent (usually) from HTML pages
#
kaushalmodi
The user types in markdown as usual **like this**. Those markup characters are retained when in the JSON obj.
#
kaushalmodi
The markdownify fn can handle a mix of HTML + Markdown
#
kaushalmodi
*retained in the JSON obj.
#
skippy
does anyone have examples of minimal markup for u-in-reply-to and u-repost-of for twitter links posted on one's own site?
#
skippy
https://indieweb.org/repost and https://indieweb.org/reply-context are helpful, but i'd like to see other examples.
chrisaldrich joined the channel
#
skippy
ah, i didnt read down far enough on the reply-context page. plenty of examples there.
symon1 joined the channel
#
Zegnat
KartikPrabhu, I took out that crazy “functional programming”. I expect this would map almost 1:1 in Python code? https://gist.github.com/Zegnat/4fcfff20741a5f78a73bc7b717fd8396
#
Zegnat
I don’t even know why I ended up with that crazy code I showed previously.
#
KartikPrabhu
yeah this might map directly
tantek joined the channel
#
KartikPrabhu
haven't parsed the loop in my head yet
[chrisaldrich] and [kevinmarks] joined the channel
#
www.boffosocko.com
edited /discuss (+1503) "Bullets on IRC/Matrix to add parallelism for chat modalities; hacked IRC section with blockquote for indent, but others may have better formatting ideas to keep the IRC section in columns; link for Matrix; section on chat service differences; see also lin"
(view diff)
snarfed, [eddie], davy_ and davy__ joined the channel
#
snarfed
Zegnat: huh, you're right, granary can't fetch your site: https://granary.io/url?input=html&url=http%3A%2F%2Flicit.li%2F
#
Zegnat
semi-expected at this point snarfed
#
snarfed
why is that?
#
Zegnat
Granary apparently doesn’t do HTTP/2
#
snarfed
you *only* do http2?!
#
snarfed
uh wow ok
#
Zegnat
It was a bit of a joke, and I tried to let people debug it themselves. But honestly, I might have to turn it off.
#
Zegnat
The upgrade path for tools seems to be too hard.
#
snarfed
heh yeah, tough joke
#
www.boffosocko.com
edited /next-hwc (+0) "update to 4-04 this week"
(view diff)
#
Zegnat
In my defense, the server was configured after a few drinks late on a post-IWC night.
#
Zegnat
Browser support seems stellar. But that’s where support seems to end :/
tbbrown joined the channel
#
www.boffosocko.com
created /Open_Domains_Lab (+2143) "stub page for an HWC-like program at St. Norbert College"
(view diff)
#
gregorlove.com
edited /Planning (+153) "/* Los Angeles */ WordCamps"
(view diff)
KevinMarks joined the channel
#
davy__
I'm having trouble finding something on the wiki: what's the difference between p-author and u-author?
[eddie] joined the channel
#
[eddie]
Hey davy__ the prefix tells the parser where to find the value. So p-author would use plain text, hence it would be something like “Eddie Hinkle”
#
[eddie]
u-author uses url, so it would grab something from a src or href attribute and return something like “https://eddiehinkle.com”
#
Loqi
microformats 2 prefix conventions
#
[eddie]
Good link, snarfed!
#
Loqi
Eddie Hinkle
#
davy__
Riight. So if the user can see it: p-author
#
aaronpk
in general you want to use u-author if there is a URL for the author
#
davy__
ooh, lovely. that link clears up a lot of questions. That's what I've been looking for
#
davy__
and both if I have both? or does u-author imply p-author?
#
aaronpk
you'd use "u-author h-card" to include the name in the nested h-card
#
aaronpk
so like <a href="http://example.com/" class="u-author h-card">Example</a> and then the parsed result would have a nested h-card
#
davy__
Grand so. Thanks!
#
aaronpk
the only difference is that the "value" of the h-card will be "http://example.com/" instead of "Example". you can try that out here: http://pin13.net/mf2/?id=20180402210325851 http://pin13.net/mf2/?id=20180402210334330
tantek, j12t, KevinMarks and chrisaldrich joined the channel
#
skippy
wow. 15K pages generated by Hugo in < 4 seconds on my MacBook. Wonder how fast it'll be on my server.
KevinMarks_ joined the channel
#
skippy
would someone more knowledgeable than me be so kind as to take a peek at https://gist.github.com/skpy/3bd265a9665adfc97b456a19755f8207 and tell me if this is reasonably sane markup? or have I fouled up all the microformats terribly?
#
skippy
oh nifty. thanks. second one parses, as well. just curious if "parsable" is necessarily sufficient.
#
skippy
although that repost parses as a "repost-of" an "h-cite"? am I mis-reading that?
#
aaronpk
xray doesn't store stuff but you can dump the markup in there too cause that actually tries to "interpret" it
#
aaronpk
the repost looks right
#
skippy
thank you!
snarfed joined the channel