Changelog¶
0.6.3¶
Added¶
- Every shipped stylesheet has a generated page,
Link_Stylesheet.tdlincluded (#291).tools/generate_component_docs.pyreads a stylesheet that has no_View.tdl(a built-in widget's look) and writesdocs/stylesheets/links/link.md; the Links component page links to it. A property or a second root block afterStylesin a stylesheet was already refused with the file named; a test pins it.
Changed¶
- Tesserae runs on TEL 0.2.0 (
tesserae-el==0.2.0), which has no template form: the text around slots is split by Tesserae. TEL is an expression language only now (Template,compile_template,fill_template, the codestemplate-unclosedandtemplate-emptyand the{{ }}delimiter are gone from it). The TDL front end already reads a slot as its own piece, so a text with slots goes to the view astess_ui.tel.Parts(the literals and each slot's expression text, with where that text starts in the file) andtess_ui.tel.compile_template(parts)compiles every slot withcompile_expr; nothing writes{{ }}between the front end and the node any more, and no text is searched for delimiters. For a view, a stylesheet or a theme in TDL the behaviour is the one of 0.6.2: a value that is one slot keeps its type, a slot with text around it or several slots make text (Noneis nothing), the names and reads of a text are the union over its slots, and an error in a slot names that slot's line and column. What an author can meet: - The step budget is each slot's. A text of three slots may take three times
max_steps(the limit that errors withlimit-steps); it was one budget for the whole text. The 2000 characters of source and the 1 MB of text still count for the whole text (limit-source,limit-string). - A message that quotes a slot spells it as written.
got '<| x |>'where it saidgot '{{ x }}'(a name, aWindow_Region, a tooltip placement given a slot). - An object of the application's in text says its own class.
a Settings cannot be used in text(value-not-plain, "read one of its attributes instead") where TEL saida _Host cannot be used in text. - A
{{ }}in a Python dict is no longer an expression.App(stylesheet_spec={...})andRuleSheet.of({...})with"{{ h / 2 }}"as a style value are refused (style 'height' has {{ }} in its text, and {{ }} is not a slot): a stylesheet is read from TDL, where the value isHeight: <| h / 2 |>; a dict spec that must hold an expression takes thePartsthe front end makes. - The mapping the front end gives holds a slot as
Parts, not as{{ x }}.load_tdl_file,load_marked_tdlandload_marked_tdl_stylesheetreturn astrsubclass whose text is what the file says (Battery <| level |>%); the JSON schemas' pattern for an expression is<|(it was{{). Code that checked the mapping for{{checksisinstance(value, Parts). - An unclosed or empty slot is a TDL error, as it was.
This <| has no |> on its lineandThis slot is emptycome fromtess_dlbefore TEL sees anything, sotemplate-unclosedandtemplate-emptynever reached an author. - API of
tess_ui.tel:compile_template(parts, *, limits=)takes aParts(it took text and an origin and returnedNonefor text without{{);SlotandPartsare new;Template,NestedTemplateandExprkeep their methods and attributes.
0.6.2¶
Changed¶
- The colour parser and the image decoder are
tesserae-utils' (tesserae-utils[image]>=0.2.2,<0.3,import tess_utils). Colour strings parse to the same values and fail with the same messages as before. Images change in three ways:Image,image()and a cursor'ssrc:load PNG, JPEG, GIF and WebP only (BMP, TIFF, ICO and the other formats Pillow read are refused), the file's EXIF orientation is applied (a photo that was stored sideways is shown upright), and the error text for a file that cannot be read is the shared one (cannot decode image '<path>': cannot read the image: ...).
Removed¶
tess_ui.tokens.parse_colorandtess_ui.images.decode_image. Usetess_utils.parse_colorandtess_utils.decode_image_file(path), which returns(width, height, rgba)(decode_imagereturned(rgba, width, height)).
0.6.1¶
Removed¶
- YAML is no longer read. A view, a stylesheet and a theme are TDL (
*_View.tdl,*_Stylesheet.tdl,*_Theme.tdl) and nothing else. Every loader (open_view,load_stylesheet,load_theme,App(stylesheet=),App(custom_theme=), hot reload) refuses a.yamlor.ymlname with one message: Tesserae no longer reads YAML, write the file as TDL (tesserae migrate-tdlintesserae-ui<0.6.1), see Migrating from YAML. A name that is not found says so too when aName_View.yamlis in the project. The shipped.yamltwins of Tesserae's views, stylesheets and default theme are gone, and so isTESS_UI_SHIPPED. - The converter.
tesserae migrate-yamlandtesserae migrate-tdl(and thetess_ui.migrate*modules) are removed; they live on intesserae-ui<0.6.1, which is what Migrating from YAML uses. - The Python API that opened a YAML view file:
App.load,App.build_view,App(window_view=),View(path),tess_ui.instantiate,tess_ui.Component,tess_ui.Repeater,tess_ui.overlays.ViewDialog,tess_ui.spec.load_viewandViewWatcher. Open a view withapp.open_view, repeat a node withFor, and show a view in a dialog with a modalOverlayin a view (the table in Migrating). A per-screenstylesheet=onloadis gone with it;App(stylesheet=)is the app's stylesheet. - The
*_Component.yamland*_Style.yamlfile kinds. A project no longer has aComponents/folder of fragments,component:andinclude:do not read a project's files, and a rule'sstyle:cannot name a*_Style.yamlfile. The built-in fragments the Python widget factories used (tess_ui.spec.fragments) and their expander (tess_ui.spec.expand,expand_components_to_spec) are gone too: the factories call the views Tesserae ships.
Changed¶
- Expressions and handlers run on TEL, the Tesserae Expression Language (
tesserae-el==0.1.2,import tess_el), andtess_ui.expris gone (piece 11b). The grammar, the functions and the limits are the same; what an author can meet:d.get()on a Signal that holds a dict is the dict's ownget(it needs a key; writed), andn.get()on a plain value now gives the value; the name_is refused; a template text over 2000 characters is refused as a whole (the limit counts the text, not each<| |>part); a Signal inside a list or a dict (rows[0] + 1,d.k + 1) is no longer read in the middle of an expression (rows[0].get() + 1works; an expression that ends in one still reads it); a method that is not allowed (items.append(x),x.bit_length()),str.format,isinstance(x, (int, str)), a**with a literal exponent over 64 and a call of something that is not a function now fail when the view loads, not when the expression runs; an action in a handler is a step of its own or the whole value of aSet(ok = copy(text)), not part of a bigger expression; each step of a handler has its own evaluation budget; the error wording changed (the method 'append' is not available,the range is over 100000 items, an unknown function has noallowed:list, onlydid you mean) and everyExprErrorhas TEL'scode(unknown-name,call-not-function,method-not-available,bad-call,limit-range, ...). See Migrating. - The engine is
tesserae-engine0.6.8 (was 0.6.7), the release the whole suite was run on. pyyamlis no longer a dependency. The Python widget factories read no YAML. A project that read YAML itself installspyyamlon its own.- The Python widget factories are calls of the views Tesserae ships.
button(),icon_button(),fab(),extended_fab(),split_button(),button_group(),card(),list_item(),chip(),badge(),divider(),link(),text(),accordion_header(),tree_node(),date_picker_day(),period_selector(),search_bar(),toolbar(),top_app_bar(),status_bar(),menu_item()and the actions, rows and panels of the dialog, menu, snackbar, popover and side sheet are built fromButton,IconButton,Fab,Card,ListItem,Chip,Badge,Divider,Accordion,TreeNode,DatePickerDay,PeriodSelector,SearchBar,Toolbar,TopAppBar,StatusBarandMenuItem, with Tesserae's own rules (Button_Stylesheet.tdl, ...), so a factory widget and the same view in a TDL file look and behave alike. A caller sees the same functions, arguments, parts (.part("label")),Signals and callbacks, and idsnameandname.part; what changed is listed in Migrating. The shipped views gained what the factories need:CardandToolbartakeBare(only the surface, for nodes a Python widget adds itself),BadgetakesFlat(the root is the mark),SearchBartakesTrailing_Icons(a list) and shows no leading icon whenleading_iconis empty, and aStatusBar's notes are keyed by their position, not their text. - Python 3.14 is the minimum, and
tesserae-dlis a dependency (it was an optional extra): TDL is read bytess_dl, which needs 3.14.
0.6.0.1¶
Fixed¶
-
An
a11y:label or description with{{in it is kept (T-056). A composed view works every expression out before the builder sees the spec, but the builder took anya11y:value with{{for a binding to wire: a label such as a tree row'sBar {{ x }}, or a param that holds braces, made the view refuse the spec, and on a patch left the field unset (the label or description vanished).lowernow marks the nodea11y_literal: trueand the view reads itsa11y:values as text; a spec written by hand still has{{ }}bindings (tests/test_a11y_literal_braces.py). -
A state rule on a popup view no longer makes Escape fail. A stylesheet rule with
state: focusedorstate: focus_visibleon a view whose root holds an anchoredOverlay(ColourPicker,Menu) wrote thefocusedstate again while that state was still notifying, when closing the layer moved the focus back to the trigger; the engine loggedwas written to again while still notifyingand the write was lost. A state written during its own notification is now applied on the next turn. -
A text input whose
textis two-way keeps its caret while you type in the middle of it. After each edit the view set the typed text on the input again, and the engine moves the caret to the end of the text when it is given the text it already shows, so a second character typed afterHomelanded at the end and a Backspace deleted there (found in the configuration app, where it looked like a lost Backspace). A text the input already shows is no longer set again; a text the app sets still reaches the input.
Changed¶
-
The examples, the Configuration Application and the tutorials are TDL (piece 6b of the YAML-to-TDL switch). Every view, stylesheet and theme under
examples/(the six example apps, both Tasks tutorials, Getting Started) andapps/shell_config/is a.tdlfile written bytesserae migrate-tdl --write --remove-source(read back and compared); no*_View.yaml,*_Stylesheet.yamlor*_Theme.yamlis left there. The tutorial pages show the TDL files (title="Tasks_View.tdl") and the README's counter is TDL. -
Views, stylesheets and themes load from
.tdl(the YAML-to-TDL switch, piece 6a). A name findsName_View.tdlorName_View.yaml(the same for_Stylesheetand_Theme; the.tdlwins when one folder holds both, and a note says once that the YAML twin is ignored). Every loader (parse_view,load_rule_sheet,load_stylesheet,load_theme,App(stylesheet=),App(custom_theme=),open_view, hot reload) reads a file by its suffix, errors keep their file, line and column, a file with noTesseraemetadata is noted as a YAML one with no first line is, and a.tdlwhose root block says it is another kind (Styles,Theme) is refused with the name to give it. Only TDL 0.2 is read:TDL: 0.1, a bare{{ }}and a{{ }}inside text are load errors. The shipped views, stylesheets and default theme are loaded from their.tdlfiles (the whole shipped set now runs through the TDL front ends);TESS_UI_SHIPPED=yamlloads the YAML ones instead, and so does an install withouttess_dl.tesserae newandtesserae add screenwrite TDL. -
TDL language 0.2 (the YAML-to-TDL switch, piece 3b).
tesserae migrate-tdlwritesTDL: 0.2files with<| |>slots (thetesserae-dl>=0.2.0,<0.3library reads them itself;pip install tesserae-ui[tdl]on Python 3.14) and writes a pair-target loop as it is,For i, item In <| enumerate(items) |> Key <| ... |>: there is noi_itemrewrite, no# TODO tuple for-targetline and no loop report any more. The front end refuses aTDL: 0.1file with a message at its version line. The 61 shipped views, 49 stylesheets and 9 themes were written again. -
The Shell Configuration App moves to TDL 0.2 (piece 3b, part B). It needs
tesserae-dl>=0.2.0,<0.3from PyPI (it was a git commit), writes<| ... |>slots (the{ }expression button of the form, the new-file templates) and edits aForwith several variables: the form's row is now Variables (i, item, comma separated) and the structure tree showsFor i, item In .... Its recorded schema (1.3), recorded shell answers, shipped-file copies andtess_dlcorpus are those of tess-shell 4cbacd2 andtesserae-dl0.2.0; thereal_shell_checktests run against a shell venv at that commit and pass.
Added¶
-
tesserae migrate-tdl [PATH] [--write] [--remove-source]writes views as TDL (the YAML-to-TDL switch, piece 2). Each*_View.yamlunderPATH(a file or the project's folder) becomes*_View.tdlbeside it:Title_Casekeys, a node a block headed by its widget,IfandForblocks around a node, handlers asSetandCallsteps,<| expression |>slots, templates, and theTDL,NameandTesseraemetadata. Comments (at the top, above an entry, at the end of a line, in a handler's Python), blank lines between entries and the order of the keys are kept; entries are one to a line, a one-line YAML{...}stays on one line up to 150 columns and a long list is wrapped there. Every result is read back through the TDL loader and compared with the YAML view before it is written, so a form with no TDL form (a key that is not lowersnake_case, a handler that is not assignments and calls, a YAML date, an anchor) is reported with file, line and what to write, and that file is left alone. A pairfor:target (i, it in enumerate(items), 10 in the shipped views) has no TDL form yet: it is written with one variable (i_it) under a# TODO tuple for-target: ...line and listed in the report with its file, line and original text, because its body must be adjusted by hand. A dry run writes nothing,--writewrites only what differs (a second run changes nothing),--remove-sourcedeletes the YAML of each file written. Themes and components are skipped with a note (stylesheets: the next entry). The shipped views are not converted yet (tests/test_migrate_tdl.py: the 61 shipped views convert and load to the YAML loader's mapping; mutation checks run). -
tesserae migrate-tdlwrites stylesheets as TDL too (the YAML-to-TDL switch, piece 4). Each*_Stylesheet.yamlunderPATHbecomes*_Stylesheet.tdlbeside it: a rootStyles { }block holding oneRule { }block per rule in order (Rule { Widget: Button, Size: xs, Style { Height: 32, Gap: 4 } }),Title_Casekeys, a style field that holds a map as a block (Padding { Left: 12, Right: 12 }), a list of names asClasses: [a, b],{{ expression }}as<| expression |>, and theTDL,NameandTesseraemetadata. Comments, blank lines and order are kept, a rule written on one line stays on one line up to 150 columns, and every result is read back and compared with the YAML before it is written, as for views. The 49 shipped stylesheets have their.tdlbeside the YAML; nothing loads them yet (the YAML is still what tess-ui reads). Themes are still skipped. -
tesserae migrate-tdlwrites themes as TDL too (the YAML-to-TDL switch, piece 5). Each*_Theme.yaml(and Tesserae's owndefault_theme.yaml) underPATHbecomes*_Theme.tdlbeside it: a rootTheme { }withSeed,Dark,Colors { },Typography { },Components { }andStyles { }; colours are quoted strings (Seed: "#0B6B58"), a component key with a dot is a block inside its component (card.elevatedisCard { Elevated { Elevation: 1 } }), and comments, blank lines and key order are kept. Every result is read back and compared with the YAML theme before it is written, a second run changes nothing, and the 8 example themes and the default theme have their.tdlbeside them. Nothing loads.tdlthemes yet. -
A composed view's sync costs what changed (T-056). Each node of a composition keeps what
lowermade of it and its subtree and is marked dirty, with the nodes above it, only when a signal it read changes; an unchanged node is the same dict at the next sync, andView.reconcile, the image extraction and the expansion ofWindow/Dock/TitleBar/view:nodes skip it by identity (the image files are read once, not at every sync). On the Configuration Application's window (235 nodes, headless): selecting a block 15.0 -> 11.0 ms (median), one committed edit 8.4 -> 5.4 ms. A VirtualList and a node withdescribedby/controlsare lowered again every time. -
The Configuration Application is checked against the real
tesserae-shell checkandschema(T-056).apps/shell_config/tests/test_shell_config_real_check.py(markerreal_shell_check, on when the shell's checkout and a venv of its own withtesserae-shellfrom a3083ca exist; skipped with the reason otherwise) writes a new file of every type, every block the Add menu offers to every block that may hold it, every selector the builder makes, a theme with every mode,Shadows,For/Ifedits, calls of a user module named like a shipped one, and one sample edit of 3,073 keys, and runs the real checker on them in a scrubbed environment. It found and the application now fixes: a block of a surface or container (Monitor,Bar,Panel,Popup, a drawn block) goes into itsChildren { }block, made with the first one (and a block moves into one in one edit); a new module has its one layout block and offers no second;requiredsets of alternatives are read (PanelgetsWidthandHeight, anSVGitsIcon); a newRuleselects.new_rule, not a word that is no block; a type default in aStylehas no required keys; a surface's style keys andShadowsgo in itsStyle { }; a key a module sets is read-only outside a module file; a list of key names (Transition) is written as words; the sample of aTooltipis not empty. -
The Shell Configuration App, themes, stylesheets, settings, module calls, the Files area, the keyboard pass and the user guide (T-036, phase C5): a theme's token forms add and remove a mode column (
Modes, a mode, a token group are in the Add list, each once); a stylesheet's rules are listed by selector (Rule Text:hovered) and a rule's form starts with a selector builder (applies to a block or module, a class or a name; target; part; state), each change oneSelector:edit, the style keys narrowed to those the selector's block type takes, an unreadable selector shown as written with every style key;settings.tdl's sections are pages and the missing ones are in the Add list; aPopupnamed like a default popup shows that popup's values; the Add list offers the user's own modules (theParamsof every file underModules/, read withtess_dl, shown with name and type and no doc) beside the shipped ones; keys whose value is a block (Shadows,Animation,Peek,Inner_Border...) have an Add/Open button, so only the tooltip, the keys with no kind and one token keep the generic field; the Files area makes a new file from a type, duplicates, renames and deletes (to atrashfolder of the state folder, never removed; Ctrl+N, F2, Ctrl+Alt+D, Delete); every pane, button and form widget has an accessible name and description, andIfandForrows in the tree are named without braces (the toolkit takes a{{in ana11y:label for a binding and drops it); a folder of more than 12 files opens its Files tree with one group open. Toolkit:View.reconcilebuilds on the side only what changed instead of the whole window (select 20 -> about 15 ms, edit 15.4 -> about 9 ms in the configuration app). The acceptance criteria are in tests (test_shell_config_acceptance.py,test_shell_config_a11y.py); the user guide, with pictures, isguide/shell-config.md. -
The Shell Configuration App, check, the Problems list, saving and the file watch (T-036, phase C4):
tesserae-shell check --jsonruns on a worker thread after each save (10 s timeout, never in a frame) and its findings are listed with an icon and a word andfile:line:column; clicking one selects the block and the key it points at. "Apply as I edit" (remembered in the app's state folder) writes each commit, undo, redo and structure edit at once (typing once it rests) and asks a running shell to reload; the status line showsstatus --json; a Reload shell button. A file changed on disk by another program asks Reload or Keep and is never overwritten, the app's own saves never ask; a failed save leaves the old file whole and names the cause. Everything is reachable from the keyboard (F5, Ctrl+Shift+R, A, L, U; F6 reaches the Problems area). -
KeyChordFieldwrites media and hardware keys by their X names without theXF86prefix (T-036, phase C4):AudioRaiseVolume,AudioLowerVolume,AudioMute,AudioMicMute,AudioPlay,AudioPause,AudioStop,AudioNext,AudioPrev,MonBrightnessUpandMonBrightnessDown. Recording one of those keys writes the name (the engine'saudio_volume_up,media_track_next, ... are read), and typed text takes theXF86form too and is written back canonically (tess_ui.key_chords). -
The Shell Configuration App edits an
Ifand aFor(T-036, phase C4, part 0): selecting one shows its condition, or its variable, list and key, as editable rows written throughtess_dl'swith_condition,with_items,with_keyandwith_variable; only the bytes of that part change,tess_dl's refusal is shown under the row, and renaming a variable says it does not rename its uses. The recorded schema is 1.2 (thepopupssection is typed). -
The Shell Configuration App, add, remove, move, duplicate, undo (T-036, phase C3): the Structure area has buttons, a menu (a right click in the area, the Menu key or Shift+F10) and shortcuts for Add child (a list of the selected block's
allowed_children, then the shipped modules where it takes module calls; the new block has its required keys only and is laid out bytess_dl.format_block, aNameis the type and a number no block of the file has), Remove, Move up and down (past the next block,IforFor), Move to (a list of the blocks the schema lets hold it, the keyboard's way to another parent) and Duplicate (the copy'sNamebecomesName_Copy,Name_Copy_2, so names stay unique). Each is onetess_dledit, one undo step, changes only its own lines and leaves the selection on the block it was on; a button is dimmed where the action cannot be done, and an edittess_dlrefuses (a block inside anIforFor) says so in the status line. The model keeps the selection as a place counted in blocks,Ifs andFors only, since an edit can take a comment away with a block; a copied or moved multi-line block is dedented beforeBlock.with_childindents it again. Undo and redo keep the focus on the form field that held it, and a field that loses its focus while the form is rebuilt no longer writes what it held back. -
The Shell Configuration App, the toolkit widgets in the form (T-036, phase C2b): the form registry now has the shipped widgets for the kinds that fell back to a TDL text field:
iconis theIconPicker(over the built-in icons and the configuration folder'sIcons/folder when it has one, found through the toolkit's file system),fonttheFontList,key_chordtheKeyChordField(writtenCtrl+Alt+Shift+Meta+Key; text that is not a chord is refused), andlisttheListEditorwith the schema's item kind (text, name, number or whole with the key's range, bool, enum with its choices, colour), itslength,uniqueandone_or_list; a list whose item kind has no row says why and stays a TDL field. The token button is the shippedTokenButton(the tokens of the groups the key accepts,preferred_tokensfirst, writes$group.name), replacing the app's own simple popup. The coverage test's fallback list is now only the kinds with no kind,shadows,blockandtooltip. -
The Shell Configuration App, the form (T-036, phase C2): the Form area beside the Structure tree, generated from the schema: the selected block's keys in the schema's groups (an opened group builds its rows), one row each with the widget of the key's kind (switch, choice list, number with range and step, length with units, one or four sides, the shipped
ColourPicker, text with the schema's pattern, a path with the shippedFileDialog, the generic TDL field), a token button, an expression toggle for a key with a slot, a reset that removes the property, the default as the placeholder and a marker on an absent required key. Also settings sections, module calls and theme token groups with a column for each mode. A widget registry maps a kind to a widget and a coverage report lists the keys that got the generic field with a reason. Every edit is onetess_dledit, so only its line changes. -
The Shell Configuration App, first part (T-033, phase C1):
apps/shell_config/is a package of its own (tesserae-shell-config, importtess_shell_config, commandtesserae-shell-config). A window with Files, Structure (the toolkit'sTree,IfandForas nodes) and Text areas over the shell's configuration folder, a schema reader fortesserae-shell schema --json(an unknown major version is refused), the shell-command layer, and lossless open and save: a file opened and saved unchanged is byte for byte the same, a save goes through a temporary file and a rename, and the first save keeps the old content in the app's state folder.tools/tests_for.py,tools/ci_plan.py,tools/mypy_ratchet.pyand the real-session guard (nowtests/real_session.py) cover it, and CI has a Python 3.14 job for its tests. -
ColourPicker(#298): a colour picker, inline or (popup: true) behind a swatch that opens it in a layer. A square of saturation and value, a hue strip, an alpha strip, a hex field (#rrggbbor#rrggbbaa), red, green, blue and alpha number fields and a row of the theme's colour roles.valueis two-way text,'#rrggbb'(or'#rrggbbaa'when the alpha is below 1, lowercase): a value set and read back is the same text, and the hue is kept through a grey or a black, so a drag to a corner and back does not drift. Text typed in the hex field that is not a colour leaves the value as it was and draws the field in the error colours.on_changeruns after each change the user makes;openis two-way; Escape and a press outside close the popup. The arrow, Page Up, Page Down, Home and End keys move the square and the strips, Tab goes square, hue, alpha, the fields, the swatches, and a screen reader gets sliders in percent and degrees. The pieces are also widgets of their own (ColourArea,ColourStrip,ColourField,ColourSwatches, andcolour_area,colour_strip,colour_fieldandcolour_swatchesintess_ui.widgets), andtess_ui.colourhas the text and hue, saturation, value conversions. -
FileDialog(#299): a file and folder dialog inside the app, a modal panel over a scrim, formode: open(one file, or several withmultiple),mode: save(a folder and a name, which asks "Replace file?" before it answers when the file is there) andmode: folder. A path bar (type a path and press Enter; one that is not a folder says so under the list), the folders of the path as buttons, Back, Forward, Up, Home and Refresh; a list of folders first and then files, each sorted without regard to case, with their sizes and times;filters({label, patterns}, with anAll fileschoice after them) that hide the files that do not match and never a folder; a switch for the names that start with a dot (off unlessshow_hidden);New folderwhen saving or choosing a folder;rootto keep it inside a folder (a symlink in it that leads out does not escape); afilenameand, for a name with no extension, the extension of the type in use.valueis two-way text, the absolute path (a list whenmultiple), written when OK is pressed;on_acceptandon_cancelare handlers. The keyboard works in the list: Up, Down, Page Up, Page Down, Home and End, Enter, Backspace, Alt+Left and Alt+Right, Ctrl+A, Shift and Ctrl with a press, and typing a name's start. It builds only the rows in view (aVirtualList) and reads one folder at a time, so a folder of ten thousand files opens at once. A folder that cannot be read (permission denied, gone, or a file) is a message in red and the dialog stays where it was. Nothing is read from the disk until it opens. The disk is reached throughtess_ui.filesystem(filesystem.use()swaps it), the rules are intess_ui.file_browser.FileBrowser(no window), andtess_ui.file_dialog.FileDialogRequestopens the dialog from a ViewModel and hands the paths to a callback. The view drives a new control that draws nothing,widget: FileBrowser. File dialog. -
IconPicker(#300): a searchable grid of icons, inline or (popup: true) behind a button that shows the icon and its name and opens the grid in a layer under it. The icons are the curated set oftess_ui.iconsand the.svgand.pngfiles of an optionalicons_folder(read throughtess_ui.filesystem, once when the grid opens; a folder that cannot be read is a message under the grid and the built-in icons stay).valueis two-way text: a built-in icon's name, or a file's name with its extension. The search keeps the icons whose name has every word typed (arrow backfindsarrow_back). The grid is virtual (rows in view and three past each edge; a file is read for its picture only when its row comes into view; an SVG that is not one, or that carries a document type, is a plain file glyph). The search field has the focus when a popup opens and Up, Down, Page Up, Page Down and Enter work from it; in the grid the arrows, Home, End (Ctrl for the whole grid), Page Up, Page Down, Enter and Space. A pick writesvalue, callson_changeand closes a popup (close_on_pick: falsekeeps it open); Escape and a press outside close it and the focus returns to the button. New: theIconBrowsercontrol (it draws nothing;tess_ui.icon_controls, with the window-lessIconBrowsermodel), the basetess_ui.mindthe Configuration Application's other widgets share, andFileSystem.read_bytes. -
FontList(#301): a searchable list of the installed font families, inline or (popup: true) behind a button that shows the family in its own face and opens the list in a layer under it. The families come fromtess_ui.font_families:fc-list : familyby default (a read-only subprocess given five seconds, run once; lines split on newlines and commas, trimmed, de-duplicated and sorted without regard to case), or any function given tofont_families.use. A machine with nofc-list, or where it fails or lists nothing, gets a text field for the family's name (with the reason under it) in place of the list. A row is shown in its own family only when the engine can draw it (fonts.available_families()), and in the ordinary face otherwise.valueis two-way text; the search keeps the families that have every word typed; the list is virtual (seven thousand families open at once); the search field has the focus when a popup opens and Up, Down, Page Up, Page Down and Enter work from it, and in the list the arrows, Page Up, Page Down, Home, End, Enter and Space. A pick writesvalue, callson_changeand closes a popup (close_on_pick: falsekeeps it open); Escape and a press outside close it and the focus returns to the button. New: theFontBrowsercontrol (it draws nothing;tess_ui.font_controls, with the window-lessFontBrowsermodel) andtess_ui.font_families. -
KeyChordField(#302): a field for a keyboard shortcut, an outlined text field and a button that records. The chord is text,Ctrl+Alt+Shift+Meta+Key: the modifiers held in that order and one key last, a named key in title case (Ctrl+Shift+F1,Alt+Left,Meta+Space). Press the button (or focus it and press Enter or Space) and the next key press is the chord: Escape on its own cancels, Backspace on its own clears, a modifier on its own never finishes it and only shows what is held (Press keys Ctrl+Shift+), and a key that no chord can have is named under the field while the recording goes on. A chord can also be typed: it is read when Enter is pressed or the field is left, in any case and the usual names (control + returnisCtrl+Enter), and rewritten in the canonical form; text that is not a chord is refused in the error colours andvaluestays.valueis two-way text (a value the app sets is shown as it is and never rewritten) andrecordingis two-way too. New: theChordRecordercontrol (it draws nothing;tess_ui.chord_controls) andtess_ui.key_chords(normalise,from_event). -
ListEditor(#303): an editor for a list of items of one kind.valueis a Python list, two-way, anditem_kindistext(a text field),number(a spin box bounded byleastandmost; a whole number stays anintwhenstepis whole),bool(a switch),enum(a button that opens a menu ofchoices, plain values or{value, label}) orcolour(a swatch that opens the colour picker in a popup). Each item is a row with its widget and Move up, Move down and Remove buttons, and an Add button appends the kind's default (empty text, the least number or 0, false, the first choice, black);min_itemsstops Remove (with a message under the list) andmax_itemsstops Add. A text row writes when Enter is pressed or the field is left, the others when they change; an edit writes a new list in which only the edited item differs, andon_changeis called. A list the app sets is shown as it is and never rewritten: an item that does not fit the kind is shown as the nearest value (0, the first choice, black) and left alone until that row is edited. Each item has an identity that stays with it when it moves, so a row keeps what is in it. Tab reaches every widget and button, Enter or Space press one; a screen reader hears a group, a list and items named bylabeland their place. The mind iswidget: ListModel(tess_ui.list_controls; the model isListModelthere too, with no window). Not built: Alt+arrow keys (a handler cannot choose between three calls by the key), dragging a row, mixed kinds, and turning the list into TDL text. TokenButton(#304): a button that picks a theme token from a searchable list in a layer under it. The tokens are data you give it:tokensis a list of{name, ref, kind, value, doc}(refis what a pick writes, such as$color.primary, and is a$and the name when left out; a token with no name or a repeated ref is left out),groupsis more tokens in named sets ([{name, tokens}]; a row says its group before its doc) andpreferredlists names or refs first, in that order. A row is the name, a line with its group and doc, and the value: a swatch for a colour token (kind: colourorcolorwith a'#rrggbb'or'#rrggbbaa'value), the value as text for any other. The button shows the ref it holds, with a swatch when it is a colour token it knows; a ref that is none of the tokens is kept and shown as it is.valueis two-way text: a pick writes the ref, callson_pickand closes the layer (close_on_pick: falsekeeps it open). The search keeps the tokens with every word typed in their name, ref, group or doc (any case, any order; a name that starts with the first word comes first) and is empty each time the list opens, which opens scrolled to the held token. The list is virtual (the rows in view and three past each edge). The keyboard: Enter on the button, or Down, opens it with the search focused; Up, Down, Page Up and Page Down in the field move the cursor and Enter picks; Tab goes on to the list (arrows, Page Up, Page Down, Home, End, Enter, Space); Escape and a press outside close it and the focus goes back to the button. A screen reader hears a button named "label: ref" that isexpandedwhile open, a group, a list of items named "name: value" andselectedfor the held one. The mind iswidget: TokenList(tess_ui.token_controls;TokenListthere is the model, with no window). Not built: a tree by dotted names, previews for kinds other than colour, and tokens read from the theme or the Shell (the app passes them).
Changed¶
-
A change to a view's signals composes its window once, not once per signal (T-036, phase C4, part 2): the window's one effect (
ComposedView._sync: lower the whole composition, build it on the side, patch the nodes) ran at once for every signal and everyfor:orif:region that changed under one write, ten times for one selection in the Configuration App (about 14 ms each at 260 nodes).Effecttakesdeferred=True: such an effect that is told while a write or abatchis still notifying runs once after it, when everything that write set off has settled (the write has still not returned when it runs, so a caller sees the result at once, and it runs also when another subscriber raised). The window's effect is deferred. Also: the four spec expanders (Window,Dock,TitleBar,view:) no longer each copy the whole spec on a sync (one copy), and a reading frame no longer searches a list for each read it records. In the Configuration App: selecting a block 210 ms -> 20 ms, one committed edit 21 ms -> 16 ms, a closed menu is no longer part of the window. -
Tesserae needs
tesserae-engine0.6.7, one exact release (it was 0.6.0). 0.6.2 sizes an unsized text node to its text (get("width")reads"fit-content", not"auto", and a fit width is the text plus 2 px), and 0.6.4 rejects a shader that declares a function namedsd_circle,sd_box,sd_round_box,sd_round_union,sd_smooth_unionorsd_coverage. 0.6.3 and 0.6.5 addPopupWindowoptions Tesserae does not use. 0.6.6 addswrapandoverflowto atext_input. 0.6.7 changes every text input's keys: Ctrl+Left/Right and Ctrl+Backspace/Delete act by word, Ctrl+Home/End in a multiline input go to the start or end of the text, and a double click selects a word (a headless test that clicks one input twice mustwindow.advance(1000)between the clicks). The size, label, widget, layout, overflow and keepalive tests passed on 0.6.5; the full suite passed on 0.6.7.
0.6.0¶
Tesserae's Python packages take the tess_ prefix the other Tesserae projects use: Tesserae's own is tess_ui (#295) and the engine's is tess_re (#296). It is a new release series, so the first line of a file moves from tesserae: 0.5 to tesserae: 0.6. This is the release of the two steps below, 0.5.1.10 and 0.5.1.11, which were not published on their own.
Changed¶
tesseraeistess_uiandtreistess_re, and nothing is left under the old names.from tesserae import Appisfrom tess_ui import App;import treisimport tess_re; after the upgrade the old names are aModuleNotFoundError. The environment variables follow (TESSERAE_*isTESS_UI_*, the engine'sTRE_*isTESS_RE_*), and so do the editor schemas (tess-ui-*-schema.json) and the logger (tess_ui). Migrating lists every change and how to find the places in your code.- Tesserae needs
tesserae-engine0.6.0, one exact release (it was 0.5.8). A project that imports the engine itself changestretotess_re; every name inside the engine is unchanged. - The first line of a file is
tesserae: 0.6. The shipped views, stylesheets and theme, the project templates, the examples and every whole-file block in the docs say it, andtesserae new,tesserae add screenandtesserae migrate-yamlwrite it. A file you wrote that saystesserae: 0.5is refused withwritten for Tesserae 0.5: run tesserae migrate-yaml, and the command now does that: it moves the first line of every view, stylesheet and theme of the older line to0.6, and changes nothing else in the file (a comment after the value, Windows line ends and a byte order mark stay).tesserae migrate-yamlalone reports what it would move, and--writemoves it. The view language is the one of 0.5: nothing but the first line differs. A file with no first line still loads, with a note in the log; the key is meant to be required from a later line.
Fixed¶
App.run(keepalive=True)returns after the window closes on macOS (#297). Withtesserae-engine0.5.9 and later (found on 0.6.0), the keep-alive callback that queues itself again keptrun()from returning on macOS once the last window had closed: the engine runs queued callbacks while no window is open, and the loop never got to its exit. The keep-alive callback, and the frame counter behindTESS_UI_FRAMES_REPORT, now stop when the main window closes. It was found by running the one failing test on GitHub's macOS runners with the engine at 0.5.8, 0.5.9, 0.5.10 and 0.6.0; 0.5.8 passes. Your own callback that queues itself withthread_handle().call_soonhas the same problem on macOS until the engine is fixed: stop it when the window closes. The engine was asked to fix its side (design/tre-requests/exit-with-a-requeuing-callback.md, tess-re#260).
Unchanged¶
- The PyPI names (
tesserae-ui,tesserae-engine), thetesseraecommand andpython -m tess_ui, the.tesserae/foldertesserae schema --projectwrites to, and the repositorymindderivative/tess-ui.
0.5.1.11¶
#296: the engine is tess_re.
Changed¶
- Tesserae needs
tesserae-engine0.6.0 (it was 0.5.8), which renames the engine's Python package fromtretotess_reand its environment variables fromTRE_*toTESS_RE_*; every name inside is unchanged. Tesserae importstess_reeverywhere, and the pin is one exact release, as before. Migrating says what to change if your own code imports the engine. - Names that followed it:
TRE_SOURCE_DIR(the engine checkout the one real-font test reads, and CI checks out) isTESS_RE_SOURCE_DIR, andTESSERAE_RECORD_TREisTESS_UI_RECORD_TESS_RE. The docs and the messages that called the enginetrecall ittess_re, and the links go to its repository,mindderivative/tess-re. - Unchanged: the PyPI name
tesserae-engine; notes that say what an old engine release did (they still saytre 0.5.4); and the release workflow's refusal of PyPI's unrelatedtreas a dependency. - Ships in 0.6.0 with the package rename (#295); this point version is not published on its own.
0.5.1.10¶
#295: the Python package is tess_ui.
Changed¶
- The package
tesseraeistess_ui. The import nametesseraeis also an unrelated project on PyPI, and the other Tesserae packages use thetess_prefix (tess_re,tess_el,tess_dl,tess_shell).from tesserae import Appisfrom tess_ui import App, in your code, in whattesserae newandtesserae add screenwrite, in the examples and in every docs page. There is notesseraemodule left, soimport tesseraeis aModuleNotFoundError: what to change says how to find the places. - Names that followed the package: the environment variables
TESSERAE_FRAMES_REPORT,TESSERAE_ISCC,TESSERAE_MAX_FRAMES,TESSERAE_ONLY,TESSERAE_STATE_DIRandTESSERAE_STATSareTESS_UI_*; the editor schemastesserae-*-schema.jsonaretess-ui-*-schema.json(in the package and on the docs site,$idincluded); the logger istess_ui; andPyInstalleris told to collecttess_ui, sotesserae buildfinds the package under its new name. - Unchanged: the PyPI name
tesserae-ui, thetesseraecommand andpython -m tess_ui, thetesserae:first line of a YAML file, the.tesserae/foldertesserae schema --projectwrites to, and the repositorymindderivative/tess-ui. - Ships in 0.6.0 together with the engine's rename (
treistess_re); this point version is not published on its own.
0.5.1.9¶
The PyPI name is tesserae-ui again. The repository stays mindderivative/tess-ui.
Changed¶
- Install with
pip install tesserae-ui. The rename totess-ui(0.5.1.8) is taken back: the package keeps the name it was first published under, as the other Tesserae packages keep theirs (tesserae-engineistre). The import name (import tesserae) and thetesseraecommand are the same, and so is everything in a project.tesserae newinstallstesserae-uiinto the project's virtual environment again, and the messages that name the package saytesserae-ui:pip install tesserae-ui[build]fortesserae build, and the upgrade hint for a file written for a newer series. - If
tess-uiis installed, switch:pip uninstall tess-ui, thenpip install tesserae-ui. The two hold the sametesseraepackage, so they must not be installed together. Thetess-uiproject has been deleted from PyPI (it held only 0.5.1.8, the same code), sopip install tess-uifinds nothing and a copy that is already installed gets no update; this repository's release workflow publishestesserae-uionly. The note in 0.5.1.8 thattesserae-uigets one more release and no more no longer holds. - Unchanged: the repository, the docs address and the editor schemas'
$idstill saytess-ui; they name the repository and its Pages site, not the package.
0.5.1.8¶
The PyPI name is tess-ui (it was tesserae-ui), and the repository is mindderivative/tess-ui (it was mindderivative/tesserae).
Changed¶
- Install with
pip install tess-ui. The import name (import tesserae) and thetesseraecommand are the same, and so is everything in a project.tesserae newinstallstess-uiinto the project's virtual environment, and the messages that name the package say the new name:pip install tess-ui[build]fortesserae build, and the upgrade hint for a file written for a newer series. - If
tesserae-uiis installed, switch:pip uninstall tesserae-ui, thenpip install tess-ui. The two hold the sametesseraepackage, so they must not be installed together.tesserae-uigets one more release, the same code with a note at the top of its PyPI page, and no more after that. - The repository and the docs moved. The repository is
https://github.com/mindderivative/tess-ui(GitHub redirects the old addresses of the repository and its issues) and the docs are athttps://mindderivative.github.io/tess-ui/(Pages does not redirect, so the old address is gone). The editor schemas'$idis an address in the docs, sotesserae-*-schema.jsonnow namehttps://mindderivative.github.io/tess-ui/schema/...; ayaml.schemassetting that names the schema files by path is not affected.
0.5.1.7¶
#294: a file whose content is another kind says what it looks like.
Fixed¶
- A view that holds a stylesheet or a theme says so.
Brand_View.yamlwithstyles:used to give onlya node needs a 'widget:' (its keys are: styles); it now goes on withthis looks like a stylesheet: name it Brand_Stylesheet.yaml. A theme'sseed:,dark:,colors:,typography:orcomponents:saysa themeandBrand_Theme.yaml. Only the root of the file is judged: a nested node withstyles:is a mistake in the node, not in the file's name. - A stylesheet or a theme that holds a view says so, and a stylesheet that holds a theme.
Brand_Stylesheet.yamlwithwidget:orseed:is refused when it is loaded, as<path>: this looks like a view: name it Brand_View.yaml; the same for a rule sheet (a stylesheet has only 'styles:', not 'widget' (this looks like a view: name it ...)), a theme file (unknown field ... (this looks like a view: ...)) and a dict given toApp(stylesheet_spec=)orcustom_theme_spec=, where there is no file name and the hint says<Name>. - The hint is decided from the root keys alone and always says "looks like".
widget:is a view; a theme key is a theme and wins overstyles:, which a theme may hold too;styles:alone is a stylesheet. A file that looks like none of them, and the older syntax (kind:,component:,view:,include:), keep their messages.
Stylesheet and theme files and what is checked describe it.
0.5.1.6¶
#293: a name that is not found says where the file is.
Fixed¶
- A view, theme or stylesheet kept in the wrong folder is named in the error that says it was not found.
Extra_View.yamlinThemes/used to give onlyno view called 'Extra' (Extra_View.yaml) in Views under <root>: add the folder to App(search=[...]) or pass the file's path; the message now goes on withfound Themes/Extra_View.yaml: views are read from Views/ (or add Themes to App(search=[...])). Two files with that name are both listed. - A file with the same name under another kind's suffix is named as what it is. Asking for the theme
Brandwhen onlyViews/Brand_View.yamlexists addsfound Views/Brand_View.yaml, a view, not a theme. - A name that is nowhere gives the same message as before. The project is walked once, only when a name is not found, with the folders a
recursive=Truesearch skips (hidden folders, virtual environments,node_modulesand the rest); the walk took 5 ms on this repository.
Finding files by name and what is checked describe it.
0.5.1.5¶
#292: the first line of a Tesserae file.
Added¶
- A view, stylesheet or theme may start with
tesserae: 0.5, the release series it was written for (the first two numbers of Tesserae's version). It is read before anything else in the file, and nothing else in the file sees it (not a node's properties, a stylesheet'sstyles:or a theme's fields). It must be the first line: atesserae:under a comment, a blank line or---is an error that names the line it is on. A value that is not a release series says to writetesserae: 0.5; a newer series says to upgrade, an older one to runtesserae migrate-yaml. It is optional in this series: a file without it loads, and the log says once, at the info level, that it has none. A later series will require it. The first line describes it. - Every file Tesserae ships or writes has it: the 90 shipped views and stylesheets, the default theme, the five project templates (
tesserae new,tesserae add screen), the examples, the whole-file blocks in the docs, and everythingtesserae migrate-yamlwrites (the key, then the file's own comments).tools/stamp_language.py --writeputs it on the shipped files and changes its value when a new series is started. - A mapping read from such a file keeps working:
yaml.safe_loadof a stylesheet or theme file with the key, given toApp(stylesheet_spec=),custom_theme_spec=orRuleSheet.of, is accepted. - The editor schemas allow the key (
tesserae-widget-schema.json,tesserae-stylesheet-schema.json,tesserae-theme-schema.json), checked with the real YAML language server.
Changed¶
- A schema modeline (
# yaml-language-server: $schema=...) cannot be used in a file that starts with the key. The server reads a modeline only from the comments before the first key (tried on the real server: line 1 applies, under the key or beside it does not). Such a file takes its schema from theyaml.schemassetting thattesserae schema --projectprints. migrate-yamlwrites a translated file with a block-style top level (widget: Rect, not{widget: Rect}), since a flow mapping cannot follow the first line.
0.5.1.4¶
Changed¶
- Tesserae now asks for exactly
tesserae-engine0.5.8 (it was 0.5.7 or newer, below 0.6). A newtrerelease could reach a fresh install the day it came out, and 0.5.8 did: it changed hit testing so that a press on a rounded shape must land inside the shape. Tesserae's own tests had pressed 5 px in from the corner of a rounded button, which is outside it; four of them failed, and now press the middle. The whole suite passes on 0.5.8 (8404 tests). A newertreis tried by the maintainer before this moves.
0.5.1.3¶
#288: a stylesheet rule's part:.
Fixed¶
- A rule's
part:that names no node of the widget is an error that names the nearest one.widget: Cardwithpart: headingused to match nothing and say nothing (the docs index example had exactly that mistake). It now fails where the stylesheet is read, with the file, line and column:Card has no part 'heading',did you mean 'headline' (parts: actions, body, headline, picture, subhead, text). A part is a named node in the view's own YAML. This covers the app's stylesheet (App(stylesheet=)orstylesheet_spec=) and a project's<View>_Stylesheet.yaml; a built-in widget has no parts, so a rule that names one forSplitterorContainersayshas no parts. A rule for a view that is not found is still not checked. The stylesheets Tesserae ships are checked against the shipped views by a test.
0.5.1.2¶
#289: style.placement or style.offset with no style.anchor.
Fixed¶
placementoroffsetwithout ananchoris an error at the node.style: {placement: above}used to be accepted and did nothing (the node stayed in the flow), so a forgottenanchorgave no hint. The view now fails when it is built, naming the node:Rect 'root.dot': style.placement does nothing without style.anchor (name the node to sit against, orparent). The check is on the style a node ends up with, so a rule that gives onlyplacementstill works for nodes that give theanchor(and the other way round); ananchor:that is an expression and works out to nothing still returns the node to the flow.
0.5.1.1¶
The documentation audit (#287): every page checked against the code, every tutorial run as written.
Fixed¶
- A theme file with an unknown key names the file when it is read (
ValueError: themes/Brand_Theme.yaml: unknown fieldcolours, expected one of ...). It used to be found only when the theme was first used, and the message named no file. - An offset past the end of a bound
ScrollViewno longer logs a "written to again" error. The offset was held at the end as documented, but writing it back to the Signal that had just set it happened inside that Signal's own notification; it now waits for the next frame. tesserae new --helpsayswidget: Window, notkind: Window; the message for a theme, stylesheet or style file loaded under the wrong name no longer carries a milestone tag.
Documentation¶
- About a hundred statements on the pages were corrected after being run against the code. The ones a reader would have hit: views are found in
Views/and the folders the app searches, not "anywhere in the project"; a Tabs example that did not load; the repeater example neededname: main; a rule'spart:that names no node does nothing (the example used a part Card does not have);TextandTextInputneed atypography_role(orfont_family) and, forText, astyle.foreground; hot reload does apply an edit to the app's stylesheet ofwidget:rules and to views opened withopen_view;tesserae add screenaddsbind,open_viewand a route; the keyword-only arguments of the Python overlays; a window is found by its view's name;Slideracceptsforeground; the exact function and method lists of an expression; what an assignment in a handler may be; the realtesserae schema --settingsoutput; and the limits that were stale after the work of the last weeks (anchoring, insets and sums, runs, labelled controls). - Both tutorials say to delete the two ViewModel files that step 6 replaces.
- New guards:
tests/test_docs_examples.pychecks that everypart:a docs rule example names is a node of that view, andtests/test_docs_expr_lists.pythat the Bindings page lists every function and method the expression language has.
0.5.1¶
Everything since 0.5.0 (the point releases 0.5.0.1 to 0.5.0.31, below, which were committed and pushed but never published to PyPI). Requires tre (tesserae-engine) 0.5.7.
The view language¶
- Layout (0.5.0.8, 0.5.0.24, 0.5.0.25, 0.5.0.26, 0.5.0.28): sizes may be sums (
calc(100% - 16),100% - 16) andfit-content;left,top,right,bottomandinsetplace an absolute node against the edges of its parent;anchor,placementandoffsetplace a node in the tree against another node, at a side or a corner, and it follows with no lag (hidden with its anchor);overflow: hidden | visible; a labelledCheckbox,RadioButtonorSwitchis placed as a whole row; aListItem's divider is drawn.Overlaytakes the corner placements,offsetandflip. - Nodes (0.5.0.6, 0.5.0.7, 0.5.0.9, 0.5.0.22):
visible:on any node,pointer_events: none, typing effects on a text field, number ranges, and styled spans inside oneText(runs). - Components:
Slider(Expressive sizes, vertical, an inset icon),RangeSliderwith two handles, thicker progress indicators with the circular gap, the two-bar sweep, a contained loading indicator and wavy shapes, and drop zones on the halves of a split dock. - Bindings (0.5.0.27, 0.5.0.29, 0.5.0.31): Two-way properties is the one page that says what a view may write back and what it keeps. A handler's assignment to a name it cannot write, and the same in the text of an
after(...)orevery(...), is found when the view loads, with its position; the log warns when an editable property is given a bare name that cannot be written back. - Projects (0.5.0.15, 0.5.0.19, 0.5.0.21):
tesserae newandtesserae add screenwrite the current language; the examples are in it; a view's stylesheet is read only when the application uses the view.
Hot reload and editor support¶
- Hot reload for views written with
widget:nodes, including routed screens, and the app's stylesheet ofwidget:rules (0.5.0.13 to 0.5.0.15). - The editor schemas know the current language, and are checked in Red Hat's YAML language server (0.5.0.18, 0.5.0.30).
Fixed¶
- A flex-expanded
Slidermaps the pointer with the width it was laid out at;surface.dismisscloses awidget: Overlay; a borderless window no longer crashes with a stylesheet ofwidget:rules; a function name that does not exist is a load error; a mistyped colour role is named;ViewDialoggiven a current-language view says what to do.
Each point release has its own entry below, with the issue and the detail.
0.5.0.31¶
Added¶
- A model property given a bare name it cannot write back is warned about (#284).
checked: "{{ inverse }}"on aCheckbox, whereinverseis a Computed, a ViewModel attribute that is not a Signal, a plain param or a loop variable, looks two-way and is silently one-way: the user's edit stays on screen and nothing learns of it. The log now says so when the view is composed (Main_View.yaml:7:14: Checkbox checked is given 'inverse', which is a Computed: the user's edit is not written back (one-way). Give it a Signal or a state: name to make it two-way), once for the place in the file, also for a model param of a view you call. It is a warning, not an error, and nothing that loaded before stops loading; an expression ("{{ inverse and True }}") or a literal says one-way on purpose and stays quiet, as does a bare Signal,state:name or model param, which are two-way. Across the whole test suite it fires once, on a test that pins exactly this case.
0.5.0.30¶
Changed¶
- The editor schemas were checked in the real language server again (#285).
tools/check_schema_in_language_server.py(Red Hat's YAML language server 1.15.0, over the Language Server Protocol) opens all 151 views and stylesheets of the repository with no diagnostics, and now also checks the sizes and insets from 0.5.0.24 and the anchor fields and corner placements from 0.5.0.25: sums,fit-contentand the insets are accepted;40px, a negative size, a sum in an inset or a limit, a negative percentage inset and a sum with no spaces are each flagged;anchor,placementandoffsetare accepted, suggested as style fields (with the nine placements) and flagged when wrong; anOverlay's cornerplacement,offsetandfliplikewise. 31 checks in all. No schema had to change: the server read every pattern the way the JSON validator does. The server's messages for a bad size are the generic "Expected number" (the pattern says nothing more).
0.5.0.29¶
Changed¶
- The text of a timer in a handler is checked when the view loads (#283).
after(10, "r = 1")andevery(10, "nosuch()")were compiled when the view was read, but an unknown action or a name that cannot be written in the text was found only when the timer fired. Both are now load errors, as they are for the handler itself, also for a timer inside a timer's text. The error is at the handler's position (the text has none of its own). A text that is a bare action name, or an action that is not a literal, is not checked.
0.5.0.28¶
Fixed¶
- A node anchored to a hidden node is hidden with it (#282). With
style: {anchor: target}, hiding the target withvisible: false(its own, or a container's it is in) left the anchored node at the window's top left corner, drawn and pressable, because tre puts a node whose anchor is hidden there. The node is now hidden while its anchor, or anything it is inside, is hidden, in the same step, and shown when the anchor is back (its ownvisible: falsestill wins). It already followed an anchor removed by anif:. The guide no longer says to hide both.
Known¶
transition:still does not ease an anchored placement.
0.5.0.27¶
Changed¶
- A handler's assignment to a name it cannot write is found when the view loads (#277).
r = 1on a loop variable, a write to a plain param, a Computed, a ViewModel attribute that is not a Signal,hovered, or a misspelt name was an error only when the handler ran. It is now a load error with file, line and column and, for a typo, the names that can be written ('cuont' is not writable here (did you mean 'count'?)). It is the same check a call to an unknown action already had. No shipped view or example was affected. A handler written as the text of anafter(...)orevery(...)call is still checked only when it runs.
Documentation¶
- Two-way properties is now the one place that says what a view may write back, answered by running the code: which names a handler may assign; that a property given anything but one bare reference to a writable Signal is one-way, and the user's edit stays on screen until the value next changes; what a
model: trueparam does with a Signal, an expression, a literal and nothing; and that astate:keeps its value over an edited starting value when a view is reloaded. The bindings and component pages say the same and point to it.tests/test_two_way_state.pypins each answer.
0.5.0.26¶
Fixed¶
- A labelled control is placed as a whole (#281). A
Checkbox,RadioButtonorSwitchwith alabel:is a row of the box and its text, butposition,x,y, the insets,margin,flex,align_self,z_index, the grid fields and the transforms were applied to the box inside it, soright: 8put the box outside its parent. They now go to the row: it is the node the view places, and the one ananchor:sits against (or is) and atransition:eases. A control without a label is as it was.visiblehides the label with the box.
0.5.0.25¶
Added¶
- Place a node against another node (#280). With tre 0.5.7,
style: {anchor: target, placement: top_end, offset: [6, -6]}sits a node on the corner of a named node, wherever either is written, and keeps it there as the target moves, with no lag. The node stays in the tree: a parent'sclip_childrencuts it andz_indexorders it.placementis a side (below,above,start,end) or a corner (top_start,top_end,bottom_start,bottom_end,center);anchor: parentis the node it is written inside; the nearest node of the name wins (afor:row's own node first). The fields come from rules and expressions, a mistake is found at load with its position, an unknown anchor name is an error naming the nearest name, and the editor schemas know them. If the anchor goes (anif:) the node is hidden until it is back.Overlaytakes the corners too, withoffsetandflip(falsekeeps a side where it is put instead of flipping it), andTooltipaccepts corner placements.design/tre-requests/anchored-layout.mdis marked done.
Known¶
- If the anchor is hidden with
visible: false, tre leaves the anchored node at the window's corner; hide both.transition:does not ease a placement.
0.5.0.24¶
Added¶
- Insets, and sums as sizes (#279). With tre 0.5.7,
left,top,right,bottomandinsetare style fields:left: 8, right: 16stretches an absolute node across its parent less 8 and 16 pixels,inset: 4fills the parent less 4 each side, and on a node in the flow an inset moves it from its place. An inset is a number (negative is allowed), a percentage orauto;xandyareleftandtopand say the same thing (givingxwithleftorinsetin onestyle:is an error, found at the line). A rule'sinsetgives way to an edge the node, or a more specific rule, says itself. A size may be a sum,calc(100% - 16)or100% - 16(numbers, percentages and16px, joined by+and-with a space each side), andwidth/heighttakefit-content. These already reached tre untouched; what is new is that they are part of the language: a size or inset tre would refuse (40px,10vw,stretch,100%-16, a negative size,calcin a limit or an inset) is refused where it is written, with file, line and column and what to write instead (it was tre's message with no position, when the view was built), the same for a stylesheet rule, and the editor schemas know them (the language-server check was not re-run). An inset cannot ease (tre does not animate it):transition:takesxandy. The check agrees with tre on a corpus of values (tests/test_sizes.py), so it fails if tre's grammar moves.
Fixed¶
- A ListItem's divider was never drawn. It was placed at
y: 100%with no width, so it was 0 wide. It now takesleft: 16, right: 0, bottom: 0: 16 pixels in from the left edge to the right edge, on the item's bottom edge. The Carousel's caption and the VideoPlayer's controls bar usedy: 100%and a negativetranslate_yfor the same thing; they takebottom: 0now, and draw where they did.
Known¶
- A control with a
label:(Checkbox,RadioButton,Switch) takesposition,x,yand now the insets on its inner box, not on the row that holds the box and its label, so an inset on one lands in the wrong place (#281). The layout guide says so.
0.5.0.23¶
Changed¶
- Requires tre 0.5.7 (#278).
tesserae-engine>=0.5.7,<0.6. 0.5.7 adds what Tesserae asked of it on 2026-10-11 (tre#178, tre#179) and more: sizes that takecalc(100% - 16)and mixed units, andfit-contentfor text;left,top,right,bottomandinseton an absolute node, so one can be stretched between two edges;anchor,placementandoffseton an ordinary node, which stays in the tree and follows its anchor with no lag, and the corner and centre placements (top_start,top_end,bottom_start,bottom_end,center) for a layer; bitmap colour emoji; and a larger minimum window size that no longer reports repeated resizes. Nothing in Tesserae broke: the suite passes (7853). Four tests that recorded what tre could not do (a size other than a number,autoor a percentage; an inset; a corner placement) failed because it can now, and say what it does. Tesserae's owncalc(), insets andanchorin the view language are the next issues (#261 and #262 were built as far as 0.5.6 allowed).
0.5.0.22¶
Added¶
- Styled spans inside one
Text:runs(#265).Texthad lostrunswhen views moved to thewidget:language (aTextwas one piece, and mixed styles meant a row of nodes). It has it again: a list of pieces of one text, each a string or a mapping withtextand any ofcolor,weight,italic,underline,strikethrough,font_size,font_familyandlink, drawn as one text that wraps as one (tre'sspans, from byte ranges Tesserae works out). A string in a run may be an expression, so the pieces follow your data; alinkrun is the theme'sprimaryand underlined, andhandlers: {on_link: "open_terms(event.href)"}runs with itslinkinevent.href.runsandtexttogether are refused where they are written, and a bad run (an empty list, notext, an unknown key, a weight that is not a number) names the node.tesserae migrate-yamlcarries atext: {runs: ...}over (it failed on it before). The row-of-nodes layout stays for pieces that need their own handlers or alignment.
0.5.0.21¶
Changed¶
- A view's stylesheet is read when the application uses the view (#274). A project's
<Name>_Stylesheet.yamlnext to<Name>_View.yaml(or inStyles/) was never loaded, and all 40 shipped stylesheets were read and compiled for every app, used or not. Each opened view now works out the widgets it uses (its own and, through every view it calls, theirs) and reads only those widgets' stylesheets: the shipped ones, then the project's, then the app's own over both. A small app that uses a button, a checkbox and some text reads 6 of the 40. A project view that replaces a shipped one has its own sheet and not the shipped look; a sheet for a view nothing calls is not even parsed (so a mistake in it is not reported); one that is used and wrong is an error naming the file, line and column. The app's own stylesheet is not read again as a view's when a view has its name. A hot reload re-works out what is used, so a view the file starts to call gets its sheet, and editing a used project stylesheet reloads the view.
0.5.0.20¶
Fixed¶
ViewDialoggiven a view in the current language says what to do instead (#268). It reads its view with the older loader, so awidget:view failed inside it withevery widget needs an id, which says nothing useful. It is refused up front, by path or by name, naming the file and pointing to a modalwidget: Overlaybound toopenand closed bysurface.dismiss(which works in a view since 0.5.0.17).ViewDialogitself is unchanged for views in the older syntax. Porting it was not done: a dialog in the current language is that Overlay, and a called view has no ViewModel of its own, which is whatViewDialog'sargumentsand.viewmodelare for.
0.5.0.19¶
Changed¶
- The vertical-slice examples are in the current view language (#276).
examples/counter,multi_screen,todo_listandcustom_title_barwere written withkind:,component:,app.loadand, for the to-do list, aRepeaterand a ViewModel for each row. They are nowwidget:views and ViewModels that serve a named view, opened withbindandopen_view; the buttons areButtonandIconButtoninstead of drawnRects, and the to-do list is one listSignalthat the view turns into rows byfor:andkey:.tests/test_examples_run.pyruns each example's own checks in its own process (and the multi-screen deep link), and checks that none uses the older syntax and thattesserae migrate-yamlhas nothing to translate in it.
0.5.0.18¶
Fixed¶
- Editor support for the current language (#275).
tesserae schema --settingsmapped every*_View.yamlto the schema of the older syntax, which flagged every view of the current one, and the widget schema knew only the 30 built-in widgets, so aButtonor a view of your own was an error too, and a node'sstyle:was just "an object". The widget schema now has a branch for each view Tesserae ships (with its params, types, choices and bounds) and describesstyle:field by field (expressions accepted); there is a newtesserae-stylesheet-schema.jsonfor a stylesheet of rules (the theme schema knew only the older keys).--settingsmaps views, stylesheets and themes to those.tesserae schema --project [DIR]writesDIR/.tesserae/tesserae-widget-schema.json, the widget schema with every view the project has of its own, and maps the views to it, so an editor completes a call of your view and flags a misspelt or missing param. The schemas are written bytools/generate_yaml_schema.py(generate_widget_schema.pyruns it) and the site copies are indocs/schema/.
The schemas were run through Red Hat's real language server (tools/check_schema_in_language_server.py): every view and stylesheet of rules in the repository comes back clean, and completions and flagged mistakes behave.
schema --project refuses a symbolic link at .tesserae/ or at the schema file instead of writing through it, and replaces the file whole.
0.5.0.17¶
Fixed¶
surface.dismisscloses awidget: Overlayin a view (#266). A button in an Overlay withhandlers: {on_click: surface.dismiss}did nothing: the handler only looked for overlays made bytesserae.overlays, and a view's Overlay closes another way. It now closes the nearest Overlay the widget is in, as a press outside it would: the layer hides, a boundopengoes false, andon_dismissruns. It works from a view the Overlay calls, and in nested Overlays it closes the inner one. With no Overlay around, it falls back to thetesserae.overlayssurface the view is in, as before. ATitleBarwithbuttons: [dismiss]in an Overlay now closes it.
0.5.0.16¶
Fixed¶
style: row_Style.yamlin a view of the 0.5.0 language is refused, not silently ignored (#273). The loader stored the file name and nothing read it, so the node laid out at 0 by 0 with no message. It is an error at the line and column, saying a style file is not part of the language and what to write instead (the fields inline, orclasses:and a rule in a stylesheet).tesserae migrate-yamlnow writes a style file's fields into each node that names it (the file beside the view, else the only one of that name in the project; the fields may be the file's own or under astyle:key), says so in its report, and fails with the file named when it cannot read one. The older loader still expands a style file for a view in the older syntax.
0.5.0.15¶
Changed¶
tesserae newandtesserae add screenwrite the current view language (#270). The templates were stillkind:/component: ButtonFilledviews andapp.load(...). A new app is nowMain_View.yaml(a tree ofwidget:nodes), aMain_ViewModel.pythat says which view it serves (views = "Main"), and anapp.pythat binds the ViewModel and opens the view.--windowmakes awidget: Windowview whose Main and Settings screens are called with aroute:; they have no ViewModel of their own, so oneWindow_ViewModel.pyserves the window and them (the tutorial's shape).add screenwrites the view and ViewModel and addsbind,open_viewand the route above the marker; in a window project it writes only the view and prints the node and rail item to add. New projects check clean (app.check()) andtesserae migrate-yamlhas nothing to move in them.examples/window_dockis in the current language, moved withtesserae migrate-yamland by hand: oneWindow_ViewModel.pyserves the window and the Console panel and Notes screen it calls; the example addresses nodes and panels by their path from the root (root.body.dock.outline).
Fixed¶
app.run(hot_reload=True)failed in an app whose window has routed screens. A routed call is registered as a screen of its window's view, and hot reload asked it for the older view's components ('_Screen' object has no attribute '_prune_components'). It is skipped, as it is part of the window's view, and the log no longer says such a screen "isn't watched".
0.5.0.14¶
Fixed¶
- The app's stylesheet of
widget:rules is applied again when it changes while the app runs (#272).set_stylesheet_spec(whichrun(hot_reload=True)calls when the stylesheet file is saved) handed the sheet to each view's older stylesheet check, which refused awidget:rule withunknown field(s) ['widget', 'variant']and kept the old rules, so editing the stylesheet never reached a running window. Every view opened withopen_viewis now composed again under the new rules (ComposedView.restyle), with its ViewModel andstate:kept; a sheet the engine rejects leaves every view as it was. An older-shape sheet works as before, and a view opened later uses the new rules.
0.5.0.13¶
Added¶
- Hot reload for views written with
widget:nodes (#269).app.run(hot_reload=True)watches a view opened withopen_vieworopen_window, every view it calls (and the views those call) and the pictures it draws, and composes the view again when one changes: the ViewModel and its Signals are the same ones, a node that keeps its place keeps itsstate:, and handlers are wired again. A mistake (invalid YAML, a call with a wrong parameter, a name nothing defines, a widget the engine rejects) leaves the window as it was and is logged as oneERRORnaming the file. A view opened while the app runs is watched too, and a view the file starts to call is watched from then on. The views Tesserae ships are not. Not reloaded: Python code, and awidget: Windowview's window options (the app's stylesheet of rules is reloaded from 0.5.0.14). Until now the log said such a screen "isn't watched" and a saved edit did nothing.
0.5.0.12¶
Fixed¶
track: surface_varianton a progress indicator was a bareKeyError, and a mistyped role was no better (#267). Two faults. An indicator (or any control) with no theme looked a role up intokens.BASELINE, which holds only some of MD3's roles, so a real role such assurface_variantraisedKeyErrorwhile painting; it now falls back to the whole baseline scheme. And a name that is no role at all raised the sameKeyErrorat the first frame;trackis now checked when the indicator is made, and the error names the property, the role, the widget, and the nearest role when one is a slip away ('surface_container_hihgest' is not a colour role -- did you mean 'surface_container_highest'?). The same lookup in every control gives that message instead of aKeyError.
0.5.0.11¶
Fixed¶
- A borderless window no longer crashes when the app's stylesheet is a sheet of
widget:rules (#271). The window's 1 px border is a plainRectin a small view of its own, and the app's stylesheet was handed to it even when it was in the rule shape that view cannot read, soApp(borderless=True, stylesheet=...)raisedunknown field(s) ['widget'](andtesserae build --checkwith it). A rule sheet is no longer passed to the border, which nowidget:rule could reach anyway; a sheet in the older shape still restyles it by class. The Tasks tutorial's last step no longer needswindow_border=False.
0.5.0.10¶
Changed¶
- Every docs page brought up to date and checked against the code (#263). The component and stylesheet pages (about ninety) described the fragment system that 0.5.0 replaced, and nothing tested that they still matched.
tools/generate_component_docs.pynow reads the shipped views, their parameters, slots, named parts and stylesheet rules, and the built-in widgets, so the "How it is built" tables and the stylesheet pages cannot drift; it refuses to run when a shipped view or built-in widget sits under no component. The hand-written prose of each component was checked against the code and tests, and the claims that had become false were corrected (for example that an engine cannot ease a width, that a window is one per app, that a panel alone has a tab strip, and which looks are "Not built"). The guides, the tutorials, Getting Started, the install, architecture, theme, editor, CLI, release and reactivity pages were rewritten to thewidget:language, with the examples run. The Getting Started and Tasks tutorial programs underexamples/are now in the 0.5.0 language, withtests/test_tutorials_current.pyrunning every step. docs/migration.mdlists what each merged fragment became (Button variants, Fab, Badge, Card, Chip, Tabs, Tooltip and the rest) and no longer says the shipped components cannot be migrated.- A view parameter's
minandmaxare documented. - The README is rewritten for the current language (it still described 0.3.0,
component:fragments andRepeater), andARCHITECTURE.mdpoints to the architecture page instead of keeping a second, older copy.
Added¶
tests/test_docs_examples.pyloads every view and stylesheet example on every docs page against the shipped views. An example that shows the old form on purpose is marked<!-- old-syntax -->, and the test fails if a marked one has become valid.tests/test_component_docs.pyfails when a generated page is out of date, when a shipped view is on no page, or on two.
Fixed¶
tesserae migrate-yaml(#264) checks a view that calls a view Tesserae ships (NavigationRailScreens,StatusBar, ...) against the shipped one, and no longer fails with "no widget named" for it.- Comments in the shipped views that said what the code does not (a modal drawer that slides, a top bar with the role banner, a side sheet with an edge line, a text-field label that jumps, a project stylesheet that is picked up beside its view) were corrected, as was the
anchordescription ofOverlay.
0.5.0.9¶
Added¶
- Typing effects on a text field (#248).
typing_effect: flashtints the characters just typed with the primary colour and lets the tint fade;typing_effect: fade_incovers them in the background colour and lets that fade, so they seem to appear.caret_effect: glidehides the engine's caret and draws one of Tesserae's own that eases to each new place, stays solid while typing and blinks after a moment. Each is drawn from the geometry tre 0.5.6 reports for an edit (caret_move,text_rects; tre#165), so it sits exactly on what was inserted, line by line for a paste. They are properties ofTextFieldand of the bareTextInput,noneby default; with reduced motion asked for there is no flash and no fade, and the caret jumps and does not blink. The issue's first plan, a pulse or glow on the whole input, is dropped: the geometry makes it unnecessary. Each look is the field's own to set:typing_duration(milliseconds;0leaves the effect out),flash_color(a theme role or colour),flash_opacity(0 to 1),glide_durationandcaret_blink(milliseconds;0makes the caret jump, or stay solid). Not built: a shader on the typed characters (tre did not add per-character shader inputs), and the easing, which is fixed.examples/typing_effectshas them on one page (--interactiveto type in them). - A number can have a range (#248). A widget property or a view parameter may say
minandmax; a value outside is an error that names the property and the range, with the file and line, and the schema tells an editor.
0.5.0.8¶
Added¶
overflow: hidden | visible(#260, part of #257). A style field that is another way to writeclip_children(hiddenistrue,visibleisfalse), added because it is what people reach for. It does not scroll: aScrollViewdoes. A node that gives both with different meanings is an error naming both (a stylesheet rule'soverflowand a node's ownclip_childrenare merged first, so they count as the same node); anything buthiddenorvisibleis an error naming the node. It is not theoverflowproperty of aText(cliporellipsis), which is unchanged.
Documented¶
- A size that is the parent minus something (#261, part of #257). There is no
calc(): the engine takes only a number,autoor a percentage for a size, and has no node-level event for a change of size, so Tesserae cannot follow a parent's size itself without trailing it by a frame and shrinking inside anauto-sized parent. In the flowflex: fillwith margins or agapis exact, and the layout guide shows it (tested). An absolute node stretched between two edges cannot be said; it is asked of tre indesign/tre-requests/absolute-insets.md(sent as tre#178). - Placing a node against another node (#262, part of #257). There is no
anchor:style: anOverlayalready sits against a named node on one of four sides and follows it with no lag, and the layout guide says so, with what a layer is (above the window, not clipped by a parent, its own Tab scope, flipped to fit) and is not (a corner, or in the tree). That is asked of tre indesign/tre-requests/anchored-layout.md(sent as tre#179).
0.5.0.7¶
Added¶
visible:on any node (#259, part of #257).visible: falsehides a node and takes it out of layout;trueshows it; an expression is allowed, so a Signal can show and hide it. Unlikeif:the node stays in the tree with itsstate:, timers and listeners. On a view call it hides the whole view; on the root of a view file it is an error. A widget or view that declares a property calledvisiblekeeps it. Only a node that saysvisible:is touched, because overlays, a view's handle and bindings hide nodes too; a node that stops saying it is shown again.
Fixed¶
pointer_events(0.5.0.6) did nothing on a control or a Link, which place only some keys: aSlider,Checkbox,RadioButton,Switch,SpinBox,RangeSliderorLinkwithpointer_events: nonewas still hit. It reaches them now, andvisiblethe same way.
0.5.0.6¶
Added¶
pointer_events: none(#258, part of #257). A style field that lets the pointer through the node itself: a click goes to whatever is under it, and it is not hovered or pressed.autois the usual. It is about the node alone (as in CSS): what is inside apointer_events: nonenode still takes the pointer, and its focus and its place in the accessibility tree are unchanged. Value may be an expression; anything butautoornoneis an error naming the node. It sets the engine'shit_testable, and only when a style gives it: a node that does not say it keeps what it was built with, and a node whose style drops it is hit-testable again. Before, a decorative layer laid over a button in YAML swallowed the click.
0.5.0.5¶
Added¶
- Halves of a split are mini zones, and a panel can be dropped on one (phases 2 and 3 of 4) (#106, part of #114).
Every
DockPanelhalf of a split now has a tab strip over it, with a tab for its own content (titled by theDockPanel; a half with notitle:shows itsid), so a split looks different from 0.5.0.4: each half is 49 px shorter. While a tab is dragged over a half, the outer quarter of each side is an edge and the rest is the middle, and the highlight shows which. Dropping on the middle (or the strip) adds the panel to the half as a tab; dropping on an edge splits the half there, the panel taking the new half beside it with a resize handle of its own. A tab in a half is dragged to a zone, another half or an edge (Tesserae holds the pointer itself, since tre does not know that panel), switches by click or arrow keys, closes with its close button, and is in the "Move to ..." menu, which lists the halves. A half a drop made that loses its last panel collapses into its neighbour. Tesserae finds the half from the window's pointer events, which keep arriving during a tre drag (checked in a real window on KDE Wayland), so tre needs no change. In Python:DockHost.halves(),show_in_half(),half_of(),move();Dock.add_half(),on_half_drop(),on_half_empty(). A hot reload leaves the strips, the dropped panels and the splits the user made where they are, and a half the file removes sends its panels back to their zones.layout()records the halves (halves: the titles of the panels in each and the tab it shows) and the splits the user made (made: a tree per half of the YAML), andrestore()takes the current splits apart and makes the saved ones, so the arrangement survives a restart;DockHost.move(panel_id, half)puts a panel in a half from code.examples/window_dockhas aComparepanel of two halves that its self-checks drop a panel on, save and restore, and a--interactiveflag that keeps its window open to try by hand. Fixed on the way: a handle between two parts of a split stopped resizing the right node once its first part had been split again (it kept the half's old column, now inside a container); it asks each time now, and the YAML's own split handle does the same. A half's own content cannot be dragged to another place, and tabs are not reordered (a restored layout puts a panel in the right zone or half, not at the right place in its tab strip).
0.5.0.4¶
Added¶
- Progress: thicker sizes, the circular gap, the two-bar sweep, the contained loading indicator and wavy shapes (#249).
thicknesssets a bar's height or a ring's width (4 is the standard; a thicker ring keeps the standard ring's outer edge). With atrack, a determinate ring and its track are a 4 px gap apart.two_bar: truesweeps a wait as a long bar and a shorter one behind it.contained: trueputs the loading indicator's shape in aprimary_containercircle.wavy: truedraws a bar as a sine wave flowing along a straight track (the control is taller by the wave) and a ring's arc as a wave whose crests flow round it. All are opt-in: the default look is unchanged. The widths of the two bars are fixed (the engine cannot animate a width), and the wave's size, its speed and the thicker sizes are written from memory of the spec and have not been checked against it. Not done: making MD3's current look (a track and a stop dot) the default.
0.5.0.3¶
Added¶
- RangeSlider: two handles (#250, part 2 of 2).
widget: RangeSliderpicks a least and a most value withlowandhigh(two-way,low <= high: the handles never cross). Each handle is its own Tab stop with its own state layer and focus ring, and a slider of its own for a screen reader ("Price, minimum", "Price, maximum", reaching up to or down from the other handle); the arrow, Page and Home/End keys move the handle that has the focus. A press on the track moves the nearer handle, a drag keeps the handle it began on. It takes the slider'smin,max,step,ticks,value_indicator,vertical,sizeandicon; with asizethe track is three pieces, a gap from each handle.controls.RangeSlideris the Python class;on_inputandon_changehear(low, high). - Slider: Expressive sizes, vertical and an inset icon (#250, part 1 of 2).
size: xs | s | m | l | xldraws MD3 Expressive's slider: a track 16, 24, 40, 56 or 96 px thick in two pieces with a 6 px gap on each side of a thin 4 px handle (44 to 108 px across it); the touch target grows to hold the handle.vertical: truestands it up: the bottom ismin,style.heightis its length, the up and down arrows step it, and the ticks and the value bubble go beside the track.icon: nameinsets a glyph at the start of the track (from sizesup), in the on-colour while the active piece covers it and in the track's colour when it does not. The standard slider is unchanged. The sizes are written from memory of the spec and have not been checked against it.
0.5.0.2¶
Changed¶
- A function name that does not exist is found when the view loads (#251).
{{ nosuch(1) }}in a template, anif:, afor:or a stylesheet rule, andx = nosuch(1)ornosuch(1)in a handler, used to load without a word and fail when the expression ran (a traceback on stderr when a handler was pressed, an expression that raised at render). Now the view does not load: the error names the file and line and offers the near names (did you mean 'clamp'). In an expression the only functions are the built-in ones, so it is found as the text is compiled. In a handler a call may also be a built-in action (copy,focus,after,navigate_to, ...), a method of the ViewModel or a handler parameter, so it is found as the view is composed. A handler whose names cannot be judged (a scope with no app to list the built-in actions) loads as before. A ViewModel method added to the object after its view loaded is now a load error: define it on the class.
0.5.0.1¶
Point releases between 0.5.0 and 0.5.1: one issue each, in the order the backlog was recommended (#252, #251, #250, #249, #248).
Fixed¶
- A flex-expanded Slider maps the pointer with the width it was laid out at (#252).
The slider fixed its span at the width it was built with (200 by default), so in a row with
flex: expand_horizontal(or a percentage) its track and handle were drawn at that width and a press in the middle gave the wrong value (a 280 px slider read 62 as 90). It now takes the width the engine laid it out at when it paints, when a pointer is mapped, on a drawn frame and on a window resize, and moves the track, the tick marks and the handle with it. A slider with an explicit width is untouched.
0.5.0¶
The YAML language redesign (#209), then the components and the windows work.
The language is specified in design/yaml-language.md; the phases land one at a time.
Changed¶
-
Bindings are a Python subset (phase 2).
tesserae.expris a sandboxed evaluator (anastnode whitelist, name resolution through a scope, limits on source size, depth, nodes, steps, ranges, sequences, exponents, integers and text) that replaces the port oftre's binding grammar. Python's arithmetic and comparison rules apply (1 == 1.0isTrue, unary minus,None,if/else, comprehensions, f-strings, whitelisted functions and methods), and a Signal reads as its value (countandcount.get()agree). Operators, truth tests, subscripts, formatting and built-ins touch only plain values, built-in containers, mappings, dates, decimals and enums, so an application's own object can be read by attribute but none of its methods run from a view.tesserae.bindingkeepsparse_binding,evaluate,evaluate_value,HandleandBindingErrorover it, and errors now carry the position and a hint. See Binding Expressions. -
The node model (phase 3).
tesserae.spec.widgetsis the widget registry (Propertywith type, default, choices, required and model;@widget,declare,register_widget,decl_from_paramsfor a view'sparams:, and a JSON schema per widget inschema/tesserae-widget-schema.json).tesserae.spec.nodes.parse_viewreads a view in the 0.5.0 syntax (widget:, optionalname:, properties,if,for,key,slot,state,style,classes,handlers,a11y,interaction,window_region,route,children): every key and property is checked, every expression compiled, every node given an id from its path, and an error names the file, line and column with a suggestion.tesserae.spec.translateturns 0.4.x YAML into it; 128 of the 131 files in the repository translate and load, and the other three are reported (a dynamic widget name, and a property a call binds that its fragment does not declare). Nothing builds from the new syntax yet: that is phases 4 and 5. -
Composition (phase 4).
tesserae.spec.compose.Composerturns parsed views into a live tree ofInstances: a view call is replaced by the callee's root, its arguments are evaluated in the caller's scope and stay reactive inside the callee,Slotholds the call's children (built in the caller's scope, with errors for a view that takes none or a slot it lacks),for:expands a node per element and a reactive one is reconciled bykey:(kept, added, removed, reordered),if:builds and disposes as its expression changes, andstate:is a per-instanceSignalthat survives a recomposition for the same ids. Disposing a composition releases every subscription. Nothing buildstrenodes from it yet (phase 5). -
ViewModel binding and a renderer (phase 5). A
ViewModellists the named views it serves inviews; one instance serves every view with one of those names, wherever they are, so a pie chart and a list of the same rows follow oneSignal.app.bind(DataViewModel)makes it once, when its first view opens;app.bind(instance)uses yours;app.bind(factory=DataViewModel)makes one per view instance; a view without aname:is not bound.app.open_view("Main")composes a view written in the new syntax and shows it with the existing builder, keeping it in step with its Signals (for:andif:add and remove real nodes, handlers run in the scope they were written in, amodelproperty given a bare reference writes the user's edit back).ViewModel.views[name]is a handle (.node,.state,.show,.hide),self.show(new, old)swaps views, andapp.check()/check_viewcompare every name, action andexpects:entry of a view with its ViewModel without a window.ViewModel(view)still works. -
Style rules (phase 6). A stylesheet may hold rules by
widget,variant,size,shape,classes,name,partandstate(tesserae.spec.rules). The most specific rule wins (a name, then the number of properties matched, then a state, then the widget alone), a later rule wins a tie, an app's stylesheet beats the looks a widget ships, and a node's inlinestyle:beats every rule for the fields it sets.hovered,focusedandpressedare Signals a rule can select on and an expression can read;disabled,selected,checkedandexpandedread the widget's own property.foregroundis no longer valid on every widget: the widgets that draw text or glyphs declare it, and the error names them.self.show(new, old)swaps one of a ViewModel's views for another. -
Migration (phase 7).
tesserae migrate-yaml [PATH] [--write] [--force](tesserae.migrate) moves a project to the new syntax: views and fragments are translated (a fragment becomes a*_View.yaml), stylesheets become rules (a component's bypart, an app's bywidgetandname), a view with a*_ViewModel.pyis named after it, header comments are kept, every result is checked with the app's loader and nothing is written unless all of it loads (--forcewrites what did). Python is not rewritten: the report lists what each ViewModel needs. A view in the old syntax still loads and says once per file how to move on. New: the guide The View Language, whose YAML examples are tested, and the migration table in Migrating. -
The text field component (#184, the first of the components).
widget: TextFieldis the Material text field, a view Tesserae ships with its look as rules: filled and outlined, a label that rises with focus or text, placeholder, leading and trailing icons, prefix and suffix, supporting text, a character counter, an error state with its message, disabled, read-only, multiline, and a password field with a button that shows the text.textis two-way;on_change,on_keyandon_submitare events. The bare input is the new widgetTextInput(placeholder,multiline,obscured,max_length,read_only); the old builder'skind: TextFieldtakesplaceholder,multilineandobscuredin itstext:as well, andtesserae migrate-yamlwrites the old kind aswidget: TextInput. New with it: shipped views (tesserae/views/, found after the project's, replaceable by a view of the same name),focused,focus_visible,errorandread_onlyas states a rule can select, a widget's state read by its parts' rules, and the iconsvisibility,visibility_offanderror. -
More accessibility states (#210).
a11y:takesexpanded,selected,checked,value,value_min,value_maxandvalue_step, in both syntaxes and intesserae.a11y; every field butroleandlivecan be bound, andnullclears a state tre holds unset. A control still sets its ownchecked,selectedandvalue. -
Text extras (#211).
max_lines,letter_spacing(andselectableonText) are properties ofTextandLinkin the new syntax and keys oftext:in the old;max_linescuts a long text to that many lines,letter_spacingis tracking in pixels, and aTextwith a fixedwidthand noheightis as tall as the lines it wraps to. -
Alpha on colours, and the
fullshape (#212). A colour may end in@N%to scale its alpha:primary@12%,on_surface@38%,"#6750A4@50%", wherever a style, a rule, a boundbackground/foreground/border_coloror acolorproperty takes one.corner_radius: fullis a pill or a circle. -
Focus control and keyboard navigation (#213).
focus('name')in a handler gives the focus to a named node in the view;on_pressis a handler for the pointer pressing a node (it does not make the node a button), so a container can focus the input inside it;focus_group: horizontal | vertical | bothgives the focusable nodes under a node one tab stop, arrow-key,Home/Endand type-ahead movement. The text field's box focuses its input when pressed. -
Transitions (#214).
style: {transition: {background: 150, scale: {duration: 300, easing: spring}}}makes a change to those properties ease instead of jump (opacity, colours, border, corner radius, elevation, blur and the newscale,translate_x,translate_y,rotation_deg), with Material's easings, cubic beziers or a spring; the first draw does not ease, an app that reduces motion gets the value at once, and a stylesheet rule can carry the transition. - Canvas (#215).
widget: Canvaswithdraw:, a list of{rect: [x, y, w, h]},{circle: [cx, cy, r]}and{path: [points], width: N}commands, each with acolor(a role, a CSS colour orrole@N%).draw:may be one{{ }}expression, so a canvas repaints when the Signals it reads change. It is how a widget draws wavy progress, ticks and graph edges. - Icons from a path (#216).
widget: Icontakespath:(SVG path data) andview_box:instead of a name, so any glyph can be drawn and tinted like the built-in ones.tools/import_material_symbols.py DIRturns a folder of Material Symbols SVGs intosrc/tesserae/icon_data/material_symbols.json, whichtesserae.iconsmerges under the icons built in. The 18 built-in names are unchanged; no Symbols are bundled yet (see the issue). - Material Design Icons (#216). 147 icons from Pictogrammers' MDI (Apache-2.0) are in the icon set beside the built-in ones (names in
snake_case:account_check,format_bold; a built-in name keeps its own drawing), each drawn in its own 24 x 24 box.tools/import_mdi.py mdi.json [--names ...|--all]adds more from the IconifymdiJSON. - Timers (#217). Handlers can call
after(ms, action[, name]),every(ms, action[, name])andcancel(name);actionis an action name or statements run in the handler's scope, and a name restarts a timer of that name (a debounce).tesserae.timers.Timers(window)is the same for Python. They run on the frame loop until tre has timers (#235) and stop with the view. - Scroll state (#218).
ScrollView.scroll_offsetis drawn (a literal or a Signal; a bound Signal follows the user's scrolling, and setting it scrolls), andat_top,at_endandscroll_directionwrite the position to the Signals or state names they are bound to, for collapse-on-scroll and hide-on-scroll. - Pointer capture, cursor and drag events (#219). New events
on_moveandon_release, and handler actionscapture(),release()andcursor(name)that act on the widget whose handler is running, so a drag keeps following the pointer outside the node. - Per-corner
corner_radius(#220).style.corner_radiustakes a list of four (top_left,top_right,bottom_right,bottom_left) or a mapping of corners and edges ({top: 12},{left: full, top_right: 4}), with tokens or pixels; one value is unchanged. - Windows, title bars and docks in composed views (#221). A
widget: Windowroot opened withapp.open_viewsets the OS window (it becomes the app's window view, askind: Windowis forapp.load), and the bindings aTitleBarexpands to (inactive dimming, the maximize/restore glyph, the OS's inset and buttons) are wired without a ViewModel. Docks already worked and are now covered by tests. - Input masks (#222).
mask: "(###) ###-####"on aTextInputorTextFieldformats what is typed or pasted (#digit,Aletter,*either,\\a literal);tesserae.spec.mask.Maskis the same for Python. - Clipboard actions (#223). Handlers can call
copy(text)(true if it reached the OS clipboard) andpaste()(the text on it, or''). open_url(#224). Handlers can callopen_url(url)to open a link in the OS's browser or mail program; onlyhttp,https,mailtoandtellinks are opened.tesserae.urls.open_urlis the same for Python.- Divider (#152).
widget: Dividerwithvariant: full | inset | middle,orientation: horizontal | verticalandthickness, a shipped view with a shipped look (a line inoutline_variant, hidden from a screen reader). The 0.4.xcomponent: Dividerfragment still works. - Image (#196).
widget: Imagetakesalt(a screen reader's description; without it the picture is decorative and hidden from one, unless it handles clicks) and checksfit; its shape isstyle.corner_radius, per corner too, which the engine clips the picture to. Asrcthat follows a Signal now changes the picture shown (a changed picture was missed by the reconcile). - Svg (#197).
widget: SvgtakesaltasImagedoes, and needs one ofsrcandcontent(a load error otherwise);currentColoris theforeground, so a monochrome icon follows the theme. - Elevation that moves (#226). No new language:
elevationinhoveredandpressedrules withtransition: {elevation: ms}eases the shadows (also from a level a view computes, for a drag). Documented in Gradients & Effects and tested. - Overlay (#227).
widget: Overlaywithopen(two-way),anchor,placement,modalanddismissibleshows its children in a layer over the window: anchored with flipping, or a modal scrim; Escape or a press outside closes it and writesopenback; focus returns. - VirtualList (#228).
widget: VirtualListwithitem_heightandoverscanand a singlefor:child builds only the rows in view and builds more as it scrolls (a list of 10 000 opens with about a dozen rows). It has a ScrollView'sscroll_offset,at_top,at_endandscroll_direction. - Window size classes (#230).
app.window_width,app.window_height,app.width_class(compacttoextra_large) andapp.height_classfollow the window's size and can be read in any expression.appitself is now readable in views whose ViewModel is the new kind (it had only worked for a 0.4.x ViewModel). - Screen transitions (#231).
app.transition(orApp(transition=...)) isnone,fade_through,shared_axis_x,shared_axis_y,shared_axis_zorcontainer_transform, played bynavigate,backandforward(reversed going back);app.navigate_with(name, transition=..., origin=node)picks one for a single navigation. - Text (#195).
widget: Texttakesheading: 1to6(a heading of that level for a screen reader). Type roles have atrackingfield:tokens.MD3_TRACKINGis Material 3's per role, off unless a theme'stypography:sets it (tokens.MD3_TRACKING_TYPOGRAPHYfor all). Every role's size and line height is tested against the MD3 scale. - Splitter (#203).
widget: Splitterwith two child panes,orientation, a two-wayposition,min_first,min_secondandcollapsible: a handle you drag (the pointer is captured), move with the arrow keys, Home and End, a screen reader can set, and double click to collapse. - Image masks (#236). A picture's rounded, circular and pill shapes are
style.corner_radius(also from a rule); no new code was needed, and they are tested. - The accessibility vocabulary (#237).
a11y:takespressed,invalid,description,describedby,controls,current,value_now,value_textandbusy, checked and bindable; the engine has no property for them yet (requested: tre#160), so they are sent one at a time as far as it takes them, with one warning naming each it lacks. tooltip:on every node (#238). Text, or{text, title, delay}for a rich one: shown after a hover delay (500 ms) or at once on keyboard focus, gone on leave, press, blur or Escape; the text is the node's accessibilitydescriptionwhere it has none.transition:for layout (#239).width,height,x,y,gap,paddingandmarginease like the rest. tre cannot animate them yet (requested: tre#161), so they are set frame by frame along the curve; when tre can, its own animation is used without a change.- Badge (#141, #142).
widget: Badge: a dot, or a pill with avaluecapped atlimit(999+),show, andanchored: trueto sit over the top right corner of its host (the children). One view replacesBadgeDotandBadgeLabeled, which still work. - Link (#174).
widget: Linkis primary text inbody_mediumby default withhref(opened byopen_url, so only web and mail links), a two-wayvisited(andstate: visitedin rules),disabled, andunderline(hoverby default: under the pointer or the keyboard focus,always,never). - Progress indicators (#143, #144, #145).
LinearProgressandCircularProgresswith novalue(or an expression that gives nothing) are a wait with no end (the builder had always made them a bar at 0); newtrack, linearbufferandstop_indicator, andlabel; a screen reader hears busy, or the value as a percentage. - Checkbox, RadioButton, Switch (#175, #176, #177).
label(beside the control, part of what you press),error(checkbox and radio), a Checkbox that is neither on nor off (checked: null), Switchicons, and the colour isstyle.foreground. A patch no longer reset a control's own accessibility states (checked,value) to nothing. - Slider (#178).
min,maxandstep(the builder ignored them),ticks,value_indicator,label, andon_inputfor every step of a drag; a boundvaluenow follows the drag instead of waiting for its end. A bound value is written before the node's handlers run, so a handler reads what the user just did. - SegmentedButton (#193).
widget: SegmentedButtonwithoptions, a two-wayselectedandmultiple, written in the view language (the first shipped component that is built from the language's own parts: per-corner pill,focus_group, icons, handlers that set a Signal). Ana11y: rolemay be worked out from a param (never from a Signal), and a roving focus group starts on its checked item. - Tabs (#166, #167).
widget: Tabswithtabs, a two-wayselected,variant(primary, secondary) andtab_width: a shipped view with icons, badges, an indicator that slides, and arrows/Home/End that move and choose. A bar that scrolls waits for the engine to scroll sideways. - Several windows (#105).
app.open_window(view, modal=, parent=)opens a view in a window of its own (tre 0.5.6 opens windows while the app runs), withapp.windows,app.window_of,app.close_window, and the handleropen_window(view[, modal]). Window handlers act on their own window; a modal window dims and blocks its parent; closing the main window closes them all. - Animated gradient focus borders (step 81).
App(focus_ring="gradient")turns the keyboard focus ring into a sweep gradient through the theme's secondary, primary and tertiary, one turn in three seconds (tesserae.focusring). Still when motion is reduced. ATextField's focused border is a style rule and stays solid. - Frosted navigation, search and menus (step 72).
frosted: trueonNavigationRail,NavigationDrawer,NavigationDrawerModal,Menu,SearchBar,SearchViewandTopAppBarmakes the surface 72% of its colour with a 20 pixelbackdrop_blur, so what is behind shows through softly. Off by default (Material 3 has solid surfaces). - Icon toggles that morph (step 55).
transition: {icon: ms}on anIconeases a changed glyph into the next (tre morphs a path'sdata);IconButtonuses it forselected_icon. Glyphs from different sets switch at once. - Ripple as a shader (step 48).
App(ripple="shader")draws the press ripple with one anti-aliased fill shader per node (three presses at once, Material Web's timing) instead of a circle node per press (tesserae.ripple). The default staysnodes. - Routed views: nested routes, guards and lazy screens. A routed call inside a routed view is a nested screen under its parent's path;
route:may be a mapping withpath,guard,redirectandlazy;app.guard(screen, check)is the same from Python. A lazy screen's view is built when first reached. - Window:
remember.remember: true(or a name) keeps the window's size, place and maximized state in the user's config directory and puts them back next run (tesserae.windowstate;TESSERAE_STATE_DIRmoves it). Position is saved only where the platform reports one. - Toolbar:
fit. Items that do not fit the width move into the overflow menu. It needed a way to know a size, so aContainergainsmeasured_widthandmeasured_height: outputs, written after layout and when the window resizes, bound like a scroll view'sat_top. - SplitButton: the keyboard. Arrow-down on either part opens the menu and moves the focus to its first row.
Overlaygainsfocus_first(andMenupasses it on) for any layer that should take the focus when it opens. - Routed views (#208). A view call with a
route:is a screen in a window view written in the current language (it was only wired for the old syntax);app.paramsgives the screen the params it was reached with (a route likenotes/{id:int}, back and forward restoring them), and the handlersnavigate_to(screen, params)andnavigate_route(path)go there. - Dialog: the full-screen form.
fullscreen: trueonDialogfills the window onsurfacewith a close button, the headline and the actions along the top and the content scrolling under them; it followsapp.width_classwhen written so. - Window (#204).
kind: Windowandwidget: Windowtakefullscreen,maximized,transparent,blur_behindandclick_through, applied when the view loads and only when written (the size classes were #230). - Video (#198). An
Imagenow shows itsframein a view (it was refused as "not drawn yet"), andwidget: VideoPlayerputs a play/pause button, the time, a seek slider, a mute button, a buffering ring and a caption band under it. The app decodes and supplies frames; the player owns none of the playing. - Toolbar (#172, #173).
widget: Toolbar: docked (64 tall, full width) or floating (a pill with a shadow, a row or a column), standard or vibrant, withIconButtonitems, an overflowMenu, an end action button, your own content in a slot, andhiddento fade it out of the tab order.IconButtongainstint, a colour role for a standard button's icon. - SplitButton (#124 to #128).
widget: SplitButton: a main action and a menu button joined, in all five Button types and sizes, with aMenuunder the trailing part whose chevron turns over while it is open. - NodeGraph (#202).
snap(to a grid),arrows,fit(show every node), choosing a node, and a fit-to-view method. - DatePicker (#186, #187, #188, #189).
DatePicker(the modal dialog: a month grid, a typed date, Cancel and OK) andDatePickerDay(one day, in all its states). The expression language gainsdate_add_days,date_weekday,days_in_month,format_dateandcurrent_date. - TopAppBar (#165).
TopAppBarin four sizes (small, centre, medium, large) with a navigation icon, up to three labelled actions, a collapse to the small form and the on-scroll colour. - TextField, what was left (#244). The label glides, a filled field has 4 pixel top corners and a square bottom, the input is described by the help line, and
suggestionsoffers autocomplete in aMenuunder the field. - Dock (#206, #207). A
DockPanelcan beclosable(a close button on its tab) and aDocktakes a two-wayclosedlist of the names of the shut panels: closing adds a name, removing one opens the panel again. - Tree (#157, #158).
Tree(branches that open to show their children, from nested data, withexpandedandselectedtwo-way and the tree keyboard),TreeNode(a branch or a leaf row) andTreeLevel. - Carousel (#199).
Carousel(uncontained, multi-browse, hero and centre hero rows of rounded items that scroll sideways and settle on one). AScrollViewtakessnapand any node asnap_alignstyle (tre 0.5.6's scroll snap). - Accordion (#156).
Accordion(a header button with a chevron that turns, and content while it is open) andAccordionGroup(single or multiple open, dividers, arrows between headers). - Search (#170, #171).
SearchBar(a pill with a leading icon or menu button, a clear button, a trailing icon, an avatar, a two-wayqueryandactive) andSearchView(the docked panel of rows under it, with an empty state and the result count announced). - NavigationDrawer (#163, #164).
NavigationDrawer(standard, collapses by easing its width),NavigationDrawerModal,NavigationDrawerScreens(the app's screens) andNavigationDrawerItem, with sections, dividers, badges, header and footer slots and a list that scrolls. - Menu (#168, #169).
Menu(an anchoredOverlayof rows with icons, shortcuts, checks, dividers, headings and submenus) andMenuItem. AnOverlay'sanchoris looked up in the view that called it when it is not found in its own (a menu names its button in the calling view), andanchor: parentsits against the node the overlay is written inside. - TimePicker (#190, #191, #192, #194).
TimePicker(the dialog),TimeInput(typed hour and minute),PeriodSelector(AM / PM, one view for both states), and the dial gains a two-waymode. A view'sstate:may be seeded from the view's params; aTextFieldtakes anon_edithandler; reconcile now notices a changed SpinBox option or dial mode. - SpinBox (#185). Holding a button repeats the step, Page Up and Page Down step ten at a time,
wrapgoes round the ends,decimals,prefixandsuffixformat the number, andSpinBoxFieldadds a visible label and supporting or error text. - Snackbar (#146).
Snackbar(a message near the bottom that goes by itself, with an action and a close) andSnackbarHost(several, one after another). AnOverlaytakes atimeout(it closes itself, held off while the pointer is over it) and anon_dismisshandler. - SideSheet (#154, #155).
SideSheet(standard, inline, its width eases),SideSheetModal(over a scrim, from either side) and the sharedSideSheetPanel: a title, a back and a close button, scrolling content and actions. - Chip (#179 to #183).
widget: Chip(assist, filter, input, suggestion; icon, avatar, elevated, a close button) andwidget: ChipGroup(none,single,multipleandinputmodes, wrapping, arrows). A view can take ahandlerparameter: the caller's action or statements, which the view runs by calling the parameter by name (on_remove()). - Pagination (#200).
widget: Paginationwith a two-waypage,pages,compactanddots: the numbers with an ellipsis, the current page filled, previous and next disabled at the ends. - Title bar (#205). The window buttons show a tooltip (Minimize, Maximize, Close); a
widget: Tabs,TextFieldorIconButtonin the bar's children works. A node's spec may carry atooltip, which the composed view shows. - Card (#148, #149, #150).
widget: Cardwithvariant(elevated, filled, outlined),headline,subhead,text,media, anactionsslot,actionableandselected.interaction:may now be an expression worked out from the view's params when the view is composed (never from a Signal). - NavigationRail (#159, #160, #161, #162).
NavigationRailwithitems,selected,expanded,alignmentandheader/footerslots;NavigationRailItemwith a badge;NavigationRailScreensandNavigationRailScreenfor the app's screens (app.current_screen,navigate_to). A focus group starts on the item that is current. - ListItem (#153).
widget: ListItemwith a headline, supporting text and overline (56, 72 or 88 pixels), a leading icon, avatar or picture, trailing text or icon,leadingandtrailingslots,selectable/selected,disabledand adivider. - StatusBar (#201).
widget: StatusBarwithitemsat the start, centre and end (text, icon, tooltip, pressable ones that setclicked), aprogressorbusyedge, announced politely. - Fab (#133 to #140).
widget: Fabwithicon,label(the extended form),variant(primary, secondary, tertiary, surface),size(small, medium, large),collapsedanddisabled; it rests at elevation 3, lifts to 4 on hover and settles on press. - Model parameters of a view may be written by the view even when the call gave an expression: the view holds its own copy, which follows the expression whenever it changes.
Buttongainsflip(off, a toggle leaves flipping to the caller). - IconButton (#129, #130, #131, #132).
widget: IconButtonwithvariant(standard, filled, tonal, outlined), five sizes, three widths,shape,toggle/selectedwith aselected_icon,disabled; itslabelis its accessible name and tooltip. A handler a call gives for an event the called view's root handles itself now runs after the view's own (a toggle flips, then youron_clickruns). - ButtonGroup (#123).
widget: ButtonGroupwithitems,mode(none, single, multiple),selected,chosen,variant,size,connectedandorientation. A model parameter nobody binds now holds its own value (a view's handlers may write it), a style given as an expression that works out to nothing leaves the field to the stylesheet, and a focus group starts on the item that is pressed. - Dialog (#151).
widget: Dialogwithopen,headline,text,icon,actions, a two-wayresult,dismissibleand your own content as children; a shipped view on a modalOverlay. AScrollViewwith amax_height(ormax_width) and no size of its own is now as long as its content up to that limit. - Tooltip (#147). A rich
tooltip:takesplacementand up to twoactions; it stays while the pointer moves onto it, closes when an action is pressed, and a long press shows it. - Button (#118, #119, #120, #121, #122).
widget: Buttonwithvariant(filled, tonal, elevated, outlined, text), five sizes,shape, icons,toggle/selected,loadinganddisabled; as wide as its label; lifts on hover; a pressed pill squares off. A shipped view with a stylesheet.ContainerandRecttakedisabled. - ScrollView
orientation: horizontal. A strip that scrolls sideways: children in a row, the offset along x,scroll_directionrightorleft,at_top/at_endfor the start and end of the strip. - Requires tre 0.5.6. Timers run on the window's own
afterandevery; layouttransition:is the engine's own animation (a change to or fromautoor a percentage is made at once); the accessibility states (pressed,invalid,description,current,busy,value_text, relations) are set on the node, and aDivideris aseparator. The hand-stepped layout transitions and the dropped-state tolerance are gone. Scroll snap points are asked of tre (mindderivative/tre#166); ascroll_viewwithorientation="horizontal"already scrolls sideways.
Removed¶
tests/test_binding_parity.pyand its recording: they assertedtre's quirks (1 == 1.0false, 64-bit wraparound, no unary minus).
Added¶
tests/test_expr.py: the grammar table row by row, every limit, an escape corpus of about 190 inputs run as expressions and as handlers, grammar-based and mutation fuzzers, and a manual mutation check of the sandbox rules (each rule switched off fails a test).
0.4.6¶
The removal stubs are removed (#113).
Removed¶
- The messages for the names 0.4.5 removed:
tesserae._removed(RemovedError),tesserae.shell, and theuse_shell,load_shellanddecorationsmembers ofAppthat only raised them, the--shellargument oftesserae new, and the_Shell.yamlcheck inApp.load. An old name now fails as any unknown name does (TypeError,AttributeError,ModuleNotFoundError, "unrecognized arguments"); Migrating says what replaced each. Nothing that works changes.
Added¶
tests/test_no_shell_left.pykeeps the shell file,AppShellanddecorationsout of the code, the examples, the tools and the workflows.
0.4.5¶
One way to describe a window (#103). The shell file, AppShell and
decorations= are removed in the phases below; this release is breaking, and Migrating says how to move.
Documentation¶
- Windows, Docks & Embedded Views is the guide for the window frame; App Shell & Docking is now Docking from Python
(
guide/docking.md), abouttesserae.docking.Dockalone. The tutorials, the CLI, hot reload, editor support, projects and custom title bar pages, the README andARCHITECTURE.mddescribe the window view. Migrating has the step-by-step for a shell file,AppShellanddecorations. - CI and the release workflow run
examples/window_dockand buildtesserae new --windowapps in place of the shell ones.
Removed¶
-
The shell file:
*_Shell.yaml,App.load_shell, its hot reload, its schema (tesserae-shell-schema.json, in the package, the site andtesserae schema), its project folder kind, thetesserae new --shelltemplate and flag, and theexamples/app_shell_fileexample. Each says what replaces it (akind: Windowview) when it is used. -
The Python app shell:
tesserae.shell.AppShellandApp.use_shell, and theexamples/app_shellexample.tesserae.docking.Dockstays, for docking panels from Python. Using either removed name says what replaces it. -
decorations:App(decorations=)andapp.decorations(the opposite ofborderless, which is the one name now:App(borderless=True),app.borderless,borderless: trueon akind: Window).app.decorationsandApp(decorations=)raise an error saying so.tre's ownWindow(decorations=)is the engine's and is unchanged.
Changed¶
- A removed name says what replaces it.
decorations=,app.decorations,App.load_shell,App.use_shell,AppShell, a*_Shell.yamlandtesserae new --shellraise aRemovedError(aValueError) naming the replacement and the migration page, instead of anAttributeErrorthat says nothing. The messages are intesserae._removed.
0.4.4¶
A window, a dock and embedded views in the same YAML as every other view (#95).
Added¶
kind: Dockandkind: DockPanel: panels docked around the middle of a view. ADockholdsDockPanels, each in the zone itsstyle: {zone: left|right|top|bottom|center}names (zoneis a style field, and an error anywhere but on aDockPanelin aDock); a left or right zone is its panel'swidthwide, a top or bottom one itsheighthigh. Panels sharing a zone are its tabs, titled bytitle:, which the user drags to another zone; a handle between a zone and the middle resizes it (drag, or the arrow keys, Home and End). ADockPanelinside aDockPanelis a split of it, side by side or top and bottom (flex_direction), with a handle between the halves, which can be split again. A reload leaves a panel the user moved, and the sizes they set, where they are, and adds, removes, renames and moves panels the file changes.view.dock_host("dock")haslayout()andrestore(layout)(zones, tabs, sizes and splits as plain data),size(side)andset_size(side, size). One dock per window; it doesn't depend on the app shell or the shell file. Not yet: dropping a dragged panel onto a split half (a drag docks into the five zones).- Routed views:
- {id: settings, view: Settings_View.yaml, route: settings}in a window view makes the view a screen of the app: registered under its name (Settings) and the route, shown in its node while it is current, and hidden (out of the layout, with its state) when it isn't.app.navigate,show,navigate_to,backand the history work as before. New handlersnavigate.<Screen>,navigate.backandnavigate.forwarddo them from YAML,app.current_screenis a value bindings can read, and a colour binding can name a theme role.NavigationRailScreens(andNavigationRailScreen) is a navigation rail whose destinations go to screens and show which is current. A window view and an app shell can't both be the frame. kind: Window: the root of a*_View.yamlthat is the whole OS window, withtitle:,borderless:,min_width:,min_height:, atitle_bar:(aTitleBar's keys; the window's own whenborderless),children:for the content, andstyle:width/heightfor the window's size andbackgroundfor its colour.app.load("Window")(orApp(window_view="Window")) loads it, sets the OS window from it, and mounts it for good; it needs no ViewModel. There is one per app, and it can't be nested or embedded. Editing it while the app runs sets the window again.borderlessis the new name for an OS window without its title bar and borders:App(borderless=True)andapp.borderless(decorationsstill works).- A
TitleBarin a dialog or a sheet:buttons: [dismiss]makes a bar with no window buttons, no OS-controls room and no drag region, whose button closes the surface it is in (surface.dismiss, a new handler next towindow.*;dismiss_surface(node)from Python).ViewDialog(window, "Settings_View.yaml")is a dialog whose content is a view, with or without a ViewModel (.content,.viewmodel). A view with no ViewModel now has itswindow.*andsurface.*handlers wired, so a title bar's buttons work in a static view. An embedded view takes the colours when its host is re-coloured. tesserae new --windowmakes a project whose app is oneWindow_View.yaml: a title bar, aNavigationRailScreensand two routed screens, Main and Settings (--custom-title-barmakes itborderless).tesserae add screenin such a project says whichview:node to add to the window instead of editingapp.py.- Style fields in sections: the YAML reference's style table, and the schema (an
x-groupon each field, and the group in its description, so autocomplete shows it), put each field in one of Size and spacing, Flex, Alignment, Grid, Position, Docking, and Paint and effects. Files stay flat.tesserae.spec.cascade.STYLE_GROUPSlists them, and a test keeps every field in one. examples/window_dock/: the studio ofexamples/app_shell_file/written as oneWindow_View.yaml(title bar, rail, a dock ofview:panels, routed screens, status bar), with no widgets made in Python. It checks itself, and the tests read what it draws back from the window's snapshot.- A guide page, Windows, Docks & Embedded Views, and component pages for Window, Title bar, Dock, Dock panel and Routed views.
view:shows another*_View.yamlwhere it is:- {id: left, view: Left_View.yaml, with: {size: 3}, style: {width: 220}}(or by name in a project). It is a view of its own, with its own ids and its own ViewModel when there is one (Left_ViewModel.py), and it needs none: a view with no ViewModel is static.view.embedded(id)andview.viewmodelread them from Python;tesserae.component.embedis the function. See Components & Embedding.
0.4.3.3¶
tre 0.5.5 (#94).
Requirements¶
tre0.5.5 or newer, below 0.6 (0.4.3.2 needed 0.5.4). On KDE Wayland, tre 0.5.4 presented every frame with a vsync barrier, and while a window was being resized the compositor then held back the next resize for up to a second, so the window trailed the mouse and kept catching up after the button was released: undecorated and native windows both. 0.5.5 presents without the barrier while a window is being resized and goes back to vsync after it. Tesserae's code is unchanged.
0.4.3.2¶
A TextField in dark mode (#93).
Fixed¶
- A
TextField's text was dark in a dark scheme, dark ink on a dark field. What is typed is the theme'son_surfacenow (or the style'sforeground, if it has one), and the caret is the theme'sprimary, and both follow the app between light and dark. - A sweep of every component for the same fault found no other: in both schemes no component's text or icon is
unreadable against what is behind it, and a component built in one scheme and switched to the other by the app
looks as one built in it (
tests/test_component_colours.py).
Added¶
- Text fields has a component page (it was missing): the
TextFieldnode kind, how its colours come from the theme, binding it two ways, and its limits. The Components index names a node kind (kind: TextField,kind: Svg) where it used to say "Python only".
0.4.3.1¶
Style files (#92).
Changed¶
- A
*_Style.yamlsays what it is. Its fields go under astyle:key, with an optionalid:naming the style, like the style in a view:{id: row_style, style: {flex_direction: horizontal, gap: 8}}. A file that is only the fields still works, so nothing has to change.
Added¶
tesserae-style-schema.json, a schema for*_Style.yaml(tesserae schemalists it,--settingsmaps it), so an editor checks a style file and says what each field is. The tutorials'row_Style.yamluse the new form.
0.4.3¶
Documentation (#91).
Added¶
- Tutorial: The Same App as a Project builds the Tutorial's Tasks app as the project
tesserae newmakes, in six steps (examples/tutorial_project/, run by the tests): files inViews/,ViewModels/,Components/,Themes/andStyles/found by name,Repeaterrows by name, a theme and stylesheet by name,tesserae add screen, a shell by name, with a table comparing a flat folder with a project. The flat Tutorial and the Getting Started, Overview and Projects pages point to each other.
Fixed¶
- The Projects guide listed the
Repeaterandinstantiaterow twice.
0.4.2¶
Names for lists and embedded components (#89), SVG (#88), and what the engine's 0.5.4 adds (#90): gradients and effects, rich text, touch and files, window options, the OS's preferences for less motion and more contrast.
Requirements¶
tre0.5.4 or newer, below 0.6 (0.4.1 needed 0.5.1). 0.5.4 adds thesvgnode, and lays a text node's width out rounded up so a width frommeasure_textfits its text.
Added¶
kind: Svg: the engine draws a whole SVG document (shapes, gradients, patterns, clips, masks, text, a blur or drop-shadow filter), scaled to fit its box.svg: {src: logo.svg}is a.svgor.svgzfile next to the view,svg: {content: "<svg ...>"}the document itself, andstyle.foregroundis whatcurrentColormeans, so a monochrome icon follows the theme. Tesserae decodes the raster pictures in a document (<image href="...">: PNG, JPEG, GIF, WebP) for the engine, which decodes no image format: found next to the SVG file and inside the view's folder, at most 8192 pixels on a side, adata:URL's picture too (itshrefis rewritten to a key of its own). A picture that can't be found or decoded is an error naming it. Hot reload watches the file and its pictures.tesserae.widgets.svg(window, source, width, height, color=)is the Python form.Repeaterandinstantiatefind views and ViewModels by name, asapp.loaddoes:Repeater(view, items, "Row", into=node)andinstantiate(view, "Row", into=node)useViews/Row_View.yamlandRowViewModel, found in the app's project.viewmodel_clsandintoare now optional in the signature (intois still needed: it is an error without it), and a path and a class still work. A name with no app is an error that says there is no project. One function intesserae.project(resolve_view) does the resolving forapp.load,instantiateandRepeater.- Gradients in a style's
background,foregroundandborder_color: a CSS-like string (linear-gradient(90deg, primary, tertiary),radial-gradient(at 30% 30%, ...),conic-gradient(from 90deg, ...), stops that are theme roles or colours, with optional places) or a mapping ({gradient: linear, angle: 90, stops: [...]}). See Gradients & Effects. - Effects as style keys:
blur,backdrop_blur(with a translucentbackground, a frosted surface),blend_mode(CSS's sixteen),filter(saturate,brightness,contrast,grayscale,hue_rotate,invert,sepia),sticky(a sticky header in a scroll view) andcursor(a name, or{src: file.png, hotspot: [x, y]}read with the view). - Rich text:
text.runsmakes aTextof styled pieces (color,weight,italic,underline,strikethrough,font_size,font_family,link), measured run by run; a run with alinkisprimaryand underlined and calls the node'son_linkhandler withevent.href.text.selectable: truelets the user select and copy aText. See Rich Text & Links. - Touch, gestures and files as handlers:
on_tap,on_long_press,on_pan,on_pinch,on_touch_start,on_touch_move,on_touch_end,on_touch_cancel,on_file_hover,on_file_hover_cancel,on_file_dropandon_link, andapp.on_file_drop(handler)for a drop anywhere on the window. See Touch, Gestures & Files. - Window options on
App:dpi_scaling(on by default),present_mode,transparent,blur_behind,click_through,glyph_cacheandsystem_fonts(alsotesserae.set_system_fonts()), withapp.scale_factorandapp.transparent_active. See Window Options & the OS. - The OS's wishes:
reduced_motionandhigh_contrastfollow the OS (or are fixed) and can be set withapp.set_reduced_motion()andapp.set_high_contrast(). Reduced motion makes every animation take no time and stops the indeterminate indicators; high contrast re-themes at the highest contrast level (Theme.contrast,tokens.color_scheme(contrast=)).tesserae.motion.duration(window, ms)is for your own animations. - A spring easing:
Theme.easing("spring")andTheme.spring(bounce). - Frame statistics:
app.frame_stats(),app.profile_nodes,app.start_trace(path)/stop_trace(),app.stats_handle(), andapp.stats_overlay = True(orTESSERAE_STATS=1) for a readout of the frame rate in the window.
Changed¶
- A window is scaled to its screen by default (
App(dpi_scaling=False)is the old way), and colours are drawn exactly as written. See Migrating.
0.4.1¶
Projects (#87).
Added¶
- A project's files are found by name.
Views/,ViewModels/,Components/,Themes/andStyles/under the app's root are the standard places:app.load("Main")findsViews/Main_View.yamlandViewModels/Main_ViewModel.py(classMainViewModel),component: Name,App(custom_theme="Name"),stylesheet="Name",app.load_shell("Name"), a shell panel's view and astyle: x_Style.yamlfind theirs.App(root=)is the root (the script's folder by default),search=[...]adds folders,recursive=Truelooks through the whole project, and a name in two places is an error naming both. Paths still work.app.projectis thetesserae.project.Project. app.load(view)takes the ViewModel class from the view's name when it isn't given.
Changed¶
tesserae new <name>makes a project: a.venvwith Tesserae installed in it (--no-venvskips it), the five folders,app.py, and aMainscreen inViews/andViewModels/.tesserae add screenwrites into those folders and loads the screen by name. An app laid out the old way still works, andadd screenfollows its layout.
0.4.0¶
A simpler layout vocabulary (#86). Breaking: see Migrating.
Changed¶
align_contentplaces a node's children as one of nine positions (top_lefttobottom_right), replacingalign_itemsandjustify_content;spread(between,around,evenly) shares out the room along the layout;flex(none,expand_horizontal,expand_vertical,fill) is a node's own sizing, replacingflex_grow,flex_shrinkandflex_basis;align_selftakes the nine positions.align_wrapped(a wrapping node's lines), andalign_tracksandalign_cells(a grid's tracks, and where items sit in their cells) are for the nodes that have them; they replace the oldalign_content,justify_contentandjustify_itemsthere. The engine's names are refused, with what replaces each.- A node is never squeezed unless it says so (
flex: noneis the default). Every hand-madeflex_shrink: 0is gone from the built-in components, bars and widgets. Two built-in components that were being squeezed look right now: a selected filter chip's check mark is 18 px, not 14, and a dialog's headline has its height. - The 77 built-in components, the title bar, the tutorial, the examples and the guide use the new names.
tesserae.spec.layoutturns them into the engine's in one place.
0.3.6¶
text_align on the built-in labels (#85).
Fixed¶
text_align: centerandendwork on aTextwith no width. The engine aligns text within the width it is laid out in, and aTextsized to its text has no room to move in, so a centred label was drawn at the left of its button. ATextthat iscenterorendaligned and has nowidthof its own now fills its parent's width, with its text's width as the least. The built-in centred labels (buttons, chips, split buttons, badges, date and period cells) are plaintext_align: centeragain, with nowrap: none(0.3.5 gave them it, which stopped the alignment).
0.3.5¶
Text that wrapped when it shouldn't (#84).
Fixed¶
- A label no longer wraps onto a second line when it fits. A
TextorLinkwith nowidthis measured to fit its text, and the engine rounds an explicit width down to a whole pixel, so a label a fraction of a pixel wider than its box wrapped:ButtonFilledwithlabel: Add a taskshowed "Add a / task" at any button width. Measured sizes are rounded up now, for everykind: Text,Link,tesserae.widgets.textand dock tab.
Added¶
text: {wrap: word | none, overflow: clip | ellipsis}onTextandLink.wrap: nonekeeps one line,overflow: ellipsisends a line that doesn't fit with an ellipsis. In the schema, the YAML reference and the layout guide. TheTextandLinkcomponents take them as parameters.
Changed¶
- The labels of the built-in components are single lines. Buttons, chips, split buttons, badges, tooltips, list, menu, tree and drawer items, date and period cells, and the accordion, top and status bars end a label that doesn't fit with an ellipsis; extended FABs, rail items and tabs keep one line without one. A dialog's words and a snackbar's message still wrap. A test lays every component out with short and long labels and fails if one wraps.
- A button's or chip's stylesheet has 12 px of padding either side of the label.
0.3.4¶
The documentation, rebuilt (#83), and the stylesheets of the built-in components.
Added¶
- A stylesheet for each built-in component. Every
<Name>_Component.yamlnow holds a component's structure, and its look is in<Name>_Stylesheet.yaml: a list of{id: <part>, style: {...}}rules whose values may be the component's{{ parameters }}. What a component expands to is unchanged. A<Name>_Stylesheet.yamlnext to your views goes over the built-in one, field by field. - Your own fragments are found next to the view. A
*_Component.yaml(and its stylesheet) in a view's folder is used bycomponent:with nocomponent_dirs=. - Documentation: a generated Python API and YAML reference (the page is now the TDL reference); a page for
each of 43 MD3 components and 76 stylesheets; a
Themes page; a Tutorial; Migrating; and a guide to the
tesseraecommand. Tests keep the generated pages current and run every example on them. - The theme schema also covers
*_Stylesheet.yaml(including a component's) and*_Theme.yamlintesserae schema --settings.
Changed¶
- Getting Started is shorter; the Guide, Installation and Architecture pages describe what Tesserae is, with no release or milestone history (that is here and in Migrating).
- Docstrings that appear on the API page are free of history.
0.3.3¶
Three things a user found testing: the shell's bars, theme roles without a theme, and styling the shell's parts.
Added¶
- Every part of a shell takes a
style:(#81): the shell itself,top_bar,navigation,status_bar,contentand each zone ({size, style}), in a*_Shell.yamland in code (style=ontop_app_bar,status_barandnavigation_rail;AppShell(styles=);shell.set_style). The top bar's height was impossible to set before. Hot reload applies a changed style and puts back the shell's own values when one is removed. The shell schema knows them.
Fixed¶
- A shell's top bar and status bar no longer shrink when the window is
short (#80). They
kept
tre's defaultflex_shrinkof 1, so a short window squeezed the top bar from 64 px down to its title's height (28) and the status bar from 24 to 16. They are fixed-height bars now, wherever they are placed. (The navigation rail never shrank.)
Changed¶
- Theme roles work in an app with no
theme_seed(#82).background: surface, and the built-inkind: TitleBar, failed there with "unknown color identifier". A view with no theme resolves roles from MD3's baseline palette (the light one), as an unthemed widget already did; atheme_seed=still themes the app and lets it follow light and dark. A misspelt role now says what was meant (did you mean 'surface'?); a name that is no role keepstre's wording.
0.3.2¶
YAML schemas for editors (#79),
tre 0.5.1, and the work-around for the bug it fixed off by default
(#78).
Requirements¶
tre0.5.1 or newer, below 0.6 (0.3.1 needed 0.5.0.1). 0.5.1 lets other Python threads run while a window sits idle (tre#92), the cause of the hot-reload stall 0.3.1 worked around. It also addstre.Shaderand paintsfill, borders andcorner_radiuson more node kinds than before; Tesserae sets none of those on a kind that used to ignore them, so nothing in its views changes.
Added¶
- YAML schemas for Red Hat's YAML language server (#79):
tesserae-yaml-schema.json(a view), andtesserae-shell-schema.json,tesserae-component-schema.jsonandtesserae-theme-schema.json, JSON Schema draft-07. An editor suggests node kinds, style fields, colour roles, layout values and a built-in fragment's parameters, shows what each means, and flags a typo. They come with the package, are published athttps://mindderivative.github.io/tesserae/schema/, and are written bytools/generate_yaml_schema.pyfrom Tesserae's own code. New command:tesserae schemasays where they are, andtesserae schema --settingsprints theyaml.schemassetting. See Editor Support.
Changed¶
run(keepalive=)is off by default, where 0.3.1 turned it on withhot_reload=True. A hot-reload watcher, or any thread callingthread_handle().call_soon, now reaches an idle window without a tick.Trueand a number still tick, for code that wants the loop woken regularly;Noneis accepted asFalse. A thread busy running Python can delay a wake-up by up to about 5 ms (the GIL's switch interval).
Tests¶
- The two tests that held an idle window with no keepalive, written to
fail once
trewas fixed, are gone;test_keepalive_idle.pynow checks that threads and hot reload reach an idle window with the default.
0.3.1¶
Things the new Getting Started walk-through ran into (#72).
Added¶
App.run()needs no screen (#73). It starts when the window has something to show: a screenshow()made current, or nodes added toapp.window.rootby calls. An app built entirely in Python no longer has to make an emptyViewfirst, and an empty window runs. Registering screens and showing none is still aRuntimeError, now saying both ways out (an undecorated window's border doesn't count as content).-
text_alignin a YAMLtext:block (#74):start(the default),centerorend, on aTextand aLink, astrenames it. Before, the key was silently ignored. A wrong value is an error naming the widget, and aTextFielddoesn't take it. -
run(keepalive=), on by default withhot_reload=True(#77).tre's window, left idle, stops other Python threads from running, so a hot-reload watcher couldn't hand a reload over until something else woke the window: an edit to a view could sit unseen while the window was dragged, resized and clicked.keepalivekeeps the window ticking (every 0.02 s, or the seconds you give).None, the default, followshot_reload;TrueandFalsechoose, so anything else that needs threads to run in an idle window (an IDE, say) can use it without hot reload. A work-around fortre: oncetreis fixed the default becomes off. Found by a user trying Getting Started. - A closest-match hint on a misspelt name (#76): a misspelt style
field, node field,
kindora11yfield now says what was probably meant, as inunknown style field(s) ['foregorund'] -- did you mean 'foreground'?. A name that resembles nothing is not guessed at. Hot reload logs it the same way.
Documentation¶
- The Getting Started page walks from a fresh Linux install to a first
window and node, declaratively and imperatively, with runnable programs
in
examples/getting_started/; the API page listsApp's window options, routing members andApp.of; the index, README and installation pages are brought up to 0.3.
0.3.0¶
Custom windowing on tre 0.5.0.1: Tesserae draws the window's title bar and
borders (#24).
Following the custom-windowing design.
Requirements¶
tre0.5.0.1 or newer, below 0.6 (0.2.x needed 0.4.4 or newer, below 0.5). 0.5.0.1 rather than 0.5.0: a real click in a text field panicked (RefCell already borrowed) intre0.4.4 and 0.5.0, and 0.5.0.1 fixes it (#63,tre#51).
Checked by hand¶
Moving, resizing, maximizing, the buttons and the window border were tried by hand on Linux, under X11 (it found the text-field panic above and an example's overlapping text, #62). Wayland, Windows and macOS were checked by the headless tests and by CI, which builds and runs a custom-title-bar app on each, but not by hand: tell us if a title bar misbehaves on one of them.
Added¶
- The window on
App(#40):decorations(a window with no OS title bar or borders, for a title bar the app draws),resize_border(6 px by default when undecorated),min_width/min_height,fullscreen,system_menuandicon(an image file), asAppoptions and live properties, andapp.platform. The actionsminimize(),maximize(),restore(),toggle_maximized()andclose(), andapp.maximizedandapp.activeas read-only Computeds for bindings. - Title bars in YAML (#41):
kind: TitleBar(icon, title, the app's own content, and minimize, maximize/restore and close buttons; Material 3 colours by class, faded while the window isn't focused; on macOS, room for the traffic lights);window_region: drag | noneon any node; the handlerswindow.minimize,window.maximize,window.restore,window.toggle_maximizedandwindow.close;app.titlebar_insetandapp.native_controls. Three window glyphs in the icon set, andvisiblecan be bound. A TitleBar hot-reloads. - Undecorated app shells (#42):
in an undecorated app the shell's top bar is the title bar
(
top_app_bar(..., window_controls=), from code or a shell file, which hot-reloads as one); a 1 px window border inoutline_variant, hidden while maximized or fullscreen and on macOS (window_border, and thewindow_borderclass);tesserae new --shell --custom-title-bar; andexamples/custom_title_bar. - A "Custom Title Bars" guide (#59), bringing the title bar, the border and each platform's differences together.
Changed¶
- Every pressed widget (state layers, the split button, splitters, dock
tabs, sliders and other drags) releases on
pointer_cancel, whichtre0.5.0 sends when the OS takes a press, as onpointer_up.
0.2.1¶
Releasing an app (M77, M78) and tre 0.4.3 and 0.4.4 (M79, M80), tracked
from here on in the GitHub project
(release #23).
Requirements¶
tre0.4.4 or newer, below 0.5 (was 0.4.2 or newer).tre0.5, with custom windowing, comes with Tesserae 0.3.0.
Added¶
tesserae build: an app as one executable, which its users run with nothing else installed.pip install "tesserae-ui[build]"adds PyInstaller;--checkruns the result and checks it draws frames. Built and checked in CI on Linux, macOS and Windows. See Releasing Your App.tesserae build --installer: the platform's installer, from a one-folder build. On macOS, a.app(its version, identifier and publisher inInfo.plist) in a.dmg. On Windows, an Inno Setup installer that needs no admin rights, with a Start-menu entry and an uninstaller; Tesserae fetches a pinned Inno Setup if there's none. On Linux, an AppImage, a.deb, a pacman package, an.rpmand a Flatpak (the.deband pacman package written by Tesserae,appimagetoolfetched and pinned, the.rpmand Flatpak made whenrpmbuildandflatpak-builderare installed, and reported otherwise). A PNG--iconworks on every platform.- The Releasing Your App guide: building, what goes in, each installer and how its users install and uninstall it, and signing and notarizing with your own certificates.
TESSERAE_MAX_FRAMES=nstopsapp.run()afternframes, andTESSERAE_FRAMES_REPORT=<file>writes how many it drew, for automated runs.
Changed¶
- A built (frozen) app runs without hot reload, which has no source files to watch.
- On macOS,
tesserae buildwithout--installermakes only the single executable, which runs from a terminal; PyInstaller 7 won't make a.appfrom one file, so the.appcomes with--installer. - A bare number as a grid track list (
grid_auto_rows: 96) is passed totre, which takes it since 0.4.3; Tesserae no longer converts it. - On
tre0.4.4, scrolling chains as in a browser: a wheel or scroll key an innerScrollViewcan't use (at its end, or its content fits) goes to the one outside it. - On
tre0.4.3, ascroll_offsetset past the end is held at the end at once (and written back throughtwo_way), and scroll keys held with Ctrl, Alt or Meta no longer scroll.
Fixed¶
- Hot reload no longer reads a file in the middle of a save. On macOS a save could arrive as one event while the file was still empty, so a reload failed ("'NoneType' object has no attribute 'get'") and missed the edit; the watchers now wait for a change to settle (#39).
0.2.0¶
Everything since 0.1.0 (M53-M76).
Requirements¶
- Python 3.12 or newer (0.1.0 said 3.9).
tre0.4.2 or newer (tesserae-engineon PyPI; 0.1.0 needed 0.3.5.2), installed with Tesserae.- One
pip install tesserae-uiinstalls everything, as prebuilt wheels, on Linux x86-64, macOS on Apple silicon and Windows x64 -- checked in CI on all three, on Python 3.12 and 3.14, where the full test suite also runs.
Added¶
- App structure
- Shared state:
App(state=...), reached asself.state(and the app asself.app) from any ViewModel on the app's window, and as{{ state.x.get() }}in any binding;App.of(view). - Routing:
app.navigate(name, **params),back(),forward(),on_navigated(params)on the screen's ViewModel,can_go_back/can_go_forward; routes and deep links withapp.route("notes/{id:int}", "Note"),navigate_to("notes/42")andlocation. Alt+Left/Right and the mouse's side buttons go back and forward. tesserae new <name> [--shell]makes a runnable app, andtesserae add screen <Name>adds a screen to it.
- Shared state:
- Layout
- The rest of flexbox in a view's style and stylesheets:
flex_wrap,align_self, min/max sizes,aspect_ratio,positionwithx/y,z_index,clip_children. - CSS Grid:
display: grid, track templates (fr,repeat(),minmax()), auto tracks and flow,grid_column/grid_rowplacement, row and column gaps, grid alignment. kind: ScrollView, with keyboard scrolling, focus reveal andtwo_way: scroll_offset.
- The rest of flexbox in a view's style and stylesheets:
- Components and styles
- A
component:call takeshandlers:,bindings:,two_way:,a11y:,interaction:andclasses:for its root, so a button fragment can be clicked. disabled:as a key or a binding on any node (announced, not focusable, no feedback, handlers off, faded).- A node's
style:can name a*_Style.yamlfile;*_Stylesheet.yamland*_Theme.yamlname the other kinds. - Fragment params with defaults,
when:and{if:, then:, else:}; per-item styling forrepeat:; a theme'scomponents:in the cascade. - YAML kinds for
SpinBox, video (aframebinding onImage) and node graphs (NodeGraph,GraphNode). tesserae.widgets.text, and every widget follows its theme'stypography:.paginationwindows long runs with an ellipsis.- CSS wide-gamut colours:
oklch(),oklab(),lch(),lab(),hwb()andcolor().
- A
- Development
- Hot reload for components in any view, and for components first used while the app runs.
- A shell file's removed panel is undocked while the app runs;
App(dark="system")starts in the OS's appearance. - An open overlay follows a window resize.
Changed¶
- A shell file's navigation rail now
navigates (with history) instead of jumping withshow. load_themeandload_stylesheetrefuse a file named for another kind (*_Style.yaml,*_Stylesheet.yaml,*_Theme.yaml); other names load as before.- A long
paginationrun's buttons are slots (slot0, ...), not one per page. App.run()raisesRuntimeErrorwhen a window's GPU can't be set up (fromtre0.4.0; before, the process exited with status 0).
Fixed¶
- On macOS, a hot-reload watcher could reload files that hadn't changed (writes from just before the watch began); it now skips an event that changed nothing.
- Windows: Tesserae's own file reads name UTF-8, rather than the system code page.
0.1.0¶
The first release on PyPI, as tesserae-ui (2026-09-28).