feat: add FocusManager for keyboard navigation#137
feat: add FocusManager for keyboard navigation#137ReverseGem7 wants to merge 34 commits intoanomalyco:mainfrom
Conversation
|
What about having a tabIndex on Renderables to control what should be "tabable" and what not? Would then also work with custom Renderables. |
|
Right now, a Renderable is considered tabbable if it has If we wanted to change this and allow What’s your opinion? |
|
I am a bit concerned about tree traversal for finding tabables, as that might also traverse long lists with potentially thousands of nodes and block the process. I would make that a built-in collector, on the RenderContext add methods to collect the focusable when it is added to the tree and remove it from the list when removed from the tree. Then it's just fast iteration on a small list, compared to tree traversal. |
|
something like creating a secondary tree? |
|
Just a list of Renderables, sorted by tabIndex. Doesn't matter where in the tree they are then, can still check if visible or not and take the next/prev available visible renderable to focus. |
|
Closing as out of date. Please re-open/ping me if you want to continue working on this. |
focus-manager.mp4