Adding a Discuss on Mastodon web component.

 

Adding a Discuss on Mastodon web component.

I have read several well-reasoned posts about the privacy and ethical implications of webmentions. If you aren't familiar, a webmention is an open web standard (W3C Recommendation) for conversations and interactions across the web, a powerful building block used for a growing distributed network of peer-to-peer comments, likes, reposts, and other responses across the web. It's a lofty ideal which may not take into account the concepts of data impermanence, consent, and loss of context by taking a reaction off its intended platform.

After reading these and the more recent considerations{rel="me"} about the Bluesky Bridge{rel="me"}, I decided I was not going forward at this time with implementing webmentions on weblog. This makes interactions between open web properties very limiting! I admit I am disappointed by this, even as I agree is it a privacy and consent nightmare. However, I know the community will come up with solutions to fill these holes, and I expect webmentions may eventually get some improvements to address the concerns.

It just so happens that one such solution came about this week in the form of a web component called <mastodon-post> by David Darnes{rel="external"}. This component takes a Mastodon post URL and uses the Mastodon API to pull relevant data in to create a prompt for interaction, "Discuss on Mastodon", and display the post and some data. You can customize the data via a web component template, but using the default setup isn't too shabby. It displays the Mastodon post as a blockquote with the account linked in a cite element, all wrapped in a figure and figcaption with reposts, replies, and favorites pulled in. Honestly, the default markup made me quite pleased. Since a lot of people won't customize it, providing web standards compliant markup out of the box is something to be appreciated, if not expected.

I started adding POSSE{rel="external"} links to my weblog posts around the time I implemented microformats on weblog during NaBloPoMo. So now all posts on weblog since the beginning of November with a corresponding POSSE link also have the <mastodon-post> web component. I didn't want to have to reproduce the component template everywhere I was going to use it, nor the "Discuss on Mastodon" link, so I used a few tricks on weblog to tidy this up in my post template.

First, I created an advanced variable (I will call these "advar") in weblog config for the "Discuss on Mastodon" link. If you're using weblog and you haven't played around with advanced variables, I wrote up a simple example over on the Custom weblog. For this advar there is only one parameter to pass in, the Mastodon post URL, $postURL:

Discuss on mastodon: <mastodon-post><h3 class="u-spacing--top"><i class="fa-brands fa-mastodon"></i><a href="$postURL" rel="me">Discuss on Mastodon</a></h3></mastodon-post>

You display this in your post by adding the advar tag with the postURL parameter and value of your Mastodon post:

