Skip to content

Release v4.0.0

Choose a tag to compare

@github-actions github-actions released this 16 Aug 09:53
dead2db

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 keep contributes <ContributionPoint>, which makes the shell the natural home of an application-wide Navigation point.
  • layout <Name> on a ui profile, exactly parallel to the existing theme <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 no fits 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 templates documentation page covering the four constructs and how they nest.

Changed

  • The module-scoped layout <Name> is now screen 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 of layout <Name>.

  • The arrangement tree hangs directly off arrangement; the separate template block inside it is gone. arrangement freeform likewise holds its variant blocks directly. This frees the word template to 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 grow
    

    A body of plain slot names, with no arrangement, is a complete declaration on its own. contributes belongs 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: LayoutSyntax is now the application layout, ScreenTemplateSyntax / DialogTemplateSyntax are the module-scoped ones, ModuleSyntax.Layouts is ModuleSyntax.ScreenTemplates (plus DialogTemplates), TemplateSyntax and its tree are ArrangementSyntax / ArrangementNodeSyntax / ArrangementContainerSyntax / ArrangementSlotSyntax / ArrangementOverrideSyntax / ArrangementContainerKind, LayoutArrangement is ArrangementMode, and ScreenLayoutSyntax is ScreenTemplateReferenceSyntax. The matching walker methods follow the same names.