Skip to content

Microblog

A microblog of sorts. Collects notes and likes.

In reply to https://jan.boddez.net/notes/4f6a062d3e. The Facepile block supports …

In reply to https://jan.boddez.net/notes/4f6a062d3e.

The Facepile block supports InnerBlocks; the default template contains a Heading and a … Facepile Content block.

If no likes, bookmarks, etc. exist, nothing will be shown (which is why a Group block didn’t cut it).

There will be a setting allowing users to exclude likes, etc. from the “normal” comment list/count—the plugin currently treats all webmentions as normal comments—to not display them twice.

In reply to https://jan.boddez.net/notes/e649b90bb0. Did not want to …

In reply to https://jan.boddez.net/notes/e649b90bb0.

Did not want to have this in the plugin itself because then I’d have to make a bunch of choices that are hard to explain. (Like, what if there’s 3 images and 2 videos? Which one do you skip? How do you document this behavior.) I kind of already regret uploading images by default.

By providing a filter hook, individual site owners can do whatever suits them best.

In reply to https://jan.boddez.net/articles/conditionally-display-innerblocks. Neat Gutenberg trick: you …

In reply to https://jan.boddez.net/articles/conditionally-display-innerblocks.

Neat Gutenberg trick: you can have a block accept (and store) InnerBlocks, yet still employ a server-side render callback in which you can run all sorts of logic before returning … the block’s “static” contents.

Works for things other than InnerBlocks, too, by the way.

The trick is $block->render( array( 'dynamic' => false ) ), which returns whatever was saved in the editor. And that can still contain dynamic content, by means of InnerBlocks.

In reply to https://jan.boddez.net/notes/75e3d7fec8. The title and author …

In reply to https://jan.boddez.net/notes/75e3d7fec8.

The title and author thingy works as follows: We use apiFetch to call a custom REST API endpoint, and pass along the URL in question. The page gets downloaded and parsed, and if it sports microformats we use those to get an author name, if any, and title. If no title is found, we assume a note and fall back on the bare URL. If the page is not microformatted, we look for its title element instead.

I didn’t wanna deprecate IndieBlocks’ Context block nor …

I didn’t wanna deprecate IndieBlocks’ Context block nor introduce a bunch of breaking changes. So I simply added a couple new blocks (https://github.com/janboddez/indieblocks/tree/new-blocks/blocks). There’s two big differences:

  1. The new blocks support page title and author information (whereas a Context block will only ever show a bare URL), in a so-called h-cite microformat.
  2. They use, or support, Gutenberg’s InnerBlocks. This allows us to ditch sometimes unpredictable—as in, users don’t even know they’re there—block patterns.

Moved some common code into a global object thingy: https://github.com/janboddez/indieblocks/blob/new-blocks/assets/common.js. No clue if this is how it’s done, but it seems to work.

In reply to https://cagrimmett.com/micro/aa6b4febfe/. Looks like the Gallery …

In reply to https://cagrimmett.com/micro/aa6b4febfe/.

Looks like the Gallery block itself employs a filter to, if necessary, manipulate its inner Image blocks. Wonder if a similar filter could be used to simply shuffle $parsed_block['innerBlocks']? https://github.com/WordPress/WordPress/blob/dd87b5a4bd237d347f9b5bd2e493200b3945ff79/wp-includes/blocks/gallery.php#L19

That is, until https://github.com/WordPress/gutenberg/issues/9701 is fixed.

Could be wrong, though.

Bookmarked https://aviationweek.com/defense-space/aircraft-propulsion/hobby-clubs-missing-balloon-feared-shot-down-usaf. Wow. [Some Pico balloons are] …

Bookmarked https://aviationweek.com/defense-space/aircraft-propulsion/hobby-clubs-missing-balloon-feared-shot-down-usaf.

Wow.

[Some Pico balloons are] capable of circling the world several times before they pop or fall. [O]wners keep track of them through HF and VHF/UHF radio links, [with] tiny attached solar arrays sending power to the transmitter.

Dare Obasanjo