Repository navigation
Datastar Components v1.0.0-alpha #5
youngvernon
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Stability, Consistency, and Enhanced Developer Experience
We're excited to announce the v1.0.0-alpha release of the Datastar Components plugin! This major release solidifies the plugin's foundation, bringing greater consistency, enhanced lifecycle management, and improved debugging capabilities, all while maintaining its core philosophy of HTML-first Web Component development with seamless DatastarJS reactivity.
Building upon the strong foundation of the initial pre-release (v0.1.0-alpha), v1.0.0-alpha introduces key refinements and new features that make building reusable and reactive components even more intuitive and robust.
What's New and Changed in v1.0.0-alpha:
Refined Attribute Naming for Consistency
v0.1.0-alphaattributes such asdata-prop-*for reactive properties,data-load-iffor conditional loading, anddata-component-error-srcfor fallback UI have been standardized.data-prop-*is nowdata-component-prop-*: This change ensures that all component-related attributes are consistently prefixed withdata-component-, making them easier to identify and manage within your HTML.data-load-ifis nowdata-component-load-if: The attribute for conditionally loading components has also adopted thedata-component-prefix for better organization.data-component-error-srcis nowdata-component-fallback: This attribute, used to specify a URL for fallback content when a component fails to load or script errors occur, has been renamed for clearer intent.Enhanced Lifecycle Management with Declarative Control
contentReadyCallbackandregisterCleanupfordisconnectedCallback, v1.0.0-alpha introduces declarative attributes for more explicit lifecycle event handling:data-on:component-connected: Allows you to define Datastar actions or expressions to be executed when the component is connected to the DOM.data-on:component-disconnected: Enables actions or expressions to run when the component is removed from the DOM, ideal for cleanup or logging.registerCleanupmethod for imperative cleanup ondisconnectedCallbackis still fully supported and encouraged for preventing memory leaks.adoptedCallbackintegration has been solidified, ensuring Datastar reactivity is re-initialized when a custom element is adopted into a new document.Comprehensive Error Reporting and Debugging
component-load-error: Fired when a component's source HTML fails to load.component-script-error: Fired if an error occurs during the execution of JavaScript within the component.component-fallback-rendered: Indicates when a fallback UI has been successfully rendered due to a component failure.detailobjects, including the component's tag name, source URL, and the original error, facilitating easier debugging and custom error displays.Improved JavaScript Execution Model
<script>tags (module, classic, external, inline) sequentially and reliably within your component's scope.Streamlined Documentation and Storybook Integration
README.v1.0.0.md(now reflectingv1.0.0-alphafeatures) provides more comprehensive and detailed documentation, including clearer examples and explanations for all features.datastar-components-storyboard-wrapper.v1.0.0.js) is provided to simplify creating Storybook stories for your Datastar Components. This wrapper dynamically generatesdata-component-src,data-component-prop-*, anddata-signalsattributes based on LitElement properties, streamlining your component documentation workflow. It also includesdata-on:connectedanddata-on:disconnectedevent handlers for mirroring lifecycle events in Storybook.Internal Stability and Performance Enhancements
Why Upgrade to v1.0.0-alpha?
This release focuses on hardening the plugin's API, enhancing developer ergonomics, and providing more robust tools for debugging and error handling. The consistent attribute naming makes the API more predictable, while the extended lifecycle and error reporting give you greater control and visibility into your components' behavior. If you're building complex, production-ready Web Components with Datastar, v1.0.0-alpha is the stable and powerful foundation you need.
Get Started with v1.0.0-alpha!
Explore the updated documentation for detailed usage instructions and examples.
We're excited to announce the v1.0.0-alpha release of the Datastar Components plugin! This major release solidifies the plugin's foundation, bringing greater consistency, enhanced lifecycle management, and improved debugging capabilities, all while maintaining its core philosophy of HTML-first Web Component development with seamless DatastarJS reactivity.
Building upon the strong foundation of the initial pre-release (v0.1.0-alpha), v1.0.0-alpha introduces key refinements and new features that make building reusable and reactive components even more intuitive and robust.
What's New and Changed in v1.0.0-alpha:
Refined Attribute Naming for Consistency
v0.1.0-alphaattributes such asdata-prop-*for reactive properties,data-load-iffor conditional loading, anddata-component-error-srcfor fallback UI have been standardized.data-prop-*is nowdata-component-prop-*: This change ensures that all component-related attributes are consistently prefixed withdata-component-, making them easier to identify and manage within your HTML.data-load-ifis nowdata-component-load-if: The attribute for conditionally loading components has also adopted thedata-component-prefix for better organization.data-component-error-srcis nowdata-component-fallback: This attribute, used to specify a URL for fallback content when a component fails to load or script errors occur, has been renamed for clearer intent.Enhanced Lifecycle Management with Declarative Control
contentReadyCallbackandregisterCleanupfordisconnectedCallback, v1.0.0-alpha introduces declarative attributes for more explicit lifecycle event handling:data-on:component-connected: Allows you to define Datastar actions or expressions to be executed when the component is connected to the DOM.data-on:component-disconnected: Enables actions or expressions to run when the component is removed from the DOM, ideal for cleanup or logging.registerCleanupmethod for imperative cleanup ondisconnectedCallbackis still fully supported and encouraged for preventing memory leaks.adoptedCallbackintegration has been solidified, ensuring Datastar reactivity is re-initialized when a custom element is adopted into a new document.Comprehensive Error Reporting and Debugging
component-load-error: Fired when a component's source HTML fails to load.component-script-error: Fired if an error occurs during the execution of JavaScript within the component.component-fallback-rendered: Indicates when a fallback UI has been successfully rendered due to a component failure.detailobjects, including the component's tag name, source URL, and the original error, facilitating easier debugging and custom error displays.Improved JavaScript Execution Model
<script>tags (module, classic, external, inline) sequentially and reliably within your component's scope.Streamlined Documentation and Storybook Integration
README.v1.0.0.md(now reflectingv1.0.0-alphafeatures) provides more comprehensive and detailed documentation, including clearer examples and explanations for all features.datastar-components-storyboard-wrapper.v1.0.0.js) is provided to simplify creating Storybook stories for your Datastar Components. This wrapper dynamically generatesdata-component-src,data-component-prop-*, anddata-signalsattributes based on LitElement properties, streamlining your component documentation workflow. It also includesdata-on:connectedanddata-on:disconnectedevent handlers for mirroring lifecycle events in Storybook.Internal Stability and Performance Enhancements
Why Upgrade to v1.0.0-alpha?
This release focuses on hardening the plugin's API, enhancing developer ergonomics, and providing more robust tools for debugging and error handling. The consistent attribute naming makes the API more predictable, while the extended lifecycle and error reporting give you greater control and visibility into your components' behavior. If you're building complex, production-ready Web Components with Datastar, v1.0.0-alpha is the stable and powerful foundation you need.
Get Started with v1.0.0-alpha!
Explore the updated documentation for detailed usage instructions and examples.
This discussion was created from the release Datastar Components v1.0.0-alpha.
All reactions