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

[Tree] Add NodeHighlighted message #1400

Closed
davep opened this issue Dec 19, 2022 · 2 comments · Fixed by #1528
Closed

[Tree] Add NodeHighlighted message #1400

davep opened this issue Dec 19, 2022 · 2 comments · Fixed by #1528
Assignees
Labels
enhancement New feature or request

Comments

@davep
Copy link
Contributor

davep commented Dec 19, 2022

Currently the Tree widget sends out a message when a node is selected (that is, when there's a mouse click on a node, or the user presses Enter on a nide), when a node is expanded, and when a node is collapsed. Something that seems to be missing though is a message when a node is highlighted. This would allow other widgets to react to the cursor (that is, the node highlight) moving though the tree without needing to watch something like Tree.cursor_line, giving this sort of effect without needing to click on a node or expand it, etc:

Screen.Recording.2022-12-19.at.11.55.09.mov
@davep davep added the enhancement New feature or request label Dec 19, 2022
@willmcgugan willmcgugan changed the title Consider adding a NodeHighlighted message to Tree [Tree] Add NodeHighlighted message Jan 4, 2023
@darrenburns
Copy link
Member

Just a note to say that ListView has similar behaviour, so we should be mindful to keep naming and semantics consistent with that :)

@Textualize Textualize deleted a comment from github-actions bot Jan 9, 2023
davep added a commit to davep/textual that referenced this issue Jan 9, 2023
I'm about to work on Textualize#1400 and it seems like a good idea to put some tests
in place first to ensure nothing gets disturbed.
davep added a commit to davep/textual that referenced this issue Jan 9, 2023
This is sort of different from selected. Selected is when someone mashes the
enter button or clicks on a node. Highlighted is when the cursor moves into
a new node.

See Textualize#1400.
@davep davep linked a pull request Jan 9, 2023 that will close this issue
@davep davep self-assigned this Jan 9, 2023
@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants