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

Docs: Clarify CanvasItem visibility properties and signals #97223

Conversation

AdriaandeJongh
Copy link
Contributor

  • Reworded the description of the visible property to emphasize that a CanvasItem is only actually drawn when it and all of its ancestors are visible.
  • Appended this important nuance to the visibility_changed and hidden signals, whose descriptions previously did not mention this precise behavior.

Copy link
Member

@HolonProduction HolonProduction left a comment

Choose a reason for hiding this comment

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

Makes sense to clarify this, but I think the ancestor formulation should be changed in some way that excludes Node3D and Ancestors that have a non CanvasItem Node in between. Can't really think of a concise way to say that though. Maybe "CanvasItem ancestors" is sufficient for now 🤷

doc/classes/CanvasItem.xml Outdated Show resolved Hide resolved
doc/classes/CanvasItem.xml Outdated Show resolved Hide resolved
@Mickeon
Copy link
Contributor

Mickeon commented Sep 20, 2024

Makes sense to clarify this, but I think the ancestor formulation should be changed in some way that excludes Node3D and Ancestors that have a non CanvasItem Node in between. Can't really think of a concise way to say that though. Maybe "CanvasItem ancestors" is sufficient for now 🤷

I believe struggled with this actually in #93735 . I think the descriptions in this PR are on the right track and far better than currently.

Copy link
Contributor

@Mickeon Mickeon left a comment

Choose a reason for hiding this comment

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

Thanks for the feedback! Replacing 'item' with 'node' while subsequently talking about the 'visibility' property is also a bit confusing, so I opted for spelling out [CanvasItem] instead.

I actually don't personally find that to be the case. I have a few notes written about why and how, but in short it makes the description harder to read and localise. I'll consider it a nitpick that I can adjust later, as a lot of the documentation already does this.
To make it less confusing you could've also said "this node", instead.

doc/classes/CanvasItem.xml Outdated Show resolved Hide resolved
@akien-mga akien-mga merged commit f97defb into godotengine:master Sep 23, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks!


I merged this locally before seeing the last review comments by @kleonc - those should be addressed in a follow-up.

@AdriaandeJongh
Copy link
Contributor Author

I merged this locally before seeing the last review comments by @kleonc - those should be addressed in a follow-up.

I'll make a new PR, no problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants