Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
Motivation and Context
This is loosely related to my issue #103. It resolves a situation where a Page can be used either standalone or as part of a combined workflow.
e.g. a pair of Pages used to Select an Album and Select an Image in an Album could be used:
AppUI -> Send Image -> SelectAlbumPage -> SelectImagePage -> action dismisses
vs
AppUI -> ViewAccountPage -> EditAccountPage -> Edit Avatar -> SelectAlbumPage -> SelectImagePage -> action should pop to EditAccountPage
A page constructor can be created that takes an optional "intermediate root":
Description
Created new popTo(item:orDismiss:) method. It takes an item and searches the internal itemsStack for an exact match to the supplied item. If the item is found, it is set as current and redraw is triggered. Subsequent items on the stack are then torn down.