GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    Aral Balkan (aral@mastodon.ar.al)'s status on Thursday, 01-Feb-2024 03:41:53 JSTAral BalkanAral Balkan

    I’m really enjoying this new Streaming HTML workflow in Kitten…

    In this 15 second video, I cycle through the options in a selection box using the keyboard and the rest of the interface updates in response.

    ✨ There’s no custom client-side JavaScript making that happen. ✨

    It’s all server side.

    The changes stream to the client as HTML and are morphed into place via idiomorph.

    So simple and maintainable.

    💕

    https://vimeo.com/908339606

    #Kitten #SmallWeb #StreamingHTML #web #dev #html #JavaScript

    In conversationabout a year ago from mastodon.ar.alpermalink

    Attachments


    1. Kitten Streaming HTML (with idiomorph)
      from Small Technology Foundation
      I’m in the process of updating parts of (and finishing off) Domain* and so I’m implementing the new Streaming HTML feature/workflow in Kitten where you keep state entirely on the server and stream interface updates in response to events being triggered in the client without writing any custom client-side JavaScript. One issue I ran into immediately when testing this out with a select box that updates other parts of the interface was that the focus/state was being lost after the swap. Thankfully, Carson Gross was, of course, one step ahead and had created the idiomorph htmx extension for just this use case. You can see the result in the video. Every time I’m changing the selected option in the in the selection box, the interface is being updated from the server (you can see the log output scrolling as I make the changes in the terminal pane on the lower-left-hand corner. The code shown on the upper-left-hand corner Terminal pane is the entirety of the change handler on the server that is dealing with those updates. There is no custom client-side JavaScript. (I was able to remove all the Alpine.js code I had that was previously handling all this. It was ugly and hard to maintain and meant that I was keeping state in two places – the client and the server – instead of just one, on the server, as I am doing now.) I haven’t integrated idiomorph seamlessly into Kitten yet, but that’s next. Enjoy! �
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.

Embed this notice