Discussion
Loading...

#Tag

Log in
  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 6 hours ago

🥳 New Kitten Release

This one fixes a bug that you would have encountered had you had an asynchronous component (component with asynchronous render method) nested more than one-level deep within synchronous components.

(Kitten’s html renderer transparently supports both synchronous and asynchronous render methods.)

So, this (taken from my unit test), for example, works correctly now:

```js
class AsynchronousOtherName extends KittenComponent {
async html () {
await new Promise(resolve => setTimeout(resolve, 10))
return kitten.html`<i>Balkan</i>`
}
}

class SynchronousName extends KittenComponent {
/* NOT async */ html () {
return kitten.html`<strong>Aral</strong> <${AsynchronousOtherName.connectedTo(this)} />`
}
}

class SynchronousTemplate extends KittenComponent {
html ({ SLOT }) {
return kitten.html`[Before slot]${SLOT}[After slot]`
}
}

class MyPage extends KittenPage {
html () {
return kitten.html`
<${SynchronousTemplate.connectedTo(this)}>
<h1>This should render all at once after a short delay.</h1>
<p>Hello, <${SynchronousName.connectedTo(this)} /></p>
</>
`
}
}
```

Enjoy!

kitten💕

https://kitten.small-web.org

#Kitten #KittenReleases #SmallWeb #SmallTech #web #dev #JavaScript #NodeJS #async #render

  • Copy link
  • Flag this post
  • Block
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 13 hours ago

🥳 New Kitten Release

• Added `target` and `data-*` to the list of safe attributes you can specify within curly brackets when writing Markdown in Kitten.

Enjoy!

kitten💕

https://kitten.small-web.org

#Kitten #KittenReleases #SmallWeb #SmallTech #Markdown #web #dev

  • Copy link
  • Flag this post
  • Block
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 4 days ago

🥳 New Kitten¹ release

• Added `initialise()` hook to `kitten.Component` instances.

This gets called at the end of the constructor and is handy if you don’t want to override the constructor and have to handle the `data` parameter and remember to call `super(data)`. You can still access passed data from `this.data`.
Note that the component is not part of the view hierarchy on the client at this point. If you have tasks you need to perform only once per page – for example, instantiating a child component to use in your view template – override the `onConnect()` handler instead which is guaranteed to be called just once when your component has successfully been added to a connected page.

https://codeberg.org/kitten/app/src/branch/main/CHANGELOG.md#2026-02-23

Enjoy!

kitten💕

¹ https://kitten.small-web.org

#Kitten #KittenReleases #SmallWeb #SmallTech #web #dev #components

Codeberg.org

app/CHANGELOG.md at main

app - A web development kit that’s small, purrs, and loves you.
  • Copy link
  • Flag this post
  • Block
Konstantin 🔭 boosted
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 5 days ago

🥳 New Kitten release

⁃ Bug fix: Kitten no longer awaits events bubbled from the client to the server.

Kitten’s Streaming HTML workflow¹ transparently bubbles events from the client to the server so you can keep all your code on one tier and stream HTML updates to the page. Anyway, so I was awaiting events while bubbling them instead of just firing them off in parallel which meant that if you had delays, etc., in some of your event handlers, the timing of other event handlers would be affected. This is now fixed so your event handlers should fire independently of each other. (Your async event handlers will continue to work as intended so you can script animations, etc., by awaiting delays within them.)

Enjoy!

https://kitten.small-web.org

kitten💕

¹ https://kitten.small-web.org/tutorials/streaming-html/

#Kitten #KittenReleases #SmallWeb #SmallTech #bugFix #events #StreamingHTML

Kitten: Tutorials

  • Copy link
  • Flag this post
  • Block
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 5 days ago

🥳 New Kitten release

⁃ Bug fix: Kitten no longer awaits events bubbled from the client to the server.

Kitten’s Streaming HTML workflow¹ transparently bubbles events from the client to the server so you can keep all your code on one tier and stream HTML updates to the page. Anyway, so I was awaiting events while bubbling them instead of just firing them off in parallel which meant that if you had delays, etc., in some of your event handlers, the timing of other event handlers would be affected. This is now fixed so your event handlers should fire independently of each other. (Your async event handlers will continue to work as intended so you can script animations, etc., by awaiting delays within them.)

Enjoy!

https://kitten.small-web.org

kitten💕

¹ https://kitten.small-web.org/tutorials/streaming-html/

#Kitten #KittenReleases #SmallWeb #SmallTech #bugFix #events #StreamingHTML

Kitten: Tutorials

  • Copy link
  • Flag this post
  • Block
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 2 weeks ago

🥳 JavaScript Database (JSDB)¹ version 7.0.0 released

- *Breaking change* JSTable.PERSIST event now uses a parameter object with properties for `type`, `keypath`, `value`, `change`, and `table`. This should make listening for events on your databases much nicer to author. e.g., a snippet from Catalyst² I’m working on:

```js
const settingsTable = db.settings['__table__']
const JSTable = settingsTable.constructor

settingsTable.addListener(JSTable.PERSIST, ({ keypath, value }) => {
switch (keypath) {
case 'servers.serverPoolSize':
console.info('New server pool size requested', value)
this.updateServerPool()
break
// etc.
}
})
```

This new version of JSDB is not in the latest Kitten³ yet as it is a breaking change and I want to make sure I update my sites/apps first if needed. I should have it integrated tomorrow.

To see the simple use case for JSDB in Kitten (the default untyped database that’s easy to get started with and perfect for quick experiments, little sites, etc.), see: https://kitten.small-web.org/tutorials/persistence/

For a more advanced tutorial for creating your own typed databases in Kitten, see the Database App Modules tutorial: https://kitten.small-web.org/tutorials/database-app-modules/

For another example, see: https://codeberg.org/small-tech/jsdb/#table-events

Full change log: https://codeberg.org/small-tech/jsdb/src/branch/main/CHANGELOG.md#7-0-0-2026-02-10

Enjoy!

💕

¹ https://codeberg.org/small-tech/jsdb#readme
² https://catalyst.small-web.org
³ https://kitten.small-web.org

#JavaScriptDatabase #JavaScript #appendOnlyLog #JS #JSDB #JSDBUpdates #SmallTech #SmallWeb #Kitten #Catalyst

Codeberg.org

jsdb

A zero-dependency, transparent, in-memory, streaming write-on-update JavaScript database for the Small Web that persists to a JavaScript transaction log.
4 more link(s)
Aral Balkan
Aral Balkan
@aral@mastodon.ar.al  ·  activity timestamp 2 weeks ago

🥳 New Kitten release

Just released a new version of Kitten that now includes JSDB 7.0.0 with its improved JSTable.PERSIST event.

https://kitten.small-web.org

Note that this is a breaking change. If you’re listening for the old 'persist' event, please update your code.

For more information, please see the changelog: https://codeberg.org/kitten/app/src/branch/main/CHANGELOG.md#breaking-changes

Enjoy!

:kitten: 💕

#SmallWeb #SmallTech #Kitten #KittenReleases #web #dev #JavaScriptDatabase #JSDB #NodeJS

  • Copy link
  • Flag this comment
  • Block

bonfire.cafe

A space for Bonfire maintainers and contributors to communicate

bonfire.cafe: About · Code of conduct · Privacy · Users · Instances
Bonfire social · 1.0.2-alpha.34 no JS en
Automatic federation enabled
Log in
Instance logo
  • Explore
  • About
  • Members
  • Code of Conduct