Repository navigation
Support targets with both active and inactive nodes in LHStackNode - #7
Merged
artyom-stv merged 2 commits intoOct 19, 2026
Merged
Conversation
added 2 commits
October 19, 2026 17:12
Deactivate the contiguous run of inactive nodes at the top of the stack (each node once), then calculate the path to the active node from the new top.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Сейчас
LHStackNodeподдерживает target, у которого одновременно заданыactiveNodesиinactiveNodes, только в узком случае: после снятия неактивных узлов вершиной стека должен оказаться сам активируемый узел. Например,[main, modal]+active = {main},inactive = {modal}. В остальных случаяхupdateChildrenState:возвращаетLHNodeUpdateResultInvalid. Кроме того, с вершины стека снимается ровно один узел, даже если неактивных узлов там несколько.В данном PR такой target обрабатывается в два шага:
inactiveNodes, каждый узел из множества — не более одного раза. Например,[root, a, b, c, b]сinactiveNodes = {b, c, d}превращается в[root, a, b]. Если на вершине нет неактивного узла, стек не меняется.Таким образом,
[root, a, picker]сactive = {result},inactive = {picker}превращается в[root, a, result]за одно обновление.UINavigationControllerполучает одинsetViewControllers:animated:, без отдельной анимации pop.Обработка target'ов только с
activeNodesили только сinactiveNodesне изменилась.Добавлены тесты на новое поведение.