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

Support ignoring unknown tags #1679

Open
swankjesse opened this issue Nov 13, 2023 · 3 comments
Open

Support ignoring unknown tags #1679

swankjesse opened this issue Nov 13, 2023 · 3 comments

Comments

@swankjesse
Copy link
Collaborator

Suppose we encounter an unknown WidgetTag. I’d like to suppress all future ProtocolMismatchHandler updates on that tag, including those on its properties and its children. The unknown widget should not adversely impact the indexing of its sibling widgets.

Similarly for unknown ChildrenTag values: I’d like one ProtocolMismatchHandler to signal the problem, and then no further updates.

@JakeWharton
Copy link
Member

The impact of this will be quite large, because we effectively have to create tombstone widgets that somehow make it into the children collections but not the native UI tree.

@JakeWharton
Copy link
Member

JakeWharton commented Nov 22, 2023

Decisions:

  • Properties: do nothing. The callback can dedupe if it wants because it gets widget tag + property tag.

  • Children: I think we can just return null? Nodes will get added to the map, and any children ops will get ignored. Tests to confirm. The callback can dedupe if it wants because it gets widget tag + children tag.

  • Widget: Introduce NullWidget or something. This holds the position to ensure indices on future operations remain correct. Ideally it's a GONE view/display:none; DOM node/empty composable/whatever on iOS and we don't have to special case it. Tests to confirm.

@JakeWharton
Copy link
Member

A null widget should NOT notify the listener for missing properties or children!

@JakeWharton JakeWharton added this to the 0.9.0 milestone Feb 23, 2024
@JakeWharton JakeWharton modified the milestones: 0.10.0, 0.11.0 Apr 3, 2024
@JakeWharton JakeWharton modified the milestones: 0.11.0, 0.12.0 May 15, 2024
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

2 participants