Releases: zauberzeug/nicegui
v1.3.6
New features and improvements
- Allow configuration of socket.io transport options (#1262 by @rodja)
- Support
ui.open
with new tab (#1243 by @falkoschindler)
Bugfixes
- Fix support for languages with region codes (#1215 by @CrystalWindSnake and @falkoschindler)
Documentation
- Add demo for tree expansion/collapse (#1239 by @rodja)
- Remove unused parameter in docstring of
ui.open
(#1237 by @BrianLandry) - Change link to material icons (#1236 by @BrianLandry)
- Add demo for listening to an AG Grid event (#1235 by @BrianLandry)
- Fix automatic refresh of https://nicegui.io without reason (#1211 by @txhy2018 and @rodja)
Development
- Refactor optional feature handling to preserve signature of
ui.plotly
etc. (#1266 by @falkoschindler)
v1.3.5
New features and improvements
- Allow awaiting client disconnect if it hasn't connected yet (#1195 by @rodja)
- Resize scene canvas and text renderers with container div (#1163, #1190 by @AndrewMHenry, @falkoschindler)
Bugfixes
- Fix issue when subclassing NiceGUI elements with dependencies (@falkoschindler)
- Fix lazy loading of
ui.interactive_image
(@falkoschindler) - Fix connect handler for NiceGUI On Air (@falkoschindler, @rodja)
v1.3.4
New features and improvements
- Introduce
ui.carousel
element (#1087, #1091, #1176 by @michangelis, @falkoschindler) - Added functions to get data from editable
ui.aggrid
cells (#1079 by @BrianLandry) - Improve NiceGUI On Air's connection error handling (#1184 by @rodja)
Bugfixes
- Fix repeating lines in
ui.log
(#1173 by @BrianLandry, @falkoschindler) - Fix value of
ui.select
,ui.radio
andui.toggle
after changing their options (#1073 by @CrystalWindSnake, @falkoschindler)
Documentation
- Support dark mode on nicegui.io (#771, #1164 by @Slanderkin, @suspiciousRaccoon, @falkoschindler)
- Add a demo for a
ui.card
without shadow (#1172 by @Smug246, @falkoschindler) - Add a demo for
ui.chart
with extra dependencies (by @falkoschindler)
v1.3.3
Improvements
- cleanups and refactorings made possible by having Python 3.8 as minimum version (by @falkoschindler)
Bugfixes
- fixed on-air URL (by @rodja)
v1.3.2
Bugfixes
- Remove NumPy dependency (#1167 by @dyipon, @falkoschindler)
- Fix deletion of dynamically created elements (by @falkoschindler)
v1.3.1
Bugfixes
netifaces
package is now an optional dependency (#1166 by @falkoschindler and @rodja)- fixed unexpected clearing of content (by @falkoschindler)
- added missing
httpx
dependency (by @rodja)
v1.3.0
New features and improvements
- New dependency management to reduce payload, improve load times and support ESM (#658 by @dclause, @falkoschindler)
- Simplify API for registering custom Vue components and JavaScript dependencies (#1134 by @rodja, @falkoschindler)
- Improve generic event registration to provide access to sender and additional event arguments (#583, #664, #672, #1095 by @michelemoretti, @bobanovo, @falkoschindler)
- Provide source maps for minified dependencies (#753 by @aaad, @falkoschindler)
- Tech-preview for NiceGUI On Air: use
ui.run(on_air=True)
to get a temporary public URL through which your local app is accessible via the internet (@falkoschindler, @rodja) - Reduce size of PyPI package by making pywebview, plotly and matplotlib optional (#1010, #1143 by @firai, @rodja)
- Use snake_case style arguments for
ui.notify()
(#930 by @CatamountJack) - Allow using
ui.menu
for custom context menus (#747 by @falkoschindler) - Remove
no-parent-event
prop forui.menu
(#713 by @falkoschindler) - Add
on_change
parameter forui.knob
(#1119 by @rodja) - Add
ui.scroll_area
element (#1072 by @eli-kha, @falkoschindler)
Bugfixes
- Fix memory leak on client when removing elements (#1089 by @Kamil-Och, @CrystalWindSnake, @falkoschindler)
- Fix
on_shutdown
callback not being called on Windows 10 (#1050 by @chhinze, @firai) - Fix
ui.footer(fixed=False)
(#1136 by @falkoschindler) - Find IP addresses more robustly using netifaces (#1137 by @falkoschindler)
- Fix two favicon issues (#1139 by @falkoschindler)
- Fix table selection not going away after removing selection (#1115, #1122 by @struffel, @Trickshotblaster, @falkoschindler)
Documentation
Breaking changes and migration guide
Generic event registration with .on()
The argument passed to the event handler is now of type GenericEventArguments
. So instead of
grid.on('cellClicked', lambda msg: ui.label(f'{msg["args"]["data"]["name"]} has been clicked!'))
we access the event arguments like this:
grid.on('cellClicked', lambda e: ui.label(f'{e.args["data"]["name"]} has been clicked!'))
See https://nicegui.io/documentation/generic_events for more information.
Custom Vue components and JavaScript libraries
We radically simplified the API to register custom components and external libraries.
Now you can pass the location of the component and additional libraries as parameter to the derived class:
class CustomElement(ui.element, component='custom_element.js', libraries=['lib/some-library.min.js']):
super().__init__()
...
Note that you don't have to pass a tag
to the base initializer. It will be set automatically.
Besides libraries
you can specify exposed_libraries
(will be added to importmaps
) and extra_libraries
(will be registered but not automatically requested by that element).
All library parameters support absolute and relative paths (relative to the Python file), either as str
or as Path
, and support globbing.
Exclude parameter
The exclude
parameter of ui.run
is gone.
Due to NiceGUI's new dynamic dependency management there is no need to explicitly exclude individual elements.
Python 3.7
With NiceGUI 1.3 we drop support for Python 3.7, which had its end of life on June 27, 2023.
v1.2.24
New features and improvements
- Allow passing arguments to
refreshable.refresh()
(#1096 by @CrystalWindSnake, @falkoschindler) - Allow passing an awaitable to
ui.timer
(#1098 by @rodja) - Improved DOM placement of page layout elements for better accessibility (#1097 by @ProbablyBrian, @falkoschindler)
Bugfixes
- Fix
run_method()
for Quasar component wrappers likeui.input
andui.select
(#1092, #1093 by @CatamountJack, @cj, @rodja, @falkoschindler) - Fix warning about background tasks not being awaited as it happened sometimes with
app.storage
(#1099, #1104 by @rodja, @falkoschindler)
Documentation
- Fix URL to Google Icons (#1106 by @frankhuurman, @rodja)
- Use Tortoise ORM in the database example (#1114 by @rodja)
Development
- Fix Slack notification GitHub Action for missing webhook URL (#1068, #1084, #1105 by @michangelis)
- Update pytests to avoid deprecation warnings (#1110 by @falkoschindler)
v1.2.23
New features and improvements
- Support the
clearable
prop withui.select
(#1069 by @CrystalWindSnake, @falkoschindler) - Only create storage directory if needed (#1080, #1085 by @rodja, @falkoschindler)
- Add
toggle()
method toui.menu
(#860 by @patrickwasp, @falkoschindler)
Bugfixes
- Always update
ui.input
after server-side value change (#1071, #1088 by @pythonormen, @eshyun, @falkoschindler) - Avoid
ui.input
to repeat change events in a loop (#1086 by @CrystalWindSnake, @falkoschindler) - Fix update of
ui.plotly
(#1037, #1070 by @duane-impulse, @falkoschindler) - Fix serving media files from subdirectories (#1076 by @falkoschindler)
- Ensure move events from joystick are only sent between start/end (#1082 by @rodja)
Documentation
- Fix typo in bindings docs (#1075 by @suspiciousRaccoon)
- Add example for NiceGUI with ROS2 (#1059, #1083 by @JensOgorek, @rodja)
- Add documentation for
ui.separator
(#1081 by @rodja) - Add log handler demo (#1078 by @BrianLandry)
v1.2.22
New features and improvements
- Support autocomplete
ui.input
on mobile devices (#852, #1063 by @rodja, @phoskee, @falkoschindler) - Add
error
property for input elements with validation (#894 by @itay-raveh, @falkoschindler) - Introduce
min
,max
andout_of_limits
forui.number
(#924, #1049 by @ukoehler, @falkoschindler) - Support dynamic column attributes like sort and format functions for
ui.table
(#1058, #1061 by @juledwar, @falkoschindler)
Bugfixes
- Fix
ui.select
when usingwith_input
andmultiple
(#1044 by @groucho86, @falkoschindler) - Fix image and media sources for reverse proxies with subpath (#934, #1038 by @rodja, @falkoschindler)
Development
- Condense mypy and pytest config files to pyproject.toml (#1053 by @xec-abailey)