Skip to content

Schema extension, lazy regions, focused region host (0.11.0) - #13

Merged
rinekri merged 3 commits into
masterfrom
feature/schema-extension-path-match
Oct 7, 2026
Merged

rinekri merged 3 commits into
masterfrom
feature/schema-extension-path-match

Conversation

@rinekri

@rinekri rinekri commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Removes the workarounds the apps needed for tabs built on parallelFlow, and fixes the parallel-flow bugs found while migrating them.

Added

  • Gradle plugin: a flavor or build type .dot file with mode = "extend" adds nodes and edges to the schema with the same graph id instead of replacing it, so the schema is not copied into the flavor's source set.
  • Path.endsWith(target: Target) instead of a string comparison of the last segment.
  • ParallelFlowNode.initialRegions, startRegion, isRegionStarted: regions which are not initial have no nodes until they are started, so tabs can load on the first selection without placeholder nodes. isRegionAtRoot makes the state of a region readable in transition().
  • BaseParallelFlowNode: a parallel flow node with hooks.
  • way-compose: FocusedRegionHost(regionId) renders one region of a parallel node and keeps the saved state of the other ones; rememberTransitionSpec() with push, pop, fade and no-op transitions.

Changed

  • way-compose hosts start from the current state of the service, so a host which enters composition later shows its node on the first frame.
  • Extension point and hook interfaces have empty default implementations.
  • The regions of a parallel declared inside of a region start when the parallel is entered and are removed when it is left.
  • A node which is entered is built once per transition.
  • NodeBuilder has snapshotCache and restoreCache; a hand-written builder which caches child builders should override them.

Fixed

  • Entry and exit order of parallel flows and their regions, including nested ones and the ones entered by NavigateTo.
  • Back delivered to every region, or twice, for a parallel declared under a flow.
  • Wrong paths from RegionId.resolveAbsolute and from relative targets inside of a parallel.
  • A schema whose root is a flow with a parallel declared under it failed at start.
  • A failed transition now restores the state, the node builder cache and the event queue before nodes are entered back, and a node whose onEntry threw gets onExit.

The full list is in CHANGELOG.md.

Source-breaking: a ParallelFlowNode subclass which declares a member named initialRegions, startRegion, isRegionStarted or isRegionAtRoot has to rename it.

Checked with :way:allTests, :way-gradle-plugin:test, :way-compose:testDebugUnitTest, and with six apps built against the local artifacts and run on an emulator.

Bumps the version to 0.11.0.

@rinekri
rinekri merged commit 5ab5607 into master Oct 7, 2026
1 check passed
@rinekri
rinekri deleted the feature/schema-extension-path-match branch November 9, 2026 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant