Skip to content

Release v2.4.0

Choose a tag to compare

@github-actions github-actions released this 15 Aug 06:28
cc08815

Added

  • <slot-name> contributes <ContributionPoint> - marks a layout template slot as the target for a named contribution point, opening it up to many contributors instead of the one parent that fills a plain slot.
  • contribute to <ContributionPoint> - one contributed item, declared directly on a module (alongside layout, form and feature) or on a feature at any nesting depth. Carries an optional navigate to <Screen> [by <param>] (reusing the exact navigation shape screens already use), label "<text>", and order <number>.
  • A contribution resolves to the nearest enclosing template that declares a matching contribution point: its own module first (which stops it bubbling further once found), then every other module in the document. Unknown and ambiguous contribution points are warnings, mirroring how every other reference in the document resolves.
  • New Contributions documentation page, linked from the Screens page's layout templates section.

Changed

  • LayoutSyntax.Slots changes from IEnumerable<string> to IEnumerable<SlotSyntax> to carry the new contributes marker - a breaking shape change to that one property. ScreenplaySyntaxWalker.VisitLayout/VisitForm were also completed to walk their previously-unwalked children (LayoutSyntax.Slots, FormSyntax.Populate/OnSubmit) - a latent gap from #98 caught by this PR's own walker-completeness spec (for_ScreenplaySyntaxWalker), fixed here since it's a small, directly-related correction.

(#92)

Notes for reviewers

The issue (#92) left real open questions - I made the following calls to keep this shippable, documented in the new doc page's "Scope" section and worth a second look:

  • Where a contribute to block is declared: the issue's own example wraps it in an unexplained navigation-item construct that's never defined anywhere else in the issue. I treated that as illustrative, not literal syntax, and made contribute to a bare directive attachable directly to a module or feature.
  • Nesting depth: the issue describes three tiers ("app nav, module subnav, feature sub-subnav"). Since layouts are module-scoped only today, this PR implements the two tiers that are actually expressible (own-module vs. every-other-module) and documents the third as a deliberate gap, not a silent omission - it would need feature-scoped layouts, which don't exist in the grammar.
  • The explicit in <ContributionPoint> override the issue gestures at (no concrete syntax given, paired with an ambiguity-handling question the issue itself marks open) is deferred rather than guessed at.
  • order is implemented (used in the issue's own worked example); group is not (explicitly flagged in the issue as "worth scoping now vs. later," no worked example uses it).

Same as #98: expect the build check's Release configuration to fail on the pre-existing, repo-wide CS9057 analyzer/compiler version mismatch, unrelated to this change.