Skip to content

feat: Consumer support for scrolling and clipping children #574

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

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

Conversation

mwcampbell
Copy link
Contributor

This exposes the scrolling and clips_children on the consumer Node struct. It also adds a new rule to the common filter to exclude clipped children, except for one clipped child at either end of a list (so that child can be scrolled into view).

Copy link
Member

@DataTriny DataTriny left a comment

Choose a reason for hiding this comment

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

Just one comment on the added test. I know we have some large tests like this, as does Chromium, but I think we should avoid them as much as possible.

@@ -223,4 +272,133 @@ mod tests {
common_filter(&tree.state().node_by_id(NodeId(1)).unwrap())
);
}

#[test]
fn clipped_children() {
Copy link
Member

Choose a reason for hiding this comment

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

I feel like this test tests too many things at once, making it harder to understand if it fail in the future. Could you please try to split it so that each function contain less assertions?

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.

2 participants