Quantum 0.16.0
Added
quantum desktop(UI-4): the application in a desktop window. It starts the application's server on a free local port and opens a native window (pywebview) on it — the same pages, actions and session as the web, with no logic translated.quantum desktop /some/page --width 800opens a given page and size. Needs the new extra:pip install "quantum-framework[desktop]"; without it the command says so.Tables and lists from data (UI-5):
<ui:table source="{rows}">draws one row per record —<ui:column key="name">shows a field, a column with content draws it per row (<ui:button on-click="delete" with="id={row.id}">) — and<ui:list source="{items}" as="item">repeats its content. Until now a table's body was empty and the whole data source was written into the page as an HTML comment; a list showed{item.x}raw. A source that is not a list, or a column key the row lacks, is an error.Form fields open with a value (UI-6):
value=onui:input,ui:select,ui:radio;checked=onui:checkbox,ui:switch. Edit forms were not possible.The core set of
ui:*(UI-7): 37 elements drawn with the same meaning in the browser, the console and the desktop, checked by one script run in a real browser and in the console (tests/apps/test_ui_paridade.py). The console now draws grids, tabs, cards, tables, lists, checkboxes, switches, radios, progress bars and images; for a tag outside the set it says it cannot draw it, instead of drawing something else.Guide: One App, Many Screens (
docs/guide/ui.md), every screen in it served by a test and checked in the browser's text and the console's.Guide: How a Page Runs (
docs/guide/how-a-page-runs.md) and SPEC sectionEXEC-: the order of a GET and of a POST, and how long a page variable,flash,session.xandapplication.xlive (application.xis per server process: gone on restart, not shared between gunicorn workers). The errors for a statement inside markup (PARSE-2), a page variable read in an action (ACT-9) and a guard that reads the page (AUTH-6) link to it.CI: the Laboratório tests (games, Godot, React Native) run in a job of their own, still required.
Breaking
quantum run --target desktopwas removed (UI-8). It generated a pywebview app with a JavaScript bridge that translatedq:setandq:functionon its own — a second implementation of the language. Usequantum desktop, which opens the same pages in a window.- Standalone UI builds are layout only (UI-8): a
q:set,q:functionor any command inside<q:application type="ui">built with--target htmlor--target textualis an error. It used to be dropped without a word ({count}came out raw; buttons called functions that did not exist). Write screens as pages. - Browser state persistence was removed (SET-2):
persist,persistKey,persistTtl,persistEncryptonq:set, and theq:persisttag. They only did anything in the standalone HTML build, and nothing in a page; they are now errors that say to usesession.xor the database. --target mobile(React Native) is Laboratório: it warns once.
Changed
- A page's title is the same in the browser, the console and the desktop window: the first
ui:window'stitle, else the component's name (UI-4). Pages served in HTML used to be titled<path> - Quantum. - In a page,
ui:sectionis a titled group, always open (it was a collapsed<details>: its content was hidden in the browser); aui:card'stitleshows next to aui:card-headertoo.
Fixed
examples/python-data-processing.qused<ui:code>, which never existed, andexamples/state_persistence_demo.qused<ui:form-item>; neither page opened. The first is fixed; the second is removed with the feature it showed.examples/dashboard-ui.qis now a page;examples/task-manager-desktop.q(the desktop bridge's demo) is removed.docs/tools/cli.mdtold to runpython src/cli/runner.py, a path that no longer exists.Text directly inside a
ui:*container vanished:<ui:card-header>Summary</ui:card-header>came out empty (UI-1).