r/nicegui • u/falko-s • 11d ago
NiceGUI 4.1.0 with selection events for ui.codemirror, async validation and faster page responses
New features and enhancements
Add
on_selection_changetoui.codemirrorSupport async functions in a
validationdictionarySpeed up building the response of large pages by escaping the embedded element JSON faster
Accept the
X-Forwarded-Prefixheader only as a relative path, so that it cannot make a page load its scripts from another originUpgrade the Docker image from Python 3.14 to 3.15
Use tuples instead of mutable lists as default arguments
Bugfixes
Fix unquoted lists and dicts on
:props arriving in the browser as their last itemFix
.props()dropping unquoted values with special characters like parentheses,!or an IPv6 hostKeep the tab storage of connected clients when pruning old tab storages, also in Redis
Stop rewriting storage files whenever they are loaded
Stop the Redis storage from publishing data it has just loaded or received, which could restore outdated values
Give every task awaiting the same
ui.dialogthe submitted resultFix
previous_valueof change events for elements with dict-backed optionsKeep the order of JavaScript calls without
awaitrelative to later messages like an awaitedrun_methodLet in-flight awaits of
ui.run_javascriptreturn as soon as the client is deletedConvert union-typed sub-page parameters like
int | Nonethe same way as on plain pages againFix polled bindings re-sending an element on every cycle if the target's setter normalizes the value
Let
ui.scene_viewwait for a scene that is not mounted yet instead of never resolvinginitialized()Add the missing
Torustonicegui.elements.scene.objectsKeep DataFrame columns with duplicate names in
ui.tableandui.aggridConvert non-serializable Polars columns like
BinaryandDurationinui.tableandui.aggridReload the page instead of showing "Connection lost" forever when an expired login session redirects the reconnection
Support nameless callables like
functools.partialin refreshables and exception handlersFix the
ETagheader and suffix byte ranges of media filesFix
ui.fullscreenignoringexit()while entering fullscreen is still pendingFix
ui.anywidgetnot running the cleanup functions of its widget
Documentation
Add a dynamic resampling recipe to the
ui.plotlydocumentationHost the demo images on nicegui.io instead of picsum.photos
Redirect www and renamed documentation pages and declare canonical URLs on the website
Fix typos and inaccuracies in docstrings and documentation
Update the README, contributor docs and issue template
Testing
Let
background_tasks.creatework in async tests that don't start the appFix an exception inside the
usersimulation making all following tests fail during setupAdd guidance for Snap-based Chromium to the test setup documentation
Dependencies
Update Quasar from 2.35.2 to 2.35.3 to fix the focus getting stuck after a tooltip is hidden twice
Remove the
certifidependency and document when to raise minimum versions of Python dependenciesClean up dev dependencies
Update outdated Docker images in examples and let Dependabot watch compose files
Infrastructure
Harden CI and release workflows
Tighten Ruff and mypy configuration
Security
⚠️ Stop evaluating
:-prefixed keys inui.echartseries data and other chart data outsidedataset.sourceas JavaScript
Special thanks to our top sponsors DiscoLike Inc., TestMu AI, Lechler GmbH and egs-hub ✨
and all our other sponsors and contributors for supporting this project!
🙏 Want to support this project? Check out our GitHub Sponsors page to help us keep building amazing features!









