-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
masonry: rename has_focus to subtree_has_focus #617
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I mean I don't have a strong opinion here, but subtree_has_focus
suggests to me that only descendants of this widget may have focus. Maybe tree_has_focus
? But I think just has_focus
is fine too and shorter (and doesn't suggest that the global tree may have focus).
I see your point. The motivation for changing the name to something else is that other methods such as Perhaps a name like |
Difficult to find good/concise names that describe the difference between "only this widget" and "this widget and/or one of its descendants"... I remember a similar naming discussion sometime back... Maybe we should try to find a general naming solution/prefix for this kind? I think Funny I just asked ChatGPT o1 preview (not that this has to say much), and it came independently (i.e. I didn't give him the hints above) to a similar conclusion, i.e. |
That would be good. There are a number of state methods on contexts currently:
For I think the direction of how state moves up or down the tree will usually be intuitively clear (focus bubbling to ancestors, disabling bubbling to the descendants, etc.), so IMO the wording doesn't necessarily have to disambiguate between the bubbling direction. |
Just With the current design it's always a simple path, not a branching tree, that has focus. So I would prefer Having a general solution has benefits, but we have no other use case right now so it feels YAGNI and I would delay worrying about it. |
I guess I don't really like the We could reify the |
|
Implements #572 (comment)