Skip to content

Releases: antaresdk/sus-router

v1.0.21

Choose a tag to compare

@antaresdk antaresdk released this 11 Oct 15:38

Changed

  • OnLeft now runs once per leave, leaf to root, while the screen is still in the tree (panel and parent are live), after BeforeResolve and after the target's BeforeEnter, i.e. after the last point where the navigation can still be cancelled. Previously OnLeft could run before those guards and the chain root could be detached before the leaf's OnLeft. A cancelled navigation no longer calls OnLeft on any screen.
  • OnLeaving / Leaving documentation updated: OnLeaving runs before OnLeft; both run in the tree on a leave.

Fixed

  • OnLeft was not called when leaving a nested chain for a single-level route, and when leaving a KeepAlive leaf of a nested chain. It is now called on both paths.
  • KeepAlive is now applied per level of a nested chain: a kept level is cached in its parent's ChildView (the same instance returns on re-entry, Entered fires again) instead of being lost without OnLeft.
  • A leaving non-KeepAlive parent clears its ChildView KeepAlive cache first, so cached children receive OnLeft (leaf to root).
  • A screen OnBeforeEnter that returns false now cancels the navigation at every level of the target: fresh and KeepAlive-reused levels of a nested chain, and KeepAlive single-level targets. OnBeforeRouteUpdate returning false on a reused shared-prefix screen cancels it too. Previously only a fresh single-level screen was honoured and the navigation committed anyway.
  • A cancelled navigation has no side effects: Props of reused screens are restored, no OnLeft, no Entered, KeepAlive caches stay intact.

Notes

  • Behavior change to check in your screens: OnLeft cleanup that relied on running early (before guards) or outside the tree should move accordingly. Screens moved into the KeepAlive cache do not get OnLeft on leave; on KeepAlive eviction OnLeft runs outside the tree (panel is null).
  • Behavior change to check in your screens: a nested or KeepAlive OnBeforeEnter / OnBeforeRouteUpdate that returned false by accident (and was ignored before) now blocks the navigation.

v1.0.20

Choose a tag to compare

@antaresdk antaresdk released this 05 Oct 18:23

Added

  • SusScreen.Leaving(SusRoute toRoute) and protected virtual void OnLeaving(SusRoute toRoute): called once per leave for every screen that leaves the active route chain (removed from the tree or moved into the KeepAlive cache), after all leave/enter guards and before any screen is detached, in leaf-to-root order, so parent and panel are still live. Use it to undo decorations a nested screen applied to its shell. Not called for screens that stay (shared nested-chain prefix, same-record props update) or on KeepAlive eviction (T-4246).
  • AdvancedRouting sample: SettingsScreen now hosts a ChildView, and its nested panes set the shell caption in OnEntered and clear it in OnLeaving.

Notes

  • Left / OnLeft timing is unchanged. The order of OnLeaving against OnLeft is not part of the contract.
  • A BeforeResolve guard runs after OnLeaving; if it aborts the navigation, the screen stays active although OnLeaving was already called.

Known issues

  • OnLeft is not called on some paths: leaving a nested chain for a single-level route, and leaving a KeepAlive leaf of a nested chain (that leaf is also not cached). When the chain root changes, and on KeepAlive eviction, OnLeft runs after the screen is detached (panel is null). Use OnLeaving for cleanup that needs the live tree. Tracked as T-4260.

v1.0.19

Choose a tag to compare

@antaresdk antaresdk released this 24 Sep 05:25

Changed

  • SusRouter.cs split into partial-class files (SusRouter.NavigateCore.cs, SusRouter.Navigation.cs, SusRouter.Async.cs, SusRouterTypes.cs); pure code move, no API or behavior change (T-3599).

v1.0.18

Choose a tag to compare

@antaresdk antaresdk released this 11 Sep 20:45

Changed

  • Install URLs restamped for sus-core v1.1.0. No runtime or API change.

Also included since v1.0.10

Added

  • Route transitions on SusMotion: curtain fades run through the shared motion service, with presets and an explicit "no transition" value.
  • SusModalService.ShowAsync completes with the modal's result, so a modal can be awaited.
  • Router focus lifecycle: focus on route enter, and a focus snapshot, trap and restore around modals.

Changed

  • SusModalLayer removed. Modals go through SusModalService only, and the scrim is a modal-scrim stylesheet class instead of appearance written from C#.
  • The modal service resolves the overlay layer from the modal itself instead of a hardcoded category.
  • Sample code uses the package logger instead of Debug.Log, and sample types live in their own namespace.
  • Remaining inline style writes converted to stylesheet classes.

Fixed

  • Async navigation race: a second navigation started while a guard was awaited can no longer leave the router with a mismatched from/to pair.
  • Test assemblies reference the Unity Test Runner explicitly, so the package compiles the same way inside a consuming project as in development.

v1.0.10

Choose a tag to compare

@antaresdk antaresdk released this 17 Aug 16:42

Changed

  • README: community links (Discord / Telegram).
  • scripts~/prepare-commit-msg is the versioned commit-message hook (PowerShell copy removed);
    docs re-stamped (sus-core 1.0.17).

v1.0.9

Choose a tag to compare

@antaresdk antaresdk released this 17 Aug 16:42

Fixed

  • Sample asmdefs (all 7 samples) are autoReferenced: false — a project's Assembly-CSharp no
    longer implicitly references sample code.

Changed

  • Package push gate is versioned in scripts~/pre-push (docs check for this package + hard version
    bump), identical across the SUS packages; docs re-stamped (sus-core 1.0.16).

v1.0.8

Choose a tag to compare

@antaresdk antaresdk released this 17 Aug 16:42

Fixed

  • Samples: dangling PanelSettings reference repointed across all 7 samples.

Changed

  • Docs: translation/backtick artifacts fixed; version banners re-stamped (sus-core 1.0.15).

sus-router 1.0.7

Choose a tag to compare

@antaresdk antaresdk released this 12 Aug 13:25

SusLog routing; depends on sus-core >=1.0.10. displayName: Sharq UI System Router.

sus-router 1.0.6

Choose a tag to compare

@antaresdk antaresdk released this 12 Aug 06:46

[1.0.6] - 2026-08-11

Changed

  • Samples rewritten on plain UI Toolkit controls - no external UI library required to compile and run them.

sus-router 1.0.5

Choose a tag to compare

@antaresdk antaresdk released this 12 Aug 06:46

[1.0.5] - 2026-08-11

Changed

  • Docs and sample descriptions: public-repo reference hygiene — external product references removed, sample guides reworded around plain UI Toolkit controls; gallery images removed.
  • CI: tests workflow is manual-only (workflow_dispatch) until license secrets are configured.