Releases: zauberzeug/nicegui
v1.4.7
New features and enhancements
- Introduce
ui.space
to fill all available space inside of a flexbox (#2225 by @falkoschindler) - Introduce
run_chart_method
forui.echart
(#1900, #2232 by @mq-evan, @natankeddem, @falkoschindler) - Introduce
run_editor_method
forui.json_editor
(#2162 by @natankeddem, @rodja, @falkoschindler) - Add support for Plotly events (#748, #1598, #1818, #2231 by @YH20220622, @cramatt, @kripnerl, @natankeddem, @aljosahafner, @falkoschindler)
- Make text of
ui.expansion
bindable (#2199, #2211 by @frankhuurman, @falkoschindler) - Allow using
ui.interactive_image
without an image (#1712, #2218 by @falkoschindler) - Simplify emitting and receiving global events with
ui.on
(#2203 by @falkoschindler) ValdationElement.validate
now returns abool
(#2220, #2227 by @ghbm-itk)- Improve warning message for nesting of top level layout elements (#1970, #2212 by @iron3oxide, @falkoschindler)
- Migrate storage from system's default encoding to UTF-8 (#2163, #2233 by @SHDocter, @falkoschindler)
- Replace
ui.query
's inheritance fromui.element
with aggregation (#2217 by @falkoschindler) - Improve initialization order of
ValueElement
s (#2222 by @steweg)
Bugfixes
- Fix problem with loading video from URL in Windows (#2159 by @the-code-rider, @falkoschindler)
- Fix import error for optional dependency "pandas" (#2226 by @rodja, @falkoschindler)
- Fix initialization problem with an emtpy
ui.scene
(#1285 by @falkoschindler) - Fix shared
validation
dictionary ofValidationElement
s (#2235 by @ghbm-itk, @falkoschindler)
Documentation
- Add class methods to documentation (#2204 by @falkoschindler)
- Add a demo for vertical tabs (#2219 by @youyou015, @falkoschindler)
- Extend the docstring for
ui.notification
(#2224 by @thetableman)
v1.4.6
New features and enhancements
- Introduce
ui.leaflet
element for interactive maps (#1217 by @falkoschindler, @rodja) - Introduce
ui.notification
element (#515, #1994, #2031 by @pythonormen, @abel1502, @thaije, @falkoschindler) - Introduce
ui.page_title
(#1436, #2182 by @liang-jacky, @iron3oxide, @ed2050, @falkoschindler) - Reduce the CSS specificity for ui.link to simplify overriding its style (#2134, #2198 by @frankhuurman, @falkoschindler)
- Improve tooltip documentation; make text optional (#1596, #2184 by @thetableman, @falkoschindler)
- Introduce CSS variables for default padding and gap (#2171, #2183 by @petergaultney, @falkoschindler)
- Improve reconnect when accessing via On Air (#2147 by @rodja)
- Handle broken JSON data in persistent storage (#2145 by @rodja)
- Add py.typed file so that mypy will check types against imports from NiceGUI (#2128, #2142 by @petergaultney)
- Add
update_rows()
method forui.table
(#2132 by @steweg, @falkoschindler) - Allow setting head and body HTML for all pages (#2126, #2127 by @DaelonSuzuka, @falkoschindler)
- Provide minimal Highcharts docs and warning (#2122 by @rodja)
- Improve access to pagination updates for
ui.table
(#2081, #2192 by @ghbm-itk, @falkoschindler, @rodja)
Bugfixes
- Allow setting
ui.input
's "autocomplete" prop (#2181 by @rjzhou, @falkoschindler) - Reset filter when opening
ui.select
withmultiple=False
(#2076, #2131, #2175 by @thetableman, @snowbollaanm, @steweg, @falkoschindler) - Update markdown2 dependency to avoid bug in version 2.4.11 (#2153, #2154 by @thetableman, @falkoschindler)
- Fix CSS for HTML content in
ui.editor
andui.markdown
(#2029, #2045 by @thetableman, @ljcleo, @falkoschindler)
v1.4.5
Bugfixes
- avoid implicit dependency to pillow
v1.4.4
New features and enhancements
- Allow specifying the port-,port,-%3A) in native mode (#1457, #2110 by @retsyo, @rodja, @falkoschindler)
- Let
ui.open
accept a NiceGUI element as link target (#2105, #2108 by @retsyo) - Warn about late returns in
@ui.page
builder, which were silently dropped before (#2088 by @rodja) - Support PIL images as image source in
ui.image
andui.interactive_image
(#2067, #2069 by @nghia-vo, @falkoschindler) - Allow muting the default welcome message (#2062 by @nghia-vo, @falkoschindler)
- Show an error when trying to run with multiple workers (#2055 by @ruiheng, @falkoschindler)
- Add support for in-memory data to
ui.download
(#2050 by @Skilles, @falkoschindler)
Bugfixes
- Fix transmission of dollar sign (#2079 by @retsyo, @falkoschindler)
- Fix update of
ui.echart
options when number of series changes (#1900, #2068 by @mq-evan, @natankeddem, @falkoschindler)
Documentation
- Refactor documentation, improve search index (#2039, #2084 by @falkoschindler)
- Improve style of emphasized phrases (#2112 by @rodja, @falkoschindler)
- Improve layout of main overview page (#2111 by @rodja, @falkoschindler)
- Fix broken links in search results (#2019, #2103 by @phoskee, @retsyo, @falkoschindler)
- Add section about common pitfalls with packaging on Mac OS (#1495, #2109 by @yxlwfds, @youyou015, @sakelariev, @meslahik, @falkoschindler)
v1.4.3
New features and enhancements
- Add official support for Python 3.12 (#1798 by @falkoschindler)
- Introduce
from_pandas
method forui.table
(#1972, #1983 by @zilch42) - Add
force_reload
method forui.image
andui.interactive_image
(#1922, #1977 by @groucho86, @falkoschindler) - Show warning if a page layout element is nested (#1953, #1970 by @knowsuchagency, @falkoschindler)
- Improve type hints for
ui.refreshable
(#1951, #1969 by @CrystalWindSnake, @falkoschindler) - Add
precision
parameter toui.number
(#1921, #1952 by @groucho86, @falkoschindler) - Add
timeout
parameter to severalui.aggrid
methods (#1794 by @bnxvs, @falkoschindler) - Add support for slots in
ui.chat_message
(#1772, #1774 by @jzluo, @falkoschindler)
Bugfixes
- Fix required version of the typing_extensions module (#1973 by @CrystalWindSnake, @falkoschindler)
- Fix behavior of
ui.select
with input field and multi-select (#2015 by @netnem, @falkoschindler) - Fix broken state after replacing draggable objects (#1505, #2006 by @kalle264, @falkoschindler)
- Fix destruction of
ui.json_editor
on the client (#1982 by @natankeddem) - Prevent value of cleared
ui.number
jumping back to 0 when loosing focus (#300, #1765 by @groucho86, @falkoschindler)
Documentation
- Fix import statement in "Package for Installation" documentation (#2059 by @cjschmidt1494, @falkoschindler)
- Restructure documentation (#1807, #2039 by @ed2050, @falkoschindler)
- Add some intro text for the new documentation start page (#1807, #2057 by @ed2050, @rodja)
- Add note about
new_value_mode
when setting value ofui.select
programmatically (#2033 by @natankeddem, @falkoschindler) - Add new "Editable AG Grid" example (#1997 by @Dronakurl, @falkoschindler)
- Fix "ROS 2" example (#1839 by @vanem, @falkoschindler)
v1.4.2
New features and enhancements
- Introduce
ui.pagination
(#1890, #1899 by @BertrandBorel, @falkoschindler, @adarshpunj) - Introduce
new_value_mode
forui.select
(#1045, #1819 by @groucho86, @artreven, @falkoschindler) - Support
ui.tab_panels
withoutui.tabs
(#1894, #1897 by @CrystalWindSnake) - Support binding source with local file paths (#1282, #1853, #1854 by @DaedlyKitten, @rodja, @falkoschindler)
- Support return values of refreshable function (#1845, #1914 by @gavinpotter, @falkoschindler)
- Avoid blank page when passing an invalid dynamic property (#1950 by @v479038280, @falkoschindler)
- Raise exception if
ui.element
is called with an invalid HTML tag (#1908, #1915 by @ed2050, @ProbablyBrian, @falkoschindler)
Bugfix
- Fix
ui.upload
for files with whitespace in native mode (#1576 by @birchtree02, @falkoschindler)
Documentation
- Add inheritance to the "Modularization" example (#1929 by @rodja)
- Add page function to the "Chat with AI" example (#1919 by @Dronakurl)
- Add an "Editable Table" example (#1833, #1905 by @Dronakurl, @falkoschindler)
- Fix "SQLite Database" example to avoid bug in tortoise-orm and aiosqlite (#1901 by @hu76589, @falkoschindler)
- Add note about conflicts between Quasar and TailwindCSS (#1821 by @Rinzlov, @natankeddem, @falkoschindler)
v1.4.1
Bugfixes
- Fix startup and shutdown handlers with existing FastAPI app (#1870, #1874, #1877 by @ProbablyBrian, @zilch42, @falkoschindler)
- Fix component name clashes (#1887 by @valgarf, @falkoschindler)
Documentation
- Add missing
label
documentation forui.select
(#1851 by @gavinpotter, @falkoschindler) - Improve robustness and documentation for
AwaitableResponse
(#1880 by @falkoschindler) - Add hint about styling
ui.input
(#1884 by @adarshpunj, @falkoschindler)
v1.4.0
New features and enhancements
- Make JavaScript calls optionally awaitable (#1471, #1709, #1797 by @falkoschindler)
- Introduce react-like
ui.state
to be used withui.refreshable
(#1410, #1438, #1447, #1489 by @qingant, @falkoschindler) - Move Highcharts dependency into a separate nicegui-highcharts package to avoid the need for a license for commercial projects (#1850, #1863 by @rodja, @falkoschindler)
- Refactor
globals
module (#1708, #1847 by @falkoschindler) - Use FastAPI's new
lifespan
API (#1849 by @rj-vera, @rodja, @falkoschindler) - Use flex layout per default for layout elements (#1614, #1796 by @youyou015, @natankeddem, @falkoschindler)
- Replace netifaces with much simpler (and better) ifaddr (#1856 by @retsyo, @rodja)
- Convert
ui.timer
into an element (#1710, #1829 by @falkoschindler) - Update httpx dependency (#1820 by @tscheburaschka, @falkoschindler)
- Consistently mark methods private if not part of the public API (#1326 by @falkoschindler)
- Remove deprecated APIs (#1711 by @falkoschindler)
Bugfixes
- Fix AG Grid bug with hidden cells by upgrading to new version (#1860 by @rhkarls, @natankeddem, @falkoschindler)
Documentation
- Add LangChain handler to the "Chat with AI" example (#1832 by @cam-barts)
Breaking changes and migration guide
No need to await JavaScript calls
When using run_javascript
, run_method
, call_api_method
and call_column_api_method
,
you can decide whether the client should respond with a return value or not by awaiting the method call or not.
The method will automatically inform the client.
The respond
parameter of run_javascript
is not used anymore. See https://nicegui.io/documentation/run_javascript
ui.chart
is now ui.highchart
and requires the package "nicegui-highchart"
Highcharts requires you to buy a license for commercial products if the code is installed on your machine.
That's why we made it an optional package.
Install with pip install nicegui[highcharts]
.
The globals
module is gone
We removed the ugly globals
module, which was never intended to be public API,
but might have been used nonetheless.
- If you need the app configuration, use
app.config
instead (usingfrom nicegui import app
to get the app object). - If you need the current client or slot, use the
context
module instead. - If you need the client dictionary, use
Client.instances
instead.
FastAPI's new lifespan API
Since FastAPI's @on_event("startup")
and @on_event("shutdown")
are deprecated,
NiceGUI switched to the new lifespan API.
You can still use app.on_startup()
and app.on_shutdown()
.
Layout elements use flex layout by default
Before you needed to use ui.column
inside, e.g., ui.tab_panel
and other elements to get proper alignment, padding and spacing.
Now most UI elements provide reasonable default so that the content looks like in a ui.row
or ui.column
.
Upgraded third-party dependencies
- vue: 3.3.4 → 3.3.6
- quasar: 2.12.2 → 2.13.0
- tailwindcss: 3.3.2 (unchanged)
- socket.io: 4.7.1 → 4.7.2
- es-module-shims: 1.7.3 → 1.8.0
- aggrid: 30.0.3 → 30.2.0
- echarts: 5.4.3 (unchanged)
- mermaid: 10.2.4 → 10.5.1
- nipplejs: 0.10.1 (unchanged)
- plotly: 2.24.3 → 2.27.0
- three: 0.154.0 → 0.157.0
- tween: 21.0.0 (unchanged)
- vanilla-jsoneditor: 0.18.0 → 0.18.10
v1.3.18
New features and enhancements
- Support single and double quotes in element props (#1800 by @Dronakurl)
- Improve client and slot pruning (#1826, #1838 by @rodja, @falkoschindler)
Bugfixes
- Fix incorrect python-socketio requirement (#1842, #1843 by @zilch42, @falkoschindler)
- Fix click handler of
ui.menu_item
inui.context_menu
(#1827 by @rodja, @falkoschindler)
Documentation
Development
v1.3.17
New features and enhancements
- Introduce
ui.context_menu
(#1738, #1801 by @gavinpotter, @natankeddem, @falkoschindler) - Introduce
validate()
method for validation elements (#1781 by @falkoschindler) - Improve recovery after reconnecting (#1761, #1762, #1763 by @s2terminal, @rodja)
- Adapt socket.io heartbeat depending on the provided reconnect_timeout (#1812 by @rodja)
Bugfixes
- Fix "coroutine 'AsyncServer.enter_room' was never awaited" (#1809 by @FlynV, @Barriradio, @nghia-vo, @falkoschindler)
- Refresh binding before page delivery (#1561, #1775 by @laserir, @falkoschindler)
Documentation
- Improve Fly replay middleware to only replay if the target instance is still available (#1814 by @rodja)
- Fix typo: change "styles" to "style" (#1799 by @frankhuurman)
- Fix script "Script Executor" example on Windows (#1767 by @dotnfc, @rodja)
- Clarify usage of
ui.open
on auto-index pages (#1760 by @rodja) - Simplify tree example and showing disable feature (#1759 by @rodja)