Is there any focus manager implemented ? #1393
Unanswered
fchastanet
asked this question in
Q&A
Replies: 1 comment
-
I found that https://github.com/charmbracelet/huh implements a kind of focus manager, I will try to use it |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
First, thank you very much for your work !
I'm developping this tool https://github.com/fchastanet/bash-tools-command-bookmarker
I sarted few days ago but the UI will become more complex in some days.
I'm struggling in making Tab to focus the right component. I wonder if a focus manager is available or if you propose some best practices to implement focus change in a standard way. Because the logic could become quite complex as all the components are called on Update method, it is subject to bug if focus change is not implemented the right way in some component as normally only one component should receive the focus at a time.
ideally, it would be great that a focus manager would know automatically next element to focus in the hierarchy of components (like it's done in HTML for example). I tried to implement such a thing here https://github.com/fchastanet/bash-tools-command-bookmarker/blob/master/internal/framework/focus/focusManager.go but it is not working well right now.
do you any inputs/thoughts on that ?
kind regards
Beta Was this translation helpful? Give feedback.
All reactions