#dev 2021-06-04

2021-06-04 UTC
mikeputnam joined the channel
#
mikeputnam
i wonder if https://datatracker.ietf.org/doc/html/rfc5785 aka the /.well_known/ convention on the web server, would be suited for webmentions on static sites?
#
[schmarty]
from #indieweb mikeputnam: i'm curious what features of webmention might be helped by using a pattern like /.well_known/ ?
#
[schmarty]
what is well_known?
#
Loqi
It looks like we don't have a page for "well_known" yet. Would you like to create it? (Or just say "well_known is ____", a sentence describing the term)
#
[schmarty]
(asking the wiki bot)
#
[schmarty]
what is well known?
#
Loqi
It looks like we don't have a page for "well known" yet. Would you like to create it? (Or just say "well known is ____", a sentence describing the term)
#
[schmarty]
it looks like wiki search may be down
#
[schmarty]
so the uses listed there mostly seem to do with looking up some info about a domain or user on a domain. that "discovery" aspect of Webmention is already covered by the spec - any page that accepts webmentions will have an HTTP header or HTML <link> header indicating where to send webmentions.
rrix joined the channel
#
mikeputnam
my incomplete thought was owing to me wanting to do my first webmention, on my static site. so my first action was "hmm... i'll need a directory to house these webmention files separate from my blog posts." then i wondered if a convention existed. then i recalled /.well_known/.
alex11 joined the channel
#
[schmarty]
ah, so you're looking for a place to store received webmention data for your posts?
#
mikeputnam
perhaps the best /.well-known/ could do would be to declare "HERE is the subdirectory of webmentions". but as webmentions are POSTed elsewhere explicitly, having a convention for where to keep them is probably irrelevant.
#
[schmarty]
yep, where webmentions are "kept" after receiving is kind of treated like an "implementation detail" since the needs of any given site might be very specific.
#
mikeputnam
i hadn't yet considered RECEIVING a mention. was just thinking about POSTing one and how to organize my files.
#
[schmarty]
when you say "POSTing" a webmention - do mean notifying another site that one of your posts linked to theirs?
#
mikeputnam
yes
#
mikeputnam
i was going to RSVP to a "Homebrew Website Club - The Americas" meetup by authoring a webmention then submitting(POST) the form back to the event.
#
[schmarty]
ah! i think i might understand. so the important thing is that you have a post on your site that links to the HWC Americas. the "webmention" is really the process of using that form to notify the event site that your post links to it.
#
mikeputnam
yes i think so
#
[schmarty]
if you want to keep posts like RSVPs separate from your blog posts, etc., that's pretty much up to you. webmention doesn't specify how you design the URLs for your site.
#
mikeputnam
KartikPrabhu, hendursaga and [tantek] joined the channel
#
[tantek]
Also, /.well-known/ is for *other folks* to lookup (discover) things on your site. There's zero reason to use (and plenty not to) /.well-known/ for your own site's storage or other relevant information for your implementation
#
[tantek]
Though due to the name and confusion (like your initial question mikeputnam) there's reasons to avoid any use of .well-known
#
[tantek]
That is, to use "follow your nose" methods of discovery instead
#
[tantek]
nothing in IndieWeb depends on, requires, or otherwise "takes advantage of" .well-known
KartikPrabhu joined the channel
#
@lawik
So indie web things. I really have a hankering to get fancy with open web tech. I already do plenty of RSS. What's next? WebSub? (prev. PubSubHubbub) Does anything use it? Notifications? (I know the nag sucks, it wouldn't be a default) Microformats2? Webmentions? Is this in use?
(twitter.com/_/status/1400692456568594438)
[capjamesg], hendursaga, gRegorLove, james, barnaby and bneils-ghost joined the channel
#
petermolnar
how would one implement a "202 accepted" for micropub? All the clients I tried says it failed, but because it's a static site, I'd only want to queue them.
#
sknebel
that seems wrong. are you returning a post URL? (which I realize can be tricky if you are not creating it at that moment, but is required per spec - returning a placeholder URL instead could work maybe)
[Murray], shoesNsocks and chenghiz_ joined the channel
#
petermolnar
let's see that
#
barnaby
From #indieweb:
#
capjamesg
I think you can give better context by writing about your blog / what you do versus just open sourcing.
#
barnaby
example of my former point: the micropub adapter I’m working on is perhaps the first piece of software I’ve ever written which had 100% test coverage from day 1
#
capjamesg
I can explain microformats on my blog but someone seeing the raw Jekyll template for the first time would probably go: what is this? how does it work?
#
barnaby
I doubt my personal site software will ever reach that
#
capjamesg
Considering blogs are supposed to be fun things to work on, maybe open-sourcing introduces a certain expectation of professionalism in code (i.e. test coverage, readme, whatever).
#
capjamesg
Just thinking aloud.
#
sknebel
I personally disagree with that, as long you are clear about it
#
capjamesg
Hm. You're probably right. Yeah.
#
sknebel
I generally dislike arguments that opening code comes automatically with responsibility to maintain it to certain standards you haven't promised
#
sknebel
because a lot of maintainer burnout etc comes from expectations like that
#
barnaby
for me, that threshold comes from when I publish something to a package manager
#
sknebel
that sounds like a good threshold, yes
#
capjamesg
Yeah. That sounds like a good idea to have in one's mind.
#
barnaby
I have plenty of code on my gh which is badly written but did the job, and I published it in case it might do the job for someone else
#
capjamesg
That's sort of why I publish scripts as well.
#
sknebel
right, and such code can be plenty useful
#
capjamesg
ANd for future reference.
#
barnaby
but I have higher standards for stuff which gets published to package directories
#
sknebel
there was a recent blogpost about treating open code like a box with usb drives on your front door and a "FREE" sign
#
capjamesg
Love it.
#
sknebel
let me see if I find that again
#
capjamesg
I like to publish code from / related to my personal site if I think it's going to be useful to someone else, or if I might need it in the future.
#
barnaby
ooh always nice to see people talking about the categorical imperative
#
sknebel
I feel like some of this was also touched on in [jackjamieson]s thesis https://dissertation.jackjamieson.net/ regarding motivations what to work on etc
#
Loqi
[Jack Jamieson] Independent Together: Building and Maintaining Values in a Distributed Web Infrastructure
#
barnaby
woah someone wrote a dissertation about indieweb?!
#
sknebel
(e.g. in some of the quotes, seems like chapter 4 has the most relevant bits)
#
capjamesg
Interesting.
#
capjamesg
Separate point but still interesting: “Having a blog can get you through the tough times, the lonely times and the confusing times.”
#
barnaby
that dissertation is pretty interesting
#
barnaby
pity that most of the links are broken
[KevinMarks] joined the channel
#
petermolnar
there's also https://dr.amy.gy/ which is also indieweb-related to a certain level
#
capjamesg
An hour to generate one million pages? Amazing.
#
sknebel
!calc 1 hour / 1e7 pages in ms/page
#
Loqi
∞^~
[kimberlyhirsh] joined the channel
#
capjamesg
Are you okay Loqi?
#
sknebel
!calc 1e7 / 3600
#
Loqi
2777.7777777777777777777777777777777777777777777777777777777777777...
#
barnaby
woah that’s a lotta sevens
#
sknebel
(funnily enough wolfram alpha on the web manages to answer the first query, the api doesn't...)
#
[KevinMarks]
He was doing it in 10,000 page chunks so you could likely paralellise it more for more speed
bneils-ghost and capjamesg joined the channel
#
capjamesg
This might be a basic HTML question but are <button> tags only for forms or can one use them outside of the form context?
#
capjamesg
I only ask because Lynx (text-based browser) points out that a button on my site does not have a form action. This got me thinking about whether buttons with onclick events are semantically correct.
[Murray] joined the channel
#
[Murray]
yep, they're fine, but to be on the safe side you should set `role='button'`
#
[Murray]
otherwise some browsers will _assume_ it's a submit button and try to find a form
#
capjamesg
Excellent!
#
capjamesg
Super helpful.
#
[Murray]
oh woops I mean `type='button'`
#
[Murray]
not role
#
[Murray]
been working on way too many ARIA things lately 😅
#
barnaby
and if you want an official confirmation, here’s the relevant WHATWG HTML spec page https://html.spec.whatwg.org/multipage/form-elements.html
#
[Murray]
and yeah, in terms of semantics `<button>` is one of the only things that _should_ have `onclick` events 🙂 (though there is a lot of grey area etc. etc., but rule of thumb 😄)
#
barnaby
<button> can be used “Where phrasing content is expected.”, and does nothing outside a form
#
capjamesg
Fascinating. I'll look at the spec for more info, too.
#
capjamesg
Here's the button, for context:
#
capjamesg
(not accessible in text-based browsers, evidently!)
#
capjamesg
I should remove "Click here" actually.
#
[Murray]
good Loqi 😄
#
barnaby
capjamesg: my rule-of-thumb for elements like that is “if an element *only* works with js is enabled, it should be added to the document with js, or at minimum, hidden by default and shown from js”
#
[Murray]
also, that's an interesting use-case, because before you press the button it's definitely a button, but the action it takes is technically a link 😄 I'd stick with `<button>` here personally, but there was a _whole thing_ on Twitter about a week ago around this 😅
#
[Murray]
looks good though, and cool idea :thumbsup:
#
barnaby
I’d say <button> is suitable here, as it’s not linking to a specific URL
#
[Murray]
yeah, I'd agree
#
barnaby
and a form with method=get, submitted via a button, is also very similar to an <a>
capjamesg joined the channel
#
capjamesg
barnaby: Can you clarity?
#
capjamesg
Do you mean that I should insert the button with JS on page load?
#
barnaby
what specifically?
#
capjamesg
*clarify
#
capjamesg
"*only* works with js is enabled, it should be added to the document with js, or at minimum, hidden by default and shown from js”
#
barnaby
ah right: yes, ideally, or if it’s too awkward, then hide the button with display: none and then show it via js at page load
#
capjamesg
Right? I assume that's so the button is accessible to people who are not using JS?
#
barnaby
hmm actually the hidden attribute would probably be more suitable than display: none
#
barnaby
capjamesg: does the button do anything without js?
#
barnaby
then there’s not much point in having it accessible to people with js enabled
#
barnaby
*disabled, sorry
#
capjamesg
Yep. So the best course of action is inject with JS on page load?
#
barnaby
ideally, yep
#
barnaby
then lynx won’t be able to complain about it any more ;)
#
capjamesg
Hehe :)
[tantek] joined the channel
#
[tantek]
The point of button being inside a form is so that it can "work" (perform whatever action is intended by clicking it), WITHOUT JS
#
[tantek]
i.e. without any onclick or any other JS, clicking the button is handled by a form submission to the site which then produces the page with changes expected when the button is pressed
reed joined the channel
#
[tantek]
What's the use case for using a button outside of a form?
calebjasik, nekr0z, Abhas[m], batkin[m], reed and gRegor joined the channel
#
[Murray]
Well, for example, when the button requires JS
#
[Murray]
and semantically isn't part of a form
#
[Murray]
i.e. it's just a trigger for a JS function
#
[tantek]
that's not a use case, that's implementation
#
[tantek]
use case = what visible action is it performing on behalf of the user
#
[Murray]
ah, well one I've just been working on is a tab interface; so it loads an entirely different section of content
#
[Murray]
the example capjamesg had was to load a random page
#
[tantek]
so for both of those, the button would submit the form to the server which would then render the different tab / section of content, or return a random page
#
[Murray]
sure, if you're using serverside rendering and languages. But if you're not, then that won't do anything
#
[tantek]
the expectation is that a well built site has that as a default, and then any JS version on the client is an enhancement for speed / responsiveness
#
[tantek]
what is progressive enhancement
#
Loqi
progressive enhancement is the web development practice of building web pages, sites, apps so they are at least readable, and preferably allow for most if not all interactions, from any kind of browser, and optionally take advantage of additional capabilities (like various CSS & JS features) when available https://indieweb.org/progressive_enhancement
#
[Murray]
_eeeh_ I mean I'd love that to be true, don't get me wrong, but, well, React...
#
barnaby
well capjamesg linked to his site above, and it seems to be a static site, so client-side code is the only way of implementing a “random page” function
#
[Murray]
and I'd say the method barnaby detailed is progressive enhancement
#
[tantek]
yes, there are a lot of badly built React sites, though my understanding is that even with React there's ways to do serverside rendering as it were
#
[Murray]
and yeah, Jamstack/static sites
#
barnaby
yeah, if people want to pick a random article with js disabled, they can wave their mouse around and click wildly
#
barnaby
it’s a fun luxury feature, not something which is integral to the site’s experience
#
[Murray]
exactly, if it was site critical it would be a different story, but it isn't
#
[tantek]
yes the combination of a static site and dynamic features is an interesting challenge
#
sknebel
hm, random site function on a static site... page with an image map where every pixel links a different post? :P
#
aaronpk
haha that's great
#
barnaby
oh wow, a legitimate use for image maps
#
[tantek]
regenerate the image map on every site rebuild
#
[tantek]
"slow random" 🙂
#
[Murray]
Only if those dynamic features are critical. I'm working on a personal music collection microsite at the moment, and the main page has a sort function. I'm building in NextJS, so React. If you have JS enabled, the sort function works; if you don't, the page just falls back to being sorted in a specific way and doesn't render the sort toggle
#
[tantek]
that seems like a reasonable form of enhancement
#
[Murray]
As a point of interest, I've seen some people manage random page links on 11ty
#
[Murray]
so there must be a way to do it 😄
#
[Murray]
heh, in fact I bookmarked an article on just that: https://heydonworks.com/article/the-random-link/
#
[Murray]
(thought it rang a bell)
#
barnaby
“Please disable JavaScript to view this site.” !!!
#
barnaby
that’s a new one
#
[Murray]
oh yeah, I have it autodisabled for Heydon's site, forget about that 😄
#
barnaby
I’m not actually sure how to disabled it in FF
#
[Murray]
I have a plugin for testing purposes, so that's how i do it
#
barnaby
safari has a convenient menu item for it
#
barnaby
ah it’s under Debugger for some reason
#
[Murray]
Adds to right-click and menu bar
#
barnaby
ooh thanks
dianoetic joined the channel
#
barnaby
given how difficult it is (enabling develop menu in safari, digging through the debugger in ff), I find the “Please disable JavaScript to view this site.”, with no hints as to how to do that or what the point is, a pretty bizarre barrier to entry
#
aaronpk
it is art
#
[Murray]
eh, the point is to be a bit controversial to try and get people to stop making things JS only; a shoe on the other foot type thing
#
aaronpk
or what [Murray] said
#
[Murray]
making it hard is therefore slightly intended
#
barnaby
seems kinda like the pendulum effect, swinging from js-only sites to no-js sites
#
dianoetic
Holy scrollback batman
[fluffy], [schmarty] and bneils-ghost joined the channel
#
@fluffy
↩️ WebSub/PuSH is supported by a number of feed readers; I did a brief survey of support about two years ago (which could probably stand to be updated): https://beesbuzz.biz/blog/2655-WebSub-support-update mf2 and webmention are very heavily used by #indieweb folks.
(twitter.com/_/status/1400866216726650881)
capjamesg joined the channel
#
GWG
I'm wondering. I haven't tested this in a while. If I reply to https://micro.blog/odd/11536044 using the WordPress comment system, can micro.blog pick it up? We determined in the past that some webmention endpoints can do a fragment source
#
Loqi
[odd] @dshanske I read the Wikipedia article about him just now. So many shenanigans!
#
capjamesg
Just caught up on this chat.
#
capjamesg
Have been away out on a walk.
#
capjamesg
tantek what course of action would you recommend?
#
capjamesg
The button is not critical. It appears only as a "fun" feature.
#
capjamesg
The entire site is HTML, CSS, and sprinkles of JS for features like a coffee ratio calculator and a quiz.
#
capjamesg
The site is entirely readable without JS, designed that way in fact.
#
capjamesg
You could disable CSS and the site would probably be fine, too :D
#
GWG
Hey, that worked with micro.blog
#
GWG
Good to know
#
GWG
I should document that somewhere
#
Loqi
[odd] @dshanske I read the Wikipedia article about him just now. So many shenanigans!
#
GWG
Do we have anywhere on the wiki where we document which webmention endpoints support query strings and fragments well?
#
capjamesg
!tell tantek progressive enhancement is interesting. The feature doesn't quite fall under that category because, ultimately, the button appears irrespective of whether you have JS enabled.
#
Loqi
Ok, I'll tell them that when I see them next
#
capjamesg
I've now got a whole line of questioning about buttons and revealing text. But that's for another day.
#
[Murray]
I hear revealing text; I think <details> (very dependent on use case 😄) https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
#
capjamesg
This page relies on JS for buttons.
#
capjamesg
You can only find the answer to a question if you have JS enabled.
#
capjamesg
Which I didn't think about when implementing but now seems like an important consideration.
#
Loqi
[James] Game: Guess the Edinburgh Cafe (Part 3)
#
[Murray]
yep, that looks like a good use case for the <details> element
#
capjamesg
Great. I'm just reading through the docs to make sure it was semantically correct.
#
capjamesg
Everyone has been so helpful. Thanks!
#
[Murray]
the _literal_ semantics may not be perfect, but in terms of how people would expect to interact it feels like a good fit
#
capjamesg
++Murray
#
capjamesg
Murray++
#
Loqi
Murray has 3 karma in this channel over the last year (6 in all channels)
#
[Murray]
(was intrigued to see if that would work 😄)
#
[Murray]
and thanks, happy to help
#
capjamesg
To be honest, I'll probably write a post about this once I've implemented the change.
#
capjamesg
And I wouldn't have even given this any thought today if it was not for Lynx, the text-based browser.
#
[Murray]
:thumbsup:
#
@jensimmons
You know how each browser used to have totally different technologies for making add-ons or extensions. (They weren’t even called the same thing.) And how more recently, several browsers totally changed their extensions to use a similar set of APIs as the others? Yeah. That.
(twitter.com/_/status/1400863060617744387)
#
[Murray]
uh, second tweet in that thread is probably the meaty one: https://twitter.com/jensimmons/status/1400863060617744387?s=20
#
@jensimmons
You know how each browser used to have totally different technologies for making add-ons or extensions. (They weren’t even called the same thing.) And how more recently, several browsers totally changed their extensions to use a similar set of APIs as the others? Yeah. That.
(twitter.com/_/status/1400863060617744387)
#
@jensimmons
Now it’s official. There’s now a WebExtensions Community Group, initiated by Apple, Google, Microsoft and Mozilla, for aligning on a common vision for browser extensions and to work towards future standardization. https://www.w3.org/community/webextensions/2021/06/04/forming-the-wecg/ Web standards. For extensions.
(twitter.com/_/status/1400863061452414985)
#
capjamesg
Oh, this is interesting.
#
capjamesg
Super interesting.
#
barnaby
nice! I remember having to use a weird framework to build cross-browser extensions
#
Zegnat
I feel like there was a group for that and Microsoft still had someone in there...
#
Zegnat
what is webextensions?
#
Loqi
WebExtensions are a cross-browser way to develop browser add-ons https://indieweb.org/WebExtensions
#
Zegnat
Aah, it was the browser extension community group! https://www.w3.org/community/browserext/
#
Zegnat
Guess we get to update the wiki page with the new working group
#
Zegnat
WebExtensions << [https://twitter.com/jensimmons/status/1400863061452414985?s=20 New WebExtensions Community Group] has been formed 2021-06-04
#
@jensimmons
Now it’s official. There’s now a WebExtensions Community Group, initiated by Apple, Google, Microsoft and Mozilla, for aligning on a common vision for browser extensions and to work towards future standardization. https://www.w3.org/community/webextensions/2021/06/04/forming-the-wecg/ Web standards. For extensions.
(twitter.com/_/status/1400863061452414985)
#
Loqi
ok, I added "[https://twitter.com/jensimmons/status/1400863061452414985?s=20 New WebExtensions Community Group] has been formed 2021-06-04" to the "See Also" section of /WebExtensions https://indieweb.org/wiki/index.php?diff=76008&oldid=74272
[jacky] joined the channel
#
[jacky]
added some thoughts to the Webmention ecosystem repo https://github.com/indieweb/webmention-ecosystem/issues/2
#
Loqi
[jalcine] #2 Defining the Retrieval Source for Webmentions
#
barnaby
well, now I know way more about letsencrypt and ACME than I ever wanted to
#
barnaby
I wrote a script which will automatically authorize all the domains on my shared hosting, then generate a single cert which covers them all, renewing it automatically if it’ll expire in less than two weeks
#
barnaby
now I just need to make it send the key and cert to me in an encrypted email, as I need to update them manually
bneils-ghost joined the channel
#
barnaby
we’ll see how long I end up doing this before deciding to pay the 14€ per subdomain one-time SSL set-up fee
#
barnaby
if it was 5€ I’d just do it, but I plan on having many subdomains, and 14€ each time stacks up very quickly
#
[jacky]
easily
[KevinMarks] joined the channel
#
sknebel
ugh, SSL setup fees is ... not going with the times
#
barnaby
yeah. they give you one free cert, but it only covers a single subdomain, not even a wildcard domain
bneils-ghost joined the channel
#
sknebel
that your old hosting provider?
#
barnaby
nope, the old one was a VPS which I managed myself with certbot
dianoetic, rrix, bneils-ghost, KartikPrabhu, jjuran, [schmarty], barnaby, [tantek], [fluffy], [Murray] and [KevinMarks] joined the channel
#
@Lucid00
↩️ And after you've paid it pops up with a Credential Management dialog to authenticate you without resorting to cookies (preferably powered by something like IndieAuth, but OpenID Connect and the many OAuth providers could work), so your payment will be associated with this account
(twitter.com/_/status/1400964124406956036)