Release v2.4.0 #40
digreatbrian
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.
Here is what changed?
[2.4.0] - October 27, 2026
Added
set_webmanifestto thePagecomponent.duck nativecommand for management of native apps.ensure_browser_state_syncedto Lively WebSocket to easily and securely sync cookies, etc with the browser.Button(exclude_extensions=[HighlightExtension])duck.html.components.extensions.clickable. Extensions includeRippleExtensionandHighlightExtension.LinkButtoncomponent toduck.html.components.link.IconButtoncomponent toduck.html.components.icon.register_default_extensiontoduck.html.components.extensionsmodule, you can now register an extension globally by component class.read_chunked(),write_chunked()and their async counterpartsasync_read_chunked(),async_write_chunked()helpers.Duck Native.duck.tomlnow supports packages with versions.failsafetoduck.utils.email.collection.collect_email. This logs the exception but doesn't really raise it.Spacemailprovider toduck.utils.emailmodule for easy sending of emails through spacemail.duck.html.html_minifymodule and enabled html minify by default for HTML components that accept inner HTML.textproperty support newline character\n, this will be rendered as<b>element as HTML.Selectcomponent'soptionsprop now accepts atuple/listof values (in addition to the existing mapping form), rendering each as an<option>with matchingvalue/label.FileIOStream.etagandFileIOStream.last_modified— derived fromst_size/st_mtime_nsvia a singleos.stat()call, letting HTTP responses expose stable cache validators without reading file content.If-None-Match,If-Modified-Since) with automatic304 Not Modifieddowngrading for cacheableGET/HEADresponses, using the newFileIOStreamvalidators.If-Rangesupport for byte-range (Range) requests — a range is only honored when it matches the resource's current strongETag(orLast-Modifiedas fallback); otherwise the full resource is served, preventing corrupted partial downloads against a changed file.Changed
Component JS, CSS, and HTML minification is now enabled by default only in production mode. Configure
COMPONENTS_MINIFY_JS,COMPONENTS_MINIFY_CSS, andCOMPONENTS_MINIFY_HTMLin your settings file to control minification. To force minification in debug mode, use theCOMPONENTS_FORCE_prefix, e.g.,COMPONENTS_FORCE_MINIFY_JS.HighlightExtension.Codecomponent toCodeBlockand added support forfilenameandcollapsiblearguments.add_to_registryto be not strict aboutrequestfor ownership assignment. If not provided, the error will lazily be flagged onLivelyevent dispatch.Footercomponent positioning for mobile responsiveness and improved the whole footer UI logic.FileIOStreamto useos.stat(...).mtime_nsinstead ofos.stat(...).mtimefor caching modification timestamp.Fixed
session expiredstates upon components/page auto recovery.FileIOStream.read()/AsyncFileIOStream.read()now honor the requestedsize. Reads larger thanchunk_sizeare collected chunk by chunk untilsizebytes or EOF. Previously they returned at most one chunk, and that short result was cached under the full-size key.FileIOStream.write()/AsyncFileIOStream.write()now write inchunk_sizepieces until all data is written. The cache is patched andon_writehooks fire with the bytes actually written, so a short write can no longer leave the cache holding data that never reached the file.OSError.sizevalues now read the whole file, matching Python's file API. Previously only-1did.run()bug.BasicExtensionlinebreak replace bug in propertyinner_htmlsetter.StreamingRangeHttpResponsenot correctly parsing range header - leading to slightly wrong data.This discussion was created from the release Release v2.4.0.
All reactions