Release v4.0.0
Summary
Four words in the language now mean exactly one thing each: a layout is the application's base navigational shell, a screen template is a reusable shape inside it, a dialog template is a shape that opens over it, and a screen is an instance that fills one of them.
Added
layout <Name>— a new top level construct declaring the application's base navigational look: named slots, arranged the same way a template's are. Its slots keepcontributes <ContributionPoint>, which makes the shell the natural home of an application-wideNavigationpoint.layout <Name>on aui profile, exactly parallel to the existingtheme <Name>line — at most one per profile. This is where an application states which shell it uses. Naming a layout the document does not declare is reported as a warning, the way an unknown theme already is.dialog template <Name>at module scope — a reusable shape for content that opens over the application. It declares nofits slot, because it occupies no slot.fits slot <name>on a screen template — names the slot of its parent the template fills. One rule for every level: a module's template fits a slot on the application layout, a feature's fits a slot the module's template declares, a slice's fits one the feature's declares.- A
Layouts and templatesdocumentation page covering the four constructs and how they nest.
Changed
-
The module-scoped
layout <Name>is nowscreen template <Name>. It was never a layout — it is a reusable shape that goes inside one. -
A screen names the structure it fills with
template <Name>instead oflayout <Name>. -
The arrangement tree hangs directly off
arrangement; the separatetemplateblock inside it is gone.arrangement freeformlikewise holds itsvariantblocks directly. This frees the wordtemplateto mean a screen or dialog template and nothing else. -
Slots are declared by name in the body, and the arrangement positions them:
layout AppShell navigation contributes Navigation content arrangement flow row navigation width 240 content growA body of plain slot names, with no
arrangement, is a complete declaration on its own.contributesbelongs on the declaration; sizing (width,height,grow,span) belongs in the arrangement, so a slot never says two different things about itself in two places. -
Syntax types renamed to match:
LayoutSyntaxis now the application layout,ScreenTemplateSyntax/DialogTemplateSyntaxare the module-scoped ones,ModuleSyntax.LayoutsisModuleSyntax.ScreenTemplates(plusDialogTemplates),TemplateSyntaxand its tree areArrangementSyntax/ArrangementNodeSyntax/ArrangementContainerSyntax/ArrangementSlotSyntax/ArrangementOverrideSyntax/ArrangementContainerKind,LayoutArrangementisArrangementMode, andScreenLayoutSyntaxisScreenTemplateReferenceSyntax. The matching walker methods follow the same names.