Releases: zauberzeug/nicegui
v2.8.1
Build pipeline
- Fix missing Docker image for ARM64 (#4072 by @codingpaula)
As always: Kudos to DigiQuip AS, egs-hub, Davi Borges and many more for supporting this project ✨
v2.8.0
New features and enhancements
- Add support for JSONSchema validation in
ui.json_editor
(#4003, #4012 by @jm-amt, @falkoschindler) - Add
max_cache_age
parameter toadd_static_files
andadd_static_file
(#3998, #4032 by @bl0x) - Fix handling of invisible elements in
User
tests. (#4057 by @rlcmtzc, @rodja, @falkoschindler)
NOTE: existing tests may break if you relied on the bug that invisible elements being accessible by the user
Documentation
- Fix description for validation dictionaries (#4041 by @hephaisto)
- Add html module description to
ui.html
documentation (#4027 by @rodja)
Build pipeline
- Update Github Action to cache Docker to different locations for each platform (#4051 by @codingpaula)
Dependencies
- Update pre-commit and ruff dependencies (#4052 by @codingpaula)
- Remove upper bound of setuptools dependency (#2485, #4033 by @sohnemann, @rodja)
- Bump nanasess/setup-chromedriver from 2.2.2 to 2.3.0 (#4058 by @dependabot)
- Bump httpx from 0.27.2 to 0.28.0 (#4048 by @dependabot, @rodja)
- Bump ruff from 0.7.4 to 0.8.0 (#4026 by @dependabot)
Special thanks to our top sponsors DigiQuip AS, egs-hub, and Davi Borges ✨
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!
v2.7.0
Huh, where's 2.6.0? - Yeah, counting is hard... 🤦🏻♂️
New features and enhancements
- Allow creating
ui.table
andui.aggrid
from Polars dataframes (#3969 by @trivedihoney, @falkoschindler) - Add support for async validation functions (#4004, #4024 by @barrywhart, @falkoschindler)
- Allow toggling CSS classes (#4013, #4019 by @Mte90, @falkoschindler)
- Allow attaching and detaching 3D objects to and from groups (#4015, #4018 by @mauku, @falkoschindler)
- Add support for autocompletion to the
User
fixture (#3886, #4001 by @GrazingScientist, @rodja, @falkoschindler) - Enable SVG rendering for
ui.echart
(#3936 by @Piguite, @falkoschindler) - Add
tr
andheader
element to thehtml
module (#4005 by @kleynjan, @falkoschindler) - Allow getting all clients for a certain page path (#3828, #3968 by @aranvir, @falkoschindler)
- Show a warning when
ui.dark_mode
breaks Tailwind (#3753, #3994 by @petergaultney, @jdoiro3, @falkoschindler)
Documentation
- Add a demo about submenus (#3947 by @xaptronic, @falkoschindler)
- Add a missing space in storage documentation (#3963 by @NiklasNeugebauer)
Build pipeline
- Add precommit, mypy, and pylint to the test pipeline (#3996 by @codingpaula)
- Add Python 3.13 to test pipeline (#3993 by @falkoschindler)
Dependencies
- Bump aiohttp from 3.10.10 to 3.10.11 (#3989 by @dependabot)
- Bump selenium from 4.25.0 to 4.26.1 (#3938 by @dependabot)
Special thanks to our top sponsors DigiQuip AS, egs-hub, and Davi Borges ✨
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!
v2.5.0
New features and enhancements
- Introduce an
html
module with plain HTML elements (#572, #3900 by @ofenbach, @dridk, @rodja, @falkoschindler) - Set selection, expansion and tick props for
ui.tree
only when needed (#3840, #3902 by @inessilva4-lis, @python-and-fiction, @falkoschindler) - Show warning when
force_reload()
is used on images with data sources (#2566, #3895 by @scottrcarlson, @rp10007, @rodja)
Bugfixes
- Fix camera in
ui.scene
looking back to the origin after callingmove_camera()
(#3920 by @pascalzauberzeug, @falkoschindler) - Fix
app.storage.tab
not being unique for duplicated tabs (#3867, #3872, #3876 by @kfalcami, @python-and-fiction, @rodja, @falkoschindler)
Documentation
- Fix back button in the single page application example (#3910 by @Salex406, @falkoschindler)
- Improve documentation about the
User
pytest fixture (#3913 by @rodja) - Add sponsor section to website (#3906 by @rodja, @falkoschindler)
Build pipeline
- Pipeline improvements (#3893 by @codingpaula)
- Improve startup tests (#3896 by @falkoschindler)
- Fix Docker cache in GitHub Actions (#3918 by @codingpaula)
Dependencies
- Bump actions/cache from 3 to 4 (#3908 by @dependabot)
- Bump ruff from 0.6.9 to 0.7.0 (#3894 by @dependabot)
- Bump pywebview from 5.2 to 5.3 (#3888 by @dependabot)
Special thanks to our top sponsor Davi Borges ✨
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!
v2.4.0
New features and enhancements
- Allow customizing the crosshair in
ui.interactive_image
(#3848, #3870 by @parlance-zz, @falkoschindler) - Add support for dynamic argument conversion for
ui.aggrid
when usingrun_grid_method
andrun_row_method
(#3866 by @xaptronic) - Add
children
property to 3D objects inui.scene
(#3864 by @SeiteBroken, @falkoschindler) - Check value of choice elements against options (#3809, #3829 by @GMezWheel, @kevinraymond, @arshad-muhammad, @falkoschindler)
- Add Cache-Control header to static files (#3858, #3865 by @python-and-fiction, @daya0576)
- Expose additional PyInstaller arguments "icon" and "osx-bundle-identifier" (#3853 by @pikaro)
- Improve logging for On Air connections (#3839 by @rodja)
Bugfixes
- Fix inconsistency when replacing default classes, style and props (#3826, #3843 by @ghbm-itk, @python-and-fiction, @falkoschindler)
- Fix connection popup showing up behind
ui.footer
(#3835, #3836 by @kfalcami, @falkoschindler)
Documentation
- Add demo about LaTeX formulas in
ui.markdown
(#696, #3860 by @egormkn, @al-eax, @sonnygeorge, @retsyo, @frankvp11, @stepheweffie, @motorst1, @falkoschindler) - Mention duplicated tabs with respect to
app.storage.tab
(#3867, #3868 by @kfalcami, @python-and-fiction, @rodja) - Fix link to Quasar's QColorPicker (#3883 by @ghbm-itk, @falkoschindler)
Dependencies
- Bump uvicorn from 0.31.0 to 0.32.0 (#3879 by @dependabot)
- Bump aiohttp from 3.10.8 to 3.10.9 (#3832 by @dependabot)
- Bump ruff from 0.6.8 to 0.6.9 (#3831 by @dependabot)
v2.3.0
New features and enhancements
- Allow faster creation of monochrome point clouds in
ui.scene
(#3545 by @voigta, @falkoschindler) - Improve type annotation for event handlers (#3797, #3811 by @marcuslimdw, @falkoschindler)
- Make On Air reconnects more robust (#3798 by @rodja)
- Fix out-of-date citation file by uploading to Zenodo (#3825 by @falkoschindler, @rodja)
Bugfix
- Fix KeyError when
ui.carousel
has additional slots (#3812 by @ruiheng, @python-and-fiction, @falkoschindler)
Documentation
- Fix SASS demos missing a package (#3803, #3804 by @ghbm-itk, @rodja)
Dependencies
- Bump aiohttp from 3.10.6 to 3.10.8 (#3795, #3816 by @dependabot)
- Bump python-multipart from 0.0.10 to 0.0.12 (#3817 by @dependabot)
- Bump uvicorn from 0.30.6 to 0.31.0 (#3796 by @dependabot)
v2.2.0
New features and enhancements
- Significantly reduce payload of
ui.markdown
elements (#3745, #3792 by @pierrecdn, @falkoschindler) - Add support for custom colors in
ui.colors
(#3707, #3708 by @Kolterdyx, @falkoschindler) - Improve conversion of dynamic props (#3732, #3791 by @pier124, @rodja, @falkoschindler)
- Improve error message when passing wrong type to
ui.navigate.to
(#3699 by @marcuslimdw, @rodja, @falkoschindler) - Remove non-existent flag from
docker compose down
command in docker.sh (#3709 by @Kolterdyx)
Bugfixes
- Fix
ui.plotly
causingReferenceErrors
in rare situations (#3784 by @valankar, @python-and-fiction, @falkoschindler) - Fix wrong change event value of
ui.select
,ui.radio
andui.toggle
(#3733, #3736 by @sSasha-uwu, @rodja)
Testing
- Support
ui.radio
andui.toggle
inElementFilter
(#3789 by @marcuslimdw, @falkoschindler) - Allow testing for validation texts (#3759, #3765 by @GrazingScientist, @rodja)
- Simplify clearing of value elements with simulated user interaction (#3747, #3750 by @MasterSergius, @rodja, @falkoschindler)
- Improve error message when client is not yet initialized (#3698 by @marcuslimdw, @rodja, @falkoschindler)
Documentation
- Improve documentation of
app.storage
(#3731 by @python-and-fiction) - Fix tiny mistake in documentation of
ui.echart
(#3703 by @python-and-fiction)
Dependencies
- Bump aiohttp from 3.10.5 to 3.10.6 (#3778 by @dependabot)
- Bump debugpy from 1.8.5 to 1.8.6 (#3777 by @dependabot)
- Bump fastapi from 0.114.0 to 0.115.0 (#3714, #3727, #3743 by @dependabot)
- Bump plotly from 5.24.0 to 5.24.1 (#3717 by @dependabot)
- Bump pytest from 8.3.2 to 8.3.3 (#3712 by @dependabot)
- Bump python-multipart from 0.0.9 to 0.0.10 (#3772 by @dependabot)
- Bump ruff from 0.6.4 to 0.6.5 (#3728, #3764, #3771, #3788 by @dependabot)
- Bump selenium from 4.24.0 to 4.25.0 (#3763 by @dependabot)
- Bump urllib3 from 2.2.2 to 2.2.3 (#3718 by @dependabot)
v2.1.0
New features and enhancements
- Add
expand
parameter toui.page_sticky
(#3671 by @h0uter, @falkoschindler) - Introduce download simulation for the
User
fixture (#3686, #3689 by @marcuslimdw, @rodja) - Clear storage directory after test completion (#3649, #3663 by @nastasie-octavian, @rodja)
- Add debug logging for On Air reconnects (#3679 by @rodja, @falkoschindler)
Bugfixes
- Fix deleting
ui.timer
elements (#3681 by @JS-Aibel, @falkoschindler) - Raise a
NotImplemented
forset_visibility()
onui.timer
andui.notification
(#3670 by @canyone2015, @falkoschindler) - Fix
draggable()
for object groups inui.scene
(#3549 by @voigta, @falkoschindler)
Documentation
- Demonstrate click vs. change events on
ui.switch
andui.checkbox
(#3678 by @rodja)
Dependencies
- Bump ruff from 0.6.3 to 0.6.4 (#3685 by @dependabot)
- Bump fastapi from 0.112.2 to 0.113.0 (#3684 by @dependabot)
- Bump python-socketio from 5.11.3 to 5.11.4 (#3668 by @dependabot)
- Remove upper limit for the NumPy dev dependency (@falkoschindler)
v2.0.1
Fix: Resolve dependency mismatch with nicegui-highcharts
v2.0.0
New features and enhancements, breaking changes and migration guide
This major release introduces several new features and enhancements, as well as breaking changes. We always try to keep breaking changes to a minimum, guide you through the migration process using deprecation warnings, and provide migration instructions. Please read the following release notes carefully to understand the changes and adapt your code accordingly before upgrading.
-
Semantic versioning
NiceGUI 2.0 starts to implement semantic versioning, which means that we will follow the MAJOR.MINOR.PATCH versioning scheme. This release is a major version because it introduces breaking changes. We will increment the MAJOR version for breaking changes, the MINOR version for new features and enhancements, and the PATCH version for bug fixes.
-
Fix Quasar's layout rules for
ui.card
that remove children's borders and shadows (#726, #1295, #2265, #2301, #3444 by @miqsoft, @v479038280, @ghbm-itk, @falkoschindler)⚠️ BREAKING: Quasar's QCard, the foundation of NiceGUI'sui.card
, usually comes without any padding and requires nested card sections wrapping the actual content. NiceGUI simplified the use of cards by adding padding, flex layout and gaps automatically. But because a QCard also removes the outer-most borders and shadows of its children, this caused unexpected results in certain cases. NiceGUI 2.0 fixes the behavior ofui.card
by disabling Quasar's respective CSS rules. -
Improve the API of
ui.table
(#2633, #2731, #3263, #3264, #3525 by @bojh, @rohitsathish, @tmlmt, @falkoschindler)⚠️ BREAKING: The API for adding and removing rows in aui.table
has been improved. Passing rows as multiple arguments has been deprecated. Now these methods expect lists of rows.The
column
argument forui.table
is optional now. If not provided, the columns are infered from the first row.A new
update_from_pandas
method has been introduced to update rows and columns from a new dataframe.A new
column_defaults
parameter has been introduced to allow specifying some properties for all columns at once. -
Improve support for drawing items in
ui.leaflet
(#2422, #3586 by @joseph-fidelis, @falkoschindler)⚠️ BREAKING: Theui.leaflet
element used to remove drawn items and required the user code to add new layers to the map for visualization. Now such items remain visible by default. This new behavior can be disabled by passinghide_drawn_items=True
toui.leaflet
. -
Unify declaration of third-party dependencies (#2991 by @falkoschindler, @rodja)
⚠️ BREAKING: This release deprecates thelibraries
,extra_libraries
andexposed_libraries
parameters for subclassingui.element
. It introduces a newdependencies
parameter to be used instead. New examples "Custom Vue Component" and "Signature Pad" demonstrate how to use NPM and this parameter for integrating custom components based on third-party JavaScript libraries. -
Reserve bottom space in validation elements for error messages (#2484, #2492, #2738, #3013, #3446, #3660 by @akai-1024, @huche6, @atticus-lv, @rodja, @falkoschindler)
⚠️ BREAKING: UI elements with input validation likeui.input
used to omit the bottom space for a potential error message. This caused a layout jump when the first error occurred. This release fixes this issue be reserving the space by default whenever thevalidation
argument and property is notNone
. You can disable this behavior using the "hide-bottom-space" prop. -
Remove
ui.timer
objects from UI hierarchy after they are finished (#3626, #3647 by @fwerner, @rodja)Especially one-shot timers are now removed from the UI hierarchy after their callback has been executed. This avoids a potential memory leak.
-
Disable FastAPI docs by default (#3570, #3589 by @Yuerchu, @python-and-fiction, @rodja)
⚠️ BREAKING: NiceGUI apps used to automatically serve FastAPI docs at /docs, /redoc, and /openapi.json. This behavior has been disabled. You can enable it by passingfastapi_docs=True
toui.run
. Furthermore, you can specify the individual routes by settingcore.app.docs_url
,core.app.redoc_url
, andcore.app.openapi_url
. -
Make
client.ip
available before socket connection is established (#2399, #3287, #3445 by @rodja, @falkoschindler)⚠️ BREAKING: The client's IP is now already available before the page built and is returned to the client. On the auto-index page theclient.ip
property isNone
. If you need to check if the socket connection is established, useclient.has_socket_connection
instead. -
Remove and update deprecated APIs (#3648 by @falkoschindler)
⚠️ BREAKING: Several deprecated APIs have been removed. The remaining deprecations will show warnings including the version when they will be removed. Please update your code accordingly.ui.run_javascript()
and related methods:
Therespond
andcheck_interval
parameters are not needed anymore and got removed.context
:
Theget_slot_stack()
method has been replaced with theslot_stack
property.
Theget_slot()
method has been replaced with theslot
property.
Theget_client()
method has been replaced with theclient
property.- Layout elements
ui.header
,ui.footer
,ui.drawer
,ui.left_drawer
andui.right_drawer
:
Nesting top level layout elements now raises aRuntimeError
. - Storage:
NiceGUI no longer migrates files from the system's default encoding to UTF-8. This was only a temporary migration. All storage files should be encoded with UTF-8 by now. ui.aggrid
:
The methodcall_api_method
has been replaced withrun_grid_method
.
The methodcall_column_method
has been replaced withrun_column_method
.ui.chart
is nowui.highchart
.ui.open
has been replaced withui.navigate.to
.ui.add_style
has been removed. Useui.add_css
,ui.add_scss
, orui.add_sass
instead.
Documentation and examples
Python Dependencies
- Bump ruff from 0.6.2 to 0.6.3 (#3646 by @dependabot)
- Bump plotly from 5.23.0 to 5.24.0 (#3645 by @dependabot)
- Bump FastAPI from 0.109.2 to 0.112.2 and remove the upper bound (#3384, #3499, #3519, #3604, #3622, #3623 by @pierrecdn, @dependabot, @aersam)
JavaScript Dependencies
The following JavaScript dependencies have been updated to the latest versions (#3654 by @falkoschindler):
- Vue: 3.3.6 → 3.4.38
- Quasar: 2.13.0 → 2.16.9
- TailwindCSS: 3.2.0 → 3.4.10 (resolves #3169 and #3176)
- Socket.IO: 4.7.2 → 4.7.5
- ES Module Shims: 1.8.0 → 1.10.0
- AG Grid: 30.2.0 → 32.1.0 (resolves #3393 and #3538)
- CodeMirror: 6.0.1 (unchanged)
- ECharts: 5.4.3 → 5.5.1
- ECharts-GL: 2.0.9 (unchanged)
- Leaflet: 1.9.4 (unchanged)
- Leaflet-draw: 1.0.4 (unchanged)
- Mermaid: 10.5.1 → 11.0.2
- nippleJS: 0.10.1 → 0.10.2
- Plotly: 2.27.0 → 2.35.0 (resolves #3086)
- three.js: 0.157.0 → 0.168.0
- tween.js: 21.0.0 → 25.0.0
- vanilla-jsoneditor: 0.18.10 → 0.23.8
Many thanks to all contributors and users who reported issues and provided feedback. We hope you enjoy this new release!