Repository navigation
Releases: antaresdk/sus-router
Releases · antaresdk/sus-router
Release list
v1.0.21
Changed
OnLeftnow runs once per leave, leaf to root, while the screen is still in the tree (panelandparentare live), afterBeforeResolveand after the target'sBeforeEnter, i.e. after the last point where the navigation can still be cancelled. PreviouslyOnLeftcould run before those guards and the chain root could be detached before the leaf'sOnLeft. A cancelled navigation no longer callsOnLefton any screen.OnLeaving/Leavingdocumentation updated:OnLeavingruns beforeOnLeft; both run in the tree on a leave.
Fixed
OnLeftwas 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.KeepAliveis now applied per level of a nested chain: a kept level is cached in its parent'sChildView(the same instance returns on re-entry,Enteredfires again) instead of being lost withoutOnLeft.- A leaving non-KeepAlive parent clears its
ChildViewKeepAlive cache first, so cached children receiveOnLeft(leaf to root). - A screen
OnBeforeEnterthat returnsfalsenow cancels the navigation at every level of the target: fresh and KeepAlive-reused levels of a nested chain, and KeepAlive single-level targets.OnBeforeRouteUpdatereturningfalseon 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:
Propsof reused screens are restored, noOnLeft, noEntered, KeepAlive caches stay intact.
Notes
- Behavior change to check in your screens:
OnLeftcleanup that relied on running early (before guards) or outside the tree should move accordingly. Screens moved into the KeepAlive cache do not getOnLefton leave; on KeepAlive evictionOnLeftruns outside the tree (panelis null). - Behavior change to check in your screens: a nested or KeepAlive
OnBeforeEnter/OnBeforeRouteUpdatethat returnedfalseby accident (and was ignored before) now blocks the navigation.
v1.0.20
Added
SusScreen.Leaving(SusRoute toRoute)andprotected 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, soparentandpanelare 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).AdvancedRoutingsample:SettingsScreennow hosts aChildView, and its nested panes set the shell caption inOnEnteredand clear it inOnLeaving.
Notes
Left/OnLefttiming is unchanged. The order ofOnLeavingagainstOnLeftis not part of the contract.- A
BeforeResolveguard runs afterOnLeaving; if it aborts the navigation, the screen stays active althoughOnLeavingwas already called.
Known issues
OnLeftis 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,OnLeftruns after the screen is detached (panelis null). UseOnLeavingfor cleanup that needs the live tree. Tracked as T-4260.
v1.0.19
v1.0.18
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.ShowAsynccompletes 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
SusModalLayerremoved. Modals go throughSusModalServiceonly, and the scrim is amodal-scrimstylesheet 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
v1.0.9
Fixed
- Sample asmdefs (all 7 samples) are
autoReferenced: false— a project'sAssembly-CSharpno
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
sus-router 1.0.7
SusLog routing; depends on sus-core >=1.0.10. displayName: Sharq UI System Router.
sus-router 1.0.6
[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
[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.