mathstodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance for maths people. We have LaTeX rendering in the web interface!

Server stats:

2.8K
active users

#streaminghtml

0 posts0 participants0 posts today
Aral Balkan<p>New Kitten release 🎉</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>• New: Lovely new icons¹ and new callouts in Kitten Settings²</p><p>• New: Markdown now supports attributes and bracketed spans³</p><p>• New: client-side `kitten` global with `trigger` function for triggering events on the server from the client. (Useful when streaming client-side JavaScript when using Kitten’s Streaming HTML⁴ workflow. e.g., when you have to use a client-only web API like the Clipboard API but you want to keep all your logic on your server-side page.⁵)</p><p>• Fixed: The bound render function returned by `KittenComponent` class’s `component` getter now correctly awaits asynchronous templates. (In Kitten, you don’t have to care whether your templates contain promises. Kitten handles all that for you.)</p><p>Enjoy! :kitten:💕</p><p>¹ <a href="https://kitten.small-web.org/reference/#icons" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/reference</span><span class="invisible">/#icons</span></a></p><p>² <a href="https://mastodon.ar.al/@aral/114381983893061099" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mastodon.ar.al/@aral/114381983</span><span class="invisible">893061099</span></a></p><p>³ <a href="https://kitten.small-web.org/reference/#markdown-support" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/reference</span><span class="invisible">/#markdown-support</span></a> (also see <a href="https://mastodon.ar.al/@aral/114381462302862256" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">mastodon.ar.al/@aral/114381462</span><span class="invisible">302862256</span></a>)</p><p>⁴ <a href="https://kitten.small-web.org/tutorials/streaming-html/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/streaming-html/</span></a></p><p>⁵ e.g., See how I use this to implement a copy to clipboard button in the database page of Kitten’s Settings: <a href="https://codeberg.org/kitten/app/src/branch/main/web/%F0%9F%90%B1/settings%F0%9F%94%92/db/index.page.js#L33" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/kitten/app/src/br</span><span class="invisible">anch/main/web/%F0%9F%90%B1/settings%F0%9F%94%92/db/index.page.js#L33</span></a> Of course, you don’t have to use this and you can just write client-side JavaScript or use the built-in Alpine.js integration. e.g., how I do it on the (older) settings/identity page: <a href="https://codeberg.org/kitten/app/src/branch/main/web/%F0%9F%90%B1/settings%F0%9F%94%92/identity/index.page.js#L7" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/kitten/app/src/br</span><span class="invisible">anch/main/web/%F0%9F%90%B1/settings%F0%9F%94%92/identity/index.page.js#L7</span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/markdown" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>markdown</span></a> <a href="https://mastodon.ar.al/tags/icons" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>icons</span></a> <a href="https://mastodon.ar.al/tags/PhosphorIcons" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PhosphorIcons</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a></p>
Aral Balkan<p>New Kitten release</p><p>• Fix: messages that are promises are properly awaited before being sent.</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>Kitten automatically and transparently handles asynchronous content in your templates for you so you don’t have to worry about it. One place where this wasn’t working properly is if you addressed `this.component` to stream a custom update of your component manually instead of calling the `this.update()` method of Kitten component instances.</p><p>e.g.,</p><p>```js<br>export default class AdminPage extends kitten.Page {<br> // …<br> onSelectedPost (data) {<br> this.send(kitten.html`&lt;${this.component} postId='${data.selectedPost.postId}' /&gt;`)<br> }<br>}<br>```</p><p>:kitten:💕</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/news" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>news</span></a> <a href="https://mastodon.ar.al/tags/updates" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>updates</span></a> <a href="https://mastodon.ar.al/tags/promises" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>promises</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a></p>
Aral Balkan<p>👆 Sorry, life got in the way; just deployed this but I haven’t had a chance to document it properly yet. I’ll make a proper announcement when I do.</p><p>Also, you can now use the `delete` attribute on a DOM node/Kitten component you’re streaming back from the server to have it removed from the DOM on the client. It’s syntactic sugar for hx-swap-oob='delete' in htmx.</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/icons" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>icons</span></a> <a href="https://mastodon.ar.al/tags/components" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>components</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a></p>
Aral Balkan<p>New Kitten release</p><p>• Socket routes now have precendence in the router.</p><p>This stops wildcard page routes from capturing the default socket routes that Kitten creates to enable the Streaming HTML workflow.</p><p>e.g., Previously, the following route:</p><p>/videos/index_[slug].page.js</p><p>Could not connect to its default socket (/videos/default.socket) because default.socket would be captured by the [slug] parameter.</p><p>Now, it will work as intended as the /videos/default.socket (a socket route) has precendence over index_[slug].page.js (a page route).</p><p>Learn more about Kitten’s Streaming HTML workflow here:<br><a href="https://kitten.small-web.org/tutorials/streaming-html/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/streaming-html/</span></a></p><p>Enjoy!</p><p>:kitten:💕</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/routing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>routing</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/JS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JS</span></a></p>
Aral Balkan<p>New Kitten Release</p><p>• Automatic message routing: if the element that triggers an event on the client does not have a `name` attribute, Kitten now falls back to using its `id` instead to route the event to the correct server-side event handler on your live Kitten pages. </p><p>If neither attribute exists, Kitten will fail to route the message but no longer crash as it was due to a regression introduced when I implemented support for colons in element names.¹</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>For more details on Kitten’s live pages and automatic message routing, please see the Streaming HTML tutorial:</p><p><a href="https://kitten.small-web.org/tutorials/streaming-html/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/streaming-html/</span></a></p><p>Enjoy!</p><p>:kitten:💕</p><p>¹ A colon in an element name is ignored for message routing purposes, letting you, for example, give unique names to &lt;details&gt; elements, allowing more than one to be open at a time, while having their events be handled by the same handler.</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/beautifulDefaults" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>beautifulDefaults</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a></p>
Aral Balkan<p>New Kitten release</p><p>• Fixes issue with routes where dynamic routes with file names that had more than two extensions were not recognised as the correct type of route. e.g., A route called index.xml.get.js would previously have been treated as a static route instead of a dynamic GET route.</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>For more details, see the Valid File Types section of the Kitten reference¹ and the Dynamic Pages tutorial².</p><p>Enjoy!</p><p>:kitten:💕</p><p>¹ <a href="https://kitten.small-web.org/reference/#valid-file-types" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/reference</span><span class="invisible">/#valid-file-types</span></a><br>² <a href="https://kitten.small-web.org/tutorials/dynamic-pages/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/dynamic-pages/</span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/server" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>server</span></a> <a href="https://mastodon.ar.al/tags/framework" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>framework</span></a> <a href="https://mastodon.ar.al/tags/kit" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>kit</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/routing" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>routing</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a></p>
Aral Balkan<p>New Kitten release</p><p>• You can now use key paths in the names of your client-side live components and these will automatically be transformed into object hierarchies on the server for you.¹</p><p>• Self heals zombie live pages (see Streaming HTML workflow²) if they return to life due to client-side browser cache.³</p><p>• Removes htmx⁴ headers from `data` property into separate `header` property in Kitten Page events and the data your Kitten Page message handlers receive.</p><p>• Automatically passes references to the live page object (if any) and the request and response objects to the layout templates of Markdown pages⁵ (so you can, for example, check if `request.session.authenticated`⁶ is true from the your layout template and customise the layout accordingly).</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>Enjoy!</p><p>:kitten:💕</p><p>¹ e.g., See <a href="https://codeberg.org/small-tech/site/src/branch/kitten/admin%F0%9F%94%92/news/index_%5Boptional-postId%5D.page.js#L356" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/small-tech/site/s</span><span class="invisible">rc/branch/kitten/admin%F0%9F%94%92/news/index_%5Boptional-postId%5D.page.js#L356</span></a> (markup) and <a href="https://codeberg.org/small-tech/site/src/branch/kitten/admin%F0%9F%94%92/news/index_%5Boptional-postId%5D.page.js#L173" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/small-tech/site/s</span><span class="invisible">rc/branch/kitten/admin%F0%9F%94%92/news/index_%5Boptional-postId%5D.page.js#L173</span></a> (handler) and <a href="https://codeberg.org/small-tech/site/src/branch/kitten/app_modules/database/database.js#L95" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">codeberg.org/small-tech/site/s</span><span class="invisible">rc/branch/kitten/app_modules/database/database.js#L95</span></a> (model class method). </p><p>² See Streaming HTML tutorial: <a href="https://kitten.small-web.org/tutorials/streaming-html/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/streaming-html/</span></a> (There’s actually more to it now but I haven’t had a chance to document the new class-based and event-driven live page workflow yet. It’s experimental but working very well for me so far so I will do so shortly.)</p><p>³ When a person leaves a live/connected page (a page connected to its default web socket), we clean up and remove that live page from memory. However, browsers being what they are, cache the page on the client. If a person uses the back/forward buttons to return to the page, the browser will serve the cached source from memory, which has the old page ID, for the page that no longer exists in Kitten’s memory. So now we have a problem. The only way to recover from this is to tell the page to reload itself. So we accept the WebSocket connection, send a command to the page for it to reload itself, and then close the socket. That makes the stale page self heal by replacing itself with a fresh one. Yay, go us!</p><p>⁴ HTMX: <a href="https://htmx.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">htmx.org</span><span class="invisible"></span></a></p><p>⁵ Kitten Markdown pages reference: <a href="https://kitten.small-web.org/reference/#markdown-pages-page-md-files" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/reference</span><span class="invisible">/#markdown-pages-page-md-files</span></a></p><p>⁶ See Session tutorial: <a href="https://kitten.small-web.org/tutorials/sessions/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/sessions/</span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/HTMX" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTMX</span></a> <a href="https://mastodon.ar.al/tags/Markdown" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Markdown</span></a> <a href="https://mastodon.ar.al/tags/sessions" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>sessions</span></a> <a href="https://mastodon.ar.al/tags/data" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>data</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a></p>
Aral Balkan<p>New Kitten update</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>• Added `remove()` method to kitten.Component class. Use this when working with live pages and components and you want to remove a component from the page (or its parent). It will handle removing event listeners for you so you don’t end up with any memory leaks.</p><p>• Improved `update()` method so it similarly removes listeners on child components before updating the component itself in case you have class-based child components that will be reinstantiated on render.</p><p>• Updated the `send()` methods on `page.everyone` and `page.everyoneElse` so you can pass a swap target to insert the element being streamed to the page before, after, asFirstChildOf, or asLastChildOf another. (This was already there for the page.send() but now the two broadcast objects have the same consistent interface.</p><p>The @small-web/kitten npm package (Kitten’s types package) has also been updated to version 5.1.0 to reflect the latest changes.</p><p>(Remember that the new class and event-based page and component model is still experimental and largely undocumented and fully backwards compatible with the classic functional way of authoring your page routes and components.)</p><p>Enjoy!</p><p>:kitten:💕</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/OOP" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OOP</span></a> <a href="https://mastodon.ar.al/tags/eventModel" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eventModel</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/WebSockets" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSockets</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a> <a href="https://mastodon.ar.al/tags/Javascript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Javascript</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a></p>
Aral Balkan<p>A quick demonstration of using the State: Overview page in Kitten’s¹ settings while developing to keep an eye on your event and event listener counts to avoid memory leaks.</p><p>Notice how the events and listeners counts change as I navigate between the People and Settings pages in my Place² node and that they are consistent. If they were rising as I navigated back and forth I’d know I had a memory leak somewhere.</p><p>If you use Kitten’s built-in features (e.g., the `addEventHandler()` method on your `kitten.Component` subclasses, Kitten will handle adding and removing listeners for you automatically during your component’s lifecycle. You can also do so manually in your component’s automatically-called `onConnect()` and `onDisconnect()` event handlers.</p><p>This view is useful during development to ensure you don’t have any memory leaks as pages are loaded and unloaded.</p><p><a href="https://vimeo.com/1050714714" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">vimeo.com/1050714714</span><span class="invisible"></span></a></p><p>¹ <a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a><br>² Place is in early development at the moment (<a href="https://codeberg.org/place/app" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">codeberg.org/place/app</span><span class="invisible"></span></a>)</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/demo" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>demo</span></a> <a href="https://mastodon.ar.al/tags/developerExperience" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>developerExperience</span></a> <a href="https://mastodon.ar.al/tags/developerTools" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>developerTools</span></a> <a href="https://mastodon.ar.al/tags/design" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>design</span></a> <a href="https://mastodon.ar.al/tags/eventModel" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eventModel</span></a> <a href="https://mastodon.ar.al/tags/events" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>events</span></a> <a href="https://mastodon.ar.al/tags/memory" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>memory</span></a> <a href="https://mastodon.ar.al/tags/memoryLeaks" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>memoryLeaks</span></a> <a href="https://mastodon.ar.al/tags/observerPattern" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>observerPattern</span></a> <a href="https://mastodon.ar.al/tags/listeners" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>listeners</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a> <a href="https://mastodon.ar.al/tags/server" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>server</span></a> <a href="https://mastodon.ar.al/tags/platform" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>platform</span></a> <a href="https://mastodon.ar.al/tags/framework" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>framework</span></a> <a href="https://mastodon.ar.al/tags/WebSockets" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSockets</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/place" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>place</span></a> <a href="https://mastodon.ar.al/tags/peerToPeer" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>peerToPeer</span></a> <a href="https://mastodon.ar.al/tags/peerToPeerWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>peerToPeerWeb</span></a></p>
Aral Balkan<p>New Kitten¹ update</p><p>Experimental:</p><p>• Adds `data` property to Kitten components</p><p>• Adds swap target to `page.send` so you can have an element added before, after, as first child of, or as last child of another (this is syntactic sugar over htmx and works around some of the complexities with out-of-band swaps in htmx, especially when streaming table rows to tables).</p><p>Also, check out the latest live page and page events state view in Kitten’s Settings (every Kitten app has this settings view).</p><p><a href="https://vimeo.com/1050348456" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">vimeo.com/1050348456</span><span class="invisible"></span></a></p><p>¹ <a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/OOP" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>OOP</span></a> <a href="https://mastodon.ar.al/tags/eventModel" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eventModel</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/liveComponents" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>liveComponents</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/RPC" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RPC</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/framework" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>framework</span></a> <a href="https://mastodon.ar.al/tags/server" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>server</span></a> <a href="https://mastodon.ar.al/tags/platform" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>platform</span></a></p>
Aral Balkan<p>So last night, while recording the preview of Kitten’s¹ improved component model², I made a silly mistake (copying raw HTML into a JavaScript function instead of wrapping it in a kitten.html`` tagged template, easy to do when you’re refactoring to pull out components from pages).</p><p>Then, once I figured out what I’d done, I made another one by forgetting to return the value from the function (easy to do when you’re used to using one-line closures as render functions).</p><p>I would have caught both of those so much faster if Kitten had helpful error messages for those two pitfalls. And guess what, this morning, it does :)</p><p>Attached are screenshot showing the before and after error messages.</p><p>Enjoy!</p><p>:kitten:💕</p><p>¹ <a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a> <br>² Scroll up the thread to watch the video.</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/PeerToPeerWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>PeerToPeerWeb</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/server" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>server</span></a> <a href="https://mastodon.ar.al/tags/framework" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>framework</span></a> <a href="https://mastodon.ar.al/tags/platform" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>platform</span></a> <a href="https://mastodon.ar.al/tags/design" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>design</span></a> <a href="https://mastodon.ar.al/tags/usability" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>usability</span></a> <a href="https://mastodon.ar.al/tags/errorMessages" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>errorMessages</span></a> <a href="https://mastodon.ar.al/tags/authoring" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>authoring</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a></p>
Aral Balkan<p>Little preview video: Kitten’s improved component model</p><p>• Class-based page routes and components<br>• Object-oriented<br>• Event-based<br>• Seamless hypermedia-driven WebSocket-based event mapping and interface updates (Streaming HTML)<br>• A light server-side live component hierarchy with event bubbling<br>• Almost as if you’re building a desktop or mobile app instead of a web app…</p><p>… another authoring simplification made possible because on the Small Web – which is a peer-to-peer web – you build a web app/site as a tool for one person (the owner of the site/app) instead of as a tool for you to farm millions of people.</p><p>… still experimental ;)</p><p><a href="https://vimeo.com/1049055406" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">vimeo.com/1049055406</span><span class="invisible"></span></a></p><p>Learn more about Kitten:</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>If you like what you see and want us to keep existing, we could definitely use your support:</p><p><a href="https://small-tech.org/fund-us/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">small-tech.org/fund-us/</span><span class="invisible"></span></a></p><p>:kitten:💕</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/objectOriented" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>objectOriented</span></a> <a href="https://mastodon.ar.al/tags/eventBased" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eventBased</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a></p>
Aral Balkan<p>New Kitten release 🥳</p><p>• Live events view in /💕/settings/state/pages <br>• Fix automatic event handler binding</p><p><a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p>I’ve also updated the Kitten Count example in the Streaming HTML tutorial to use the new, simpler, event handler syntax in the improved (and experimental) Kitten component model. There’s more to the latter (e.g., class-based routes) that’s not documented yet but will be soon.</p><p><a href="https://kitten.small-web.org/tutorials/streaming-html/#o-counter-my-counter" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/streaming-html/#o-counter-my-counter</span></a></p><p>Enjoy!</p><p>:kitten:💕</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a></p>
Aral Balkan<p>PS. I’m still not happy with the expressiveness of the htmx syntactic sugar. I’ve initially kept it as close as possible to htmx so as to help with reuse of knowledge if you already know it but I’ve been favouring semantics, internal consistency, and readability/ease of authoring in all things with Kitten so expect minor changes in syntax before I lock things down in API version 1.</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a></p>
Aral Balkan<p>Pretty soon, you’re going to be able to view your live pages and the events on them in real time while developing Kitten apps.</p><p>The improved component model with support for class-based routes (and a server-side component hiearchy that lets you build well-encapsulated components and pages and work in an event-driven way) is coming along nicely and I’m back to writing Place¹ using it.</p><p>(In the GIF, you’re looking at Place’s profile settings page. Not shown here but those profile changes reflect in realtime on all open pages. The highlighted piece of code is what streams the event details to the browser.)</p><p>¹ <a href="https://codeberg.org/place/app" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">codeberg.org/place/app</span><span class="invisible"></span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/WebSockets" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSockets</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/eventDriven" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eventDriven</span></a> <a href="https://mastodon.ar.al/tags/objectOriented" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>objectOriented</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a></p>
Aral Balkan<p>Feeling more like myself today after getting my ass kicked by this bug for the past few weeks and I’m finally making progress on improving Kitten’s¹ component model.</p><p>Soon, you’ll be able to implement page event handlers in an even simpler way than before. Is your connected DOM element named `pixel`? Then export an event handler called `onPixel()` on your page route and it’ll get called when that element triggers its event.</p><p>And there’s so much more coming, including a class-based page and component model with DOM-style event bubbling on the server. This should really let you make the most of the Streaming HTML² workflow in Kitten by writing event-driven GUI-like code but for a web app without really caring about the client/server separation.</p><p>Need to update the examples, test, test, test, and update docs but this had me stumped for a while now with several false starts and I feel this implementation might just be it 🤞</p><p>:kitten: 💕</p><p>¹ <a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a><br>² <a href="https://kitten.small-web.org/tutorials/streaming-html/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/streaming-html/</span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/WebSockets" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSockets</span></a> <a href="https://mastodon.ar.al/tags/RPC" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>RPC</span></a> <a href="https://mastodon.ar.al/tags/eventDriven" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>eventDriven</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a></p>
Aral Balkan<p>New Kitten update</p><p>Adds `:unique-suffix` support to automatic client-side element name to server-side event name mapping.</p><p>(This lets you give unique names to your elements while having them share the same event name.)</p><p>Read more in the “a magic connection” section of the Kitten Streaming HTML tutorial: <a href="https://kitten.small-web.org/tutorials/streaming-html/#a-magic-connection" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">kitten.small-web.org/tutorials</span><span class="invisible">/streaming-html/#a-magic-connection</span></a></p><p>:kitten: 💕</p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/HTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>HTML</span></a> <a href="https://mastodon.ar.al/tags/CSS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>CSS</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a></p>
Aral Balkan<p>Today @ 18:30 in Dublin: Come hear me talk about the Small Web and watch me demonstrate the current state of Kitten, Domain, and Place.</p><p><a href="https://meetu.ps/e/Ny9vK/H1WXJ/i" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">meetu.ps/e/Ny9vK/H1WXJ/i</span><span class="invisible"></span></a></p><p><a href="https://mastodon.ar.al/tags/ireland" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>ireland</span></a> <a href="https://mastodon.ar.al/tags/dublin" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dublin</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/talk" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>talk</span></a> <a href="https://mastodon.ar.al/tags/presentation" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>presentation</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/JavaScript" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.ar.al/tags/NodeJS" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>NodeJS</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/WebSockets" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSockets</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a> <a href="https://mastodon.ar.al/tags/selfHosting" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>selfHosting</span></a> <a href="https://mastodon.ar.al/tags/decentralisation" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>decentralisation</span></a> <a href="https://mastodon.ar.al/tags/p2p" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>p2p</span></a> <a href="https://mastodon.ar.al/tags/cryptography" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cryptography</span></a> <a href="https://mastodon.ar.al/tags/dubSec" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dubSec</span></a> <a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/Domain" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Domain</span></a> <a href="https://mastodon.ar.al/tags/Place" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Place</span></a> <a href="https://mastodon.ar.al/tags/SmallTech" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallTech</span></a></p>
Aral Balkan<p>Just added a code breakdown for the Draw Together¹ Kitten² app to my blog post with the tutorial video:</p><p><a href="https://ar.al/2024/03/26/draw-together/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">ar.al/2024/03/26/draw-together</span><span class="invisible">/</span></a></p><p>Draw Together, in ~50 lines of code, is a real-time collaborative drawing tool on a 20×20 pixel grid where people can click to toggle the colour of each pixel.</p><p>(The full source and explanations fit the four screenshots on this post.)</p><p>¹ <a href="https://draw-together.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">draw-together.small-web.org</span><span class="invisible"></span></a><br>² <a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/DrawTogether" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>DrawTogether</span></a> <a href="https://mastodon.ar.al/tags/web" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>web</span></a> <a href="https://mastodon.ar.al/tags/design" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>design</span></a> <a href="https://mastodon.ar.al/tags/dev" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>dev</span></a> <a href="https://mastodon.ar.al/tags/SmallWeb" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>SmallWeb</span></a> <a href="https://mastodon.ar.al/tags/WebSockets" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSockets</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a></p>
Aral Balkan<p>Kitten¹ update</p><p>I just added a new htmx header to <a href="https://mastodon.ar.al/tags/WebSocket" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>WebSocket</span></a> messages in Kitten that contains the actual event type (name) that triggered the message.</p><p>This is useful, for example, if your trigger is a horizontal swipe and you need to differentiate between whether it was a swipe left or a swipe right that caused it.</p><p>Upstream issue: <a href="https://github.com/bigskysoftware/htmx-extensions/issues/74" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/bigskysoftware/htmx</span><span class="invisible">-extensions/issues/74</span></a></p><p>Upstream merge request: <a href="https://github.com/aral/htmx-extensions/commit/359da12563fd0ef6709d801972f98ba1ab61c302" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/aral/htmx-extension</span><span class="invisible">s/commit/359da12563fd0ef6709d801972f98ba1ab61c302</span></a></p><p>Enjoy!</p><p>:kitten: 💕</p><p>¹ <a href="https://kitten.small-web.org" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="">kitten.small-web.org</span><span class="invisible"></span></a></p><p><a href="https://mastodon.ar.al/tags/Kitten" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Kitten</span></a> <a href="https://mastodon.ar.al/tags/htmx" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>htmx</span></a> <a href="https://mastodon.ar.al/tags/hypermedia" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>hypermedia</span></a> <a href="https://mastodon.ar.al/tags/StreamingHTML" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>StreamingHTML</span></a></p>