Releases: zauberzeug/nicegui
v1.3.8
Enhancements
- Add method for calling the Column API of
ui.aggrid
(#1267, #1359 by @aersam) - Add
on_value_change
parameter toui.expansion
(#1354, #1356 by @aersam, @falkoschindler) - Add a
frameless
parameter to native mode (#1341 by @Smug246) - Support scroll padding for
ui.header
(#1329 by @miek770, @falkoschindler) - Implement
clear()
method forui.scene
(#1246, #1327 by @WolfgangFahl, @falkoschindler) - Allow passing local file path to
ui.download
(#1118 by @rodja, @falkoschindler)
Bugfixes
- Prevent errors if non-root user already exists for docker image (#1353 by @rodja)
- Fix pywebview detection (#1341 by @Smug246, @falkoschindler)
- Fix
ui.refreshable
with parameters (#1340 by @alex-bezverkhniy, @falkoschindler) - Improve On Air reconnect (#1337 by @rodja)
- Fix deprecation warning from vbuild (#1187 by @frankenstein91, @falkoschindler)
Documentation
- Fix and improve AG Grid demo with conditional cell formatting (#1342 by @williwehrlos, @falkoschindler)
- Use a machine-independent Python path for script executor example (#1240, #1331 by @v479038280, @falkoschindler)
- Add "disable" context manager demo (#1238 by @BrianLandry)
v1.3.7
New features and improvements
- Add
clear()
method forui.line_plot
(#1316, #1317 by @stur86, @falkoschindler) - Add
is_fullscreen
property as well astoogle_fullscreen
method forui.table
(#1315 by @miqsoft, @falkoschindler) - Warn if
ui.open
is used before client is connected (#1309 by @Anindya088, @rodja) - Move Quasar config to Python (#1287 by @rodja)
- Allow creating
ui.scene
objects without context (#1203, #1213 by @WolfgangFahl, @falkoschindler)
Bugfixes
- Fix
ui.refreshable
updating wrong elements (#1283, #1313 by @falkoschindler) - Pick the right "On Air" instance (#1279, #1300, #1301 by @jdess, @rodja)
- Fix CSS variables used in
style()
method ofui.query
(#1293 by @CrystalWindSnake, @falkoschindler) - HTML-encode element text to prevent XSS (#1067, #1276 by @kepler, @falkoschindler)
Documentation
- Add example "download text as file" (#1273 by @rodja)
- Add demos to use image links (#1272 by @rodja)
- Add demo for rendering point clouds in a
ui.scene
(#1269 by @chengguizi, @falkoschindler)
Development
- Clean up committed project settings (#1290 by @DaelonSuzuka)
- Additional Docker features including detailed example (#1255 by @natankeddem, @rodja)
- Hide endpoints from OpenAPI schema by default (#1196 by @DaelonSuzuka, @falkoschindler)
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)