You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that previous/next nodes (when using ArrowLeft / ArrowRight) are based on node IDs.
What does it mean?
Take a look at this image: 1, 2 & 3 represent the node ID (it's fake IDs here, just for example)
@topcli/prompts (root node) is focused, if we press ArrowUp then it focuses the first node (@topcli/wcwidth), alright. But then, if we press ArrowRight it will focus on the 2nd node (is-unicode-supported).
We should calculate node position and then focus on the nearest node (or the farthest: in the above example, when node 1 is focused, if we press ArrowLeft because there is no node on the left then it should focus the node one most on the right).
Node positions can be retrievied with [...secureDataSet.linker].map(([id, opt]) => [id, { ...opt, position: nsn.network.getPosition(id) }])
The text was updated successfully, but these errors were encountered:
Keyboard navigation has been introduced in #254
The problem is that previous/next nodes (when using
ArrowLeft
/ArrowRight
) are based on node IDs.What does it mean?
Take a look at this image:
1
,2
&3
represent the node ID (it's fake IDs here, just for example)@topcli/prompts
(root node) is focused, if we pressArrowUp
then it focuses the first node (@topcli/wcwidth
), alright. But then, if we pressArrowRight
it will focus on the 2nd node (is-unicode-supported
).We should calculate node position and then focus on the nearest node (or the farthest: in the above example, when node 1 is focused, if we press
ArrowLeft
because there is no node on the left then it should focus the node one most on the right).Node positions can be retrievied with
[...secureDataSet.linker].map(([id, opt]) => [id, { ...opt, position: nsn.network.getPosition(id) }])
The text was updated successfully, but these errors were encountered: