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

Tweak documentation for readability #787

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Tweak documentation for readability #787

wants to merge 5 commits into from

Conversation

PoignardAzur
Copy link
Contributor

@PoignardAzur PoignardAzur commented Dec 14, 2024

Apply many small tweaks I found while going over the documentation.
Rename some variables.
Add asserts to BoxConstraints::constrain_aspect_ratio.
Flesh out the WidgetState documentation.
Introduce the concept of "zombie flags".

@PoignardAzur
Copy link
Contributor Author

I'd say this is ready for review.

It's a bit of a kitchen sink PR, but almost all the changes are to documentation or comments only, and almost none of them change executable code.

Some changes remove long-dead code, bitrotted comments, outdated documentation, etc. Masonry's documentation has a tendency to refer to old ideas as if we were just about to implement them, so I think this spring cleaning will make it more readable.

Copy link
Contributor

@jaredoconnell jaredoconnell left a comment

Choose a reason for hiding this comment

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

This is an improvement.

@@ -106,6 +106,13 @@ It is called when new widgets are added to the tree, or existing widgets are rem

It will call the `register_children()` widget method on container widgets whose children changed, then the `update()` method with the `WidgetAdded` event on new widgets.

<!-- TODO - document UPDATE DISABLED --- -->
Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't use all caps here for the pass names

@@ -313,6 +312,7 @@ pub enum Update {
}

impl PointerEvent {
/// Create a [`PointerEvent::PointerLeave`] event with dummy values.
pub fn new_pointer_leave() -> Self {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe this method should be at the bottom, as something most users won't need (which users would need this?)

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

Successfully merging this pull request may close these issues.

3 participants