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

Refactor Message.control and Tree Messages #2602

Merged
merged 8 commits into from
May 25, 2023
Merged

Conversation

aaronst
Copy link
Contributor

@aaronst aaronst commented May 18, 2023

An attempt to address #2528 and #2529 as suggested by @davep.

  • Changed Message.control to a property
  • Removed the tree parameter from:
    • Tree.NodeCollapsed
    • Tree.NodeExpanded
    • Tree.NodeHighlighted
    • Tree.NodeSelected
    • DirectoryTree.FileSelected
  • Changed the above's control to return self.node.tree.

I was not entirely following what changes needed to be made to the @on decorator, but I believe the rest is there. Additionally, I was getting a type error for DirectoryTree.FileSelected.control because self.node.tree is a Tree[DirEntry] vs a DirectoryTree. Not sure if that matters so I wanted to raise it here.

Hope this helps, happy to get it finished with a little more guidance.

@aaronst aaronst marked this pull request as ready for review May 18, 2023 04:58
@aaronst aaronst changed the title Refactor Tree Messages Refactor Message.control and Tree Messages May 18, 2023
@willmcgugan
Copy link
Collaborator

Looks good to me. @davep thoughts?

@davep
Copy link
Contributor

davep commented May 22, 2023

@willmcgugan Aye, I like what I see here!

Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Would you mind adding a brief CHANGELOG entry.

@aaronst
Copy link
Contributor Author

aaronst commented May 22, 2023

Looks good. Would you mind adding a brief CHANGELOG entry.

Added!

@davep
Copy link
Contributor

davep commented May 24, 2023

I believe this should also fix #2648.

Copy link
Collaborator

@willmcgugan willmcgugan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@willmcgugan
Copy link
Collaborator

THanks @aaronst !

@willmcgugan willmcgugan merged commit 20d19d9 into Textualize:main May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants