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.
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.
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.
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 🤞
:kitten: 💕
¹ https://kitten.small-web.org
² https://kitten.small-web.org/tutorials/streaming-html/
#Kitten #SmallWeb #hypermedia #WebSockets #RPC #eventDriven #StreamingHTML #web #dev
@TodePond Ah, darn, wish it was closer; sounds fun. Would’ve loved to pop over and show off Kitten for some live web coding :) (https://kitten.small-web.org)
Hope you have a blast :)
@ianb PS. In case you wanted to play with Kitten (https://kitten.small-web.org) for it, you should be able to customise the Streaming HTML file uploads example for your needs :)
There are also simpler but non-Streaming HTML examples for traditional POST (https://codeberg.org/kitten/app/src/branch/main/examples/file-uploads) and and Ajax version (https://codeberg.org/kitten/app/src/branch/main/examples/file-uploads-ajax)
(I’d use the Streaming HTML one as it would make implementing pagination, etc., easier.)
@penpot Elizabet – aka Miuki Miu¹ – made the original illustrations and the React Kawaii² app that Kitten Kawaii³ is a Kitten⁴ fork of.
Learn how it was ported from React/NextJS to Kitten here:
https://ar.al/2024/08/19/kitten-kawaii-porting-a-react-library-and-next-js-web-site-to-kitten/
¹ https://www.miukimiu.com
² https://react-kawaii.vercel.app
³ https://kitten-kawaii.small-web.org
⁴ https://kitten.small-web.org
So I just cooked up a little Penpot plugin template for Kitten:
https://codeberg.org/kitten/kitten-penpot-plugin
And made a little basic checklist example using it that’s persisted to the current Penpot page:
https://codeberg.org/aral/kitten-penpot-checklist-plugin
If all you know is Big Web and Big Tech and you’re constantly frustrated because WHY DOES WEB DEV HAVE TO BE THIS DIFFICULT???!!!… well, it doesn’t.
Check out Small Web (https://small-tech.org/research-and-development/) and Kitten (https://kitten.small-web.org).
CC @penpot
Well, that was easy :) Looks like Kitten¹ is going to be a great way to build Penpot Plugins.
Took me no time at all to port Kitten Kawaii² to a Penpot³ plugin. All in all, had to write 10 lines of extra code.
Might enter this in the plugin contest³ that’s going on and write something up about it next.
¹ https://kitten.small-web.org
² https://kitten-kawaii.small-web.org
³ @penpot
⁴ https://penpot.app/plugins-contest
076萌SNS is a social network, courtesy of 076. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.
All 076萌SNS content and data are available under the Creative Commons Attribution 3.0 license.