You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
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 .yaml or .yml name with one message: Tesserae no longer reads YAML, write the file as TDL (tesserae migrate-tdl in tesserae-ui<0.6.1), see Migrating from YAML. A name that is not found says so too when a Name_View.yaml is in the project. The shipped .yaml twins of Tesserae's views, stylesheets and default theme are gone, and so is TESS_UI_SHIPPED.
The converter.tesserae migrate-yaml and tesserae migrate-tdl (and the tess_ui.migrate* modules) are removed; they live on in tesserae-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_view and ViewWatcher. Open a view with app.open_view, repeat a node with For, and show a view in a dialog with a modal Overlay in a view (the table in Migrating). A per-screen stylesheet= on load is gone with it; App(stylesheet=) is the app's stylesheet.
The *_Component.yaml and *_Style.yaml file kinds. A project no longer has a Components/ folder of fragments, component: and include: do not read a project's files, and a rule's style: cannot name a *_Style.yaml file. 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), and tess_ui.expr is 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 own get (it needs a key; write d), and n.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() + 1 works; 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 a Set (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 no allowed: list, only did you mean) and every ExprError has TEL's code (unknown-name, call-not-function, method-not-available, bad-call, limit-range, ...). See Migrating.
The engine is tesserae-engine 0.6.8 (was 0.6.7), the release the whole suite was run on.
pyyaml is no longer a dependency. The Python widget factories read no YAML. A project that read YAML itself installs pyyaml on 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 from Button, IconButton, Fab, Card, ListItem, Chip, Badge, Divider, Accordion, TreeNode, DatePickerDay, PeriodSelector, SearchBar, Toolbar, TopAppBar, StatusBar and MenuItem, 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 ids name and name.part; what changed is listed in Migrating. The shipped views gained what the factories need: Card and Toolbar take Bare (only the surface, for nodes a Python widget adds itself), Badge takes Flat (the root is the mark), SearchBar takes Trailing_Icons (a list) and shows no leading icon when leading_icon is empty, and a StatusBar's notes are keyed by their position, not their text.
Python 3.14 is the minimum, and tesserae-dl is a dependency (it was an optional extra): TDL is read by tess_dl, which needs 3.14.