Skip to content
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

Enhance Tree so that there is a expand/collapse action that is separate from select #1700

Merged
merged 12 commits into from
Jan 31, 2023

Conversation

davep
Copy link
Contributor

@davep davep commented Jan 31, 2023

See #1433. The idea here is that the user has an option of expanding/collapsing a non-leaf node without causing a selected event, or (with auto_expand turned off) cause a selected event without an expand/collapse event.

As this will need a new binding, I've chosen the space bar as the key to toggle the expanded state.

In passing I've also added docstrings to all action_ methods -- I feel this is important; helping to make actions (and perhaps bindings in the longer-run) self-documenting.

See Textualize#1433. The idea here is that the user has an option of
expanding/collapsing a non-leaf node without causing a selected event,
or (with auto_expand turned off) cause a selected event without an
expand/collapse event.

As this will need a new binding, I've chosen the space bar as the key to
toggle the expanded state.
I want to add docstrings to the actions I'm adding as part of Textualize#1700, so with
this in mind I'm going to add docstrings to all the actions.
@davep davep changed the title Enhance Tree so that there is a expand/collapse action that is separate from select Enhance Tree so that there is a expand/collapse action that is separate from select Jan 31, 2023
@davep davep self-assigned this Jan 31, 2023
@davep davep added enhancement New feature or request Task labels Jan 31, 2023
@davep davep marked this pull request as ready for review January 31, 2023 14:16
@davep davep merged commit ff76157 into Textualize:main Jan 31, 2023
@davep davep deleted the tree-select-expand-divorce branch January 31, 2023 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tree] It would be beneficial to separate Tree node selection from node toggling
3 participants