Jails Versions Save

Elegant and Minimalistic Javascript Application Library

v5.8.0

1 week ago

Change Log

We prioritize consistency over performance

The most recent updates aimed to enhance performance, but we encountered inconsistencies with HTML updates during testing. To ensure greater consistency and predictability, a significant change was implemented, replacing morphdom with idiomorph.

There are other well known libraries that already made that change:

We are indeed using idiomorph and we'll include it officially as part of Turbo 8. We started with morphdom, but eventually switched to idiomorph as we found it way more suitable. It just worked great with all the tests we threw at it, while morphdom was incredibly picky about "ids" to match nodes. Also, we noticed it's at least as fast.

-- Jorge Marubia / 37Signals

That helps on decision making about changing the core of the library which is the dom diff engine.

v5.7.1

2 weeks ago

Change Log

Reverting previous release : Performance Improvement

The latest update focused on optimizing memory usage. However, as Jails is designed to function with or without templates, a bug has been identified when users interact directly with the DOM. Therefore, I am rolling forward the current build. Prioritizing correctness over performance remains our primary concern.

The performance optimization was not discarted but it requires more deep research.

v5.7.0

3 weeks ago

Change Log

Performance Improvement

Making Templates smaller by removing child component html content from parent component template by creating "holes" inside the parent component template string.

Since parent component doesn't update child components html, it doesn't need to have child html data saved in memory.

This improvement is very welcome especially for pages that contains application component in the most top level hierarchy.

v5.6.1

1 month ago

Change Log

The change is related to the previous update. It was added the behavior in main to wait until template is fully rendered when using export template interface.

v5.6.0

1 month ago

Change Log

Adding template interface in component module. It will replace the current HTMLElement template html. It will unlock a way to set a html dynamically.

sync:

export const template = () => '<h1>Hello World</h1>'

async:

export const template = async () => '<h1>Hello World</h1>'

v.5.5.5

4 months ago

Change Log

  • Fixing error when calling jails.start without registering any component. 5.5.4
  • Assigning default empty object to the optional dependencies helper to avoid raising unnecessary exceptions.

v5.5.3

4 months ago

Change Log

  • Updating innerHTML interface to accept a DOMElement target.

v5.5.2

5 months ago

Change Log

  • Defensive code for cases where user tries to register the same component twice.
  • Fixing type definition for .start method, for cases where user wants to call it sending a optional target.

v5.5.1

5 months ago

Change Log

  • Fixing another edge case when using shared template variables among child components. Making it more robust.

v5.5.0

6 months ago

Change Log

✓ Stabilizing template system shared variable through child components. ✓ Adding new feature innerHTML that will make possible to update a component with html string instead of an object, using dom diffing for performance. Useful for server-side oriented UI, like htmx.

Use case:

export const myComponent ({ main, on, innerHTML }) { 
    
    main( _ => { 
        on('click', 'button', updateUI)
    })
    
    const updateUI = () => {
       fetch('my-service/ui/user-ui-updated')
           .then( response => response.text() )
           .then( html => innerHTML( html ) )
    }
}