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

Consider responsibility split for Widget.Children #1880

Open
JakeWharton opened this issue Mar 14, 2024 · 0 comments
Open

Consider responsibility split for Widget.Children #1880

JakeWharton opened this issue Mar 14, 2024 · 0 comments

Comments

@JakeWharton
Copy link
Member

The responsibility of this type has grown from its original three callbacks which map fundamentally to the underlying Compose Applier.

Things that are going on:

  • Ownership of the target native view tree container
  • Interaction with the native view tree container for insert, removal, and moves
  • Ownership of the list of Widgets, mostly to provide Modifier access
  • Callbacks for when Modifiers change on a Widget

Can we split this up?

I'd like to see ownership of the native container and interaction as a separate thing. This means we can replace a native view instance without ever notifying the parent, for example, if unscoped modifiers and their interceptors dictate such an event should happen.

Can we get away with eliminating the list of widgets for a list of Modifiers? And then a callback when the modifiers change (either the initial value, or subsequent changes).

Need to land unscoped modifiers first before this, but they would benefit greatly from it.

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

No branches or pull requests

1 participant