Repository navigation
Tesserae 0.5.1.8
The first release as tess-ui (the PyPI name was tesserae-ui) from mindderivative/tess-ui. It also carries 0.5.1.1 to 0.5.1.7, which were never published on their own: everything below is new since 0.5.1. If tesserae-ui is installed, pip uninstall tesserae-ui first, then pip install tess-ui.
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 run
tesserae 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.