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

Document RenderRoot fields #824

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Document RenderRoot fields #824

merged 2 commits into from
Jan 14, 2025

Conversation

PoignardAzur
Copy link
Contributor

Remove duplicate CursorIcon field.

@PoignardAzur PoignardAzur added this pull request to the merge queue Jan 14, 2025
Merged via the queue into main with commit 4cf3653 Jan 14, 2025
17 checks passed
@PoignardAzur PoignardAzur deleted the doc_render_root_fields branch January 14, 2025 17:56
Comment on lines -86 to +130
/// The IME area last sent to the platform.
///
/// This allows only sending the area to the platform when the area has changed.

/// The area in which text is being edited.
Copy link
Member

Choose a reason for hiding this comment

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

I think this is worse than what was there before? How does this improve clarity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Overall I'm trying to document "what does this field represent" more than "when is it updated".

Copy link
Member

Choose a reason for hiding this comment

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

I'd claim that this new doc comment is actively worse than not having a comment at all. The name of the field is clearer for what it is for...

I do agree that we should have documented this workaround more clearly, but I'm not sure I agree that gutting the existing documentation is the right way to force that.

Copy link
Member

Choose a reason for hiding this comment

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

I don't really like the new gaps between fields. I would rather that related fields (size_policy, size, scale_factor for example) were grouped without newlines.

pub(crate) scroll_request_targets: Vec<(WidgetId, Rect)>,

/// List of ancestors of the currently hovered widget.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe here would be a good reason to explain why we store this (i.e. so that hover state can be properly tracked after a reparenting)

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