{%discuss-on-mastodon:postURL=https://social.lol/@anniegreens/111972518455977832}

For my weblog, I will only be using the <mastodon-post> web component on post content using the "Main Template" so I only added the Javascript for the module to that template. Considering performance implications of adding another JS asset to the page, I opted to defer the loading of the module and placed it below the footer and before the closing body tag. This should have very little effect on the component itself since it appears at the end of a post's content in the post footer area. A reader would have to scroll to the bottom of a post almost immediately after loading a post page to see a lag in it rendering, be a very fast reader, or be on an unreliable internet connection—all real possibilities but I still don't see this component as being worthy of holding up rendering the rest of the page.

I also placed the customized component template just above the module <script> tag so that every post has that available without needing to cart it around. For this I created a global variable in weblog config:

; Discuss on Mastodon
Discuss on mastodon template: <figure class="mastodon-post"><blockquote class="mastodon-post__quote" data-key="content"></blockquote><figcaption class="mastodon-post__caption"><cite> — <a data-key="url" rel="me"><span data-key="username"></span>@<span data-key="hostname"></span></a></cite><dl class="mastodon-post__stats"><div class="mastodon-post__stat"><dt><i class="fa-solid fa-retweet u-color--purple u-gap--right"></i>Reposts</dt><dd data-key="reblogs_count"></dd></div><div class="mastodon-post__stat"><dt><i class="fa-solid fa-comment u-color--purple u-gap--right"></i>Replies</dt><dd data-key="replies_count"></dd></div><div class="mastodon-post__stat"><dt><i class="fa-solid fa-star u-color--purple u-gap--right"></i>Favorites</dt><dd data-key="favourites_count"></dd></div></dl></figcaption></figure>

And this is how that looks in my "Main Template" after the closing </footer> tag and before the closing </body> tag:

<!-- Discuss on Mastodon -->
<template id="mastodon-post-template">
{%discuss-on-mastodon-template}
</template>
<script type="module" src="https://.../.../.../mastodon-post.js" defer></script>

As you can see, the template tags themselves are not inside the global variable. I have ideas that at some point in the future I might have multiple templates for this component with varying amounts of data. So I wanted to be able to plop in a different global variable when that time comes, if it does.

For styling I didn't have to do much. My well-rounded styleguide and existing CSS (including some choice utility classes) provided much of what I needed. I am still in the habit of adding component CSS classes, à la BEM, and I'd rather have them there if I need to rely on them than not. I really hope as I get CSS @layers rolled into my CSS architecture that I will learn to rely on them less. Here's how the "Discuss on Mastodon" component looks on A love letter to omg.lol:

Screenshot from weblog using a Dracula dark theme of the Discuss on Mastodon component with a styled blockquote containing the Mastodon post, the linked post author account, and data for reposts, replies, and favorites.

Post info

Links in this post:

POSSE copies:

Discuss on Mastodon

Apple Annie's Weblog

22 Feb 2024 at 00:14

Why I stick with Netflix.

 

Why I stick with Netflix.

Netflix was my first streaming platform and I still use it today. In fact, I've never cancelled it at all. This isn't to say I don't have complaints or that the service hasn't had issues or even changed what value they offer to subscribers. But I've stuck with it anyway, and I think there are a few reasons.

I first used Netflix back when it was DVD-by-mail only—gosh what year was that? I can't even recall. It quickly replaced the trip to Hollywood Video or Blockbuster. And then soon I was using my Playstation with a Netflix DVD to access the first incarnation of their streaming platform—I still have that disk!

Soon after that, the disk was no longer required to stream on my Playstation and my TiVo also offered Netflix streaming. Eventually I "upgraded" to AppleTV and I think now I'm on my third model. This has been the longest version of the Netflix platform that I've used over the years, unless you count the website. I also use the iOS and iPadOS apps, though don't often use the one on my phone. I do take my iPad to bed quite often to watch Netflix at night.

Throughout this time there have never been commercials on Netflix, not even an inkling or threat that I know of. And Netflix also doesn't shove previews for other shows at the beginning of episodes. Yes, the cost has increased, and you could say that the quality has decreased, but for me it still fills a hole.

I think the major benefit that Netflix has going for it is that it offers entire seasons upfront. This may not seem like a big deal to some people, but I like to binge, and I hate to wait. I hate to wait so much that I will let a new season of something on AppleTV+ or HBOMax sit and accrue episodes before I start watching it. Sometimes I'll wait until a season is almost entirely done, then catch up in a week or weekend, only to watch the finale as everyone else does.

I don't want to wait a whole week for new episodes—for what? what are we waiting for anymore?! it isn't broadcast TV! the waiting is pointless! you could argue that it might make sense on HBOMax because there is still a cable channel associated with it, but it makes no sense at all on AppleTV+—obviously, I have an opinion about this.

Netflix also provides me a fallback, if you want to call it that. Most other streaming platforms that still somewhat follow network television seasons, also follow the same seasonal lag for new shows and episodes. This drives me somewhat crazy, like we don't get a new episode sometimes because there's a holiday as if the person pushing the publish button is off that day. Sigh. So, I'll often watch Netflix when the other platforms lose their collective minds.

And then there's the nature of my chronic illness, which often leaves me bed- or chair-bound for some extended periods of time. There's not a lot to do in bed or laid up in a chair in the living room when you are too tired to read, or the eye strain from reading causes a migraine. A darkened room, even audio only if watching a screen is too much, with some Netflix playing quietly gets me through some hard times. This is when I don't mind the nonsense drivel of what I call the "Hallmark Channel quality" of some of Netflix's recent content.

When it comes to what bothers me most about Netflix, I'd say top-of-mind is the lack of two-factor authentication. There's really no excuse for it in 2024. I don't know what the hold-up is but I find it to be pretty unacceptable and if anything would make cancel my subscription, that might be it.

It also really bothers me that out of all the streaming services on my AppleTV, Netflix is the only one that does not tie into the TV app so that I can peruse and resume shows from my list of Up Next programs. If I'm really into some seasons or shows on other platforms that all allow me to use Up Next in the TV app I can sometimes go months without opening Netflix, and that's too bad for them.


Post info

POSSE copies:

Discuss on Mastodon

Apple Annie's Weblog

20 Feb 2024 at 02:55



Refresh complete

ReloadX
Home
(272) All feeds

Last 24 hours
Download OPML
A Very Good Blog by Keenan
*
A Working Library
Alastair Johnston
*
Andy Sylvester's Web
Anna Havron
annie mueller
*
Annie Mueller
*
Apple Annie's Weblog
Artcasting test feed
*
Articles – Dan Q
*
Austin Kleon
*
Baty.net posts
bgfay
*
Bix Dot Blog
*
Brandon Writes
Chris Coyier
Chris Lovie-Tyler
*
Chris McLeod's blog
*
Chuck Grimmett
*
CJ Chilvers
CJ Eller
*
Colin Devroe
*
Colin Walker – Daily Feed
Colin Walker – Live Feed
Content on Kwon.nyc
*
Core Intuition
*
Dave's famous linkblog
*
daverupert.com
Dino's Journal 📖
dispatches
E L S U A ~ A blog by Luis Suarez
everything changes
*
Excursions
*
Flashing Palely in the Margins
Floating Flinders
For You
*
Frank Meeuwsen
*
frittiert.es
Hello! on Alan Ralph
*
HeyDingus
*
Human Stuff from Lisa Olivera
inessential.com
*
Interconnected
Into the Book
*
jabel
Jake LaCaze
*
James Van Dyne
*
Jan-Lukas Else
*
Jim Nielsen's Blog
Jo's Blog
*
Kev Quirk
lili's musings
*
Live & Learn
Lucy Bellwood
*
Maggie Appleton
*
Manton Reece
*
Manu's Feed
maya.land
*
Meadow 🌱
*
Minutes to Midnight RSS feed
Nicky's Blog
Notes – Dan Q
*
On my Om
One Man & His Blog
Own Your Web
*
Pablo Morales
Pablo Morales
Paul's Dev Notes
*
QC RSS
rebeccatoh.co
reverie v. reality
*
Rhoneisms
*
ribbonfarm
*
Robin Rendle
Robin Rendle
*
Sara Joy
*
Scripting News
*
Scripting News for email
Sentiers – Blog
Simon Collison | Articles & Stream
*
strandlines
the dream machine
The Gorman Limit
The Homebound Symphony
*
The Marginalian
*
thejaymo
theunderground.blog
tomcritchlow.com
*
Tracy Durnell
*
Winnie Lim
wiwi blog
*
yours, tiramisu
Žan Černe's Blog

About Reader


Reader is a public/private RSS & Atom feed reader.


The page is publicly available but all admin and post actions are gated behind login checks. Anyone is welcome to come and have a look at what feeds are listed — the posts visible will be everything within the last week and be unaffected by my read/unread status.


Reader currently updates every six hours.


Close

Search




x
Colin Walker Colin Walker colin@colinwalker.blog