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

[DevTools] Track all public HostInstances in a Map #30831

Merged
merged 6 commits into from
Sep 3, 2024

Commits on Sep 3, 2024

  1. Track all public HostInstances in a Map

    This lets us get from a HostInstance to the nearest DevToolsInstance
    without relying on findNearestUnfilteredElementID and
    fiberToDevToolsInstanceMap.
    sebmarkbage committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    4a567f2 View commit details
    Browse the repository at this point in the history
  2. Handle React Native tags

    sebmarkbage committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    3843330 View commit details
    Browse the repository at this point in the history
  3. Rename getNearestMountedHostInstance to getNearestMountedDOMNode

    This conflict resolution is really only relevant to DOM renderers since
    there's generally multiple of them per tree and this resolution is only
    active for those anyway. Making this clear means we can change the
    implementation details.
    sebmarkbage committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    6473b9c View commit details
    Browse the repository at this point in the history
  4. Simplify getNearestMountedDOMNode to just walk to path and check the map

    We don't need the dependency on findFiberByHostInstance now that we maintain
    our own map of public instances.
    
    This relies on the assumption that this is a DOM renderer but we could always
    add support for more renderer types that need conflict resolution if they
    happen.
    sebmarkbage committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    0fb4a94 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    47a1fa8 View commit details
    Browse the repository at this point in the history
  6. Untrack Fiber by walking the Fiber tree

    If we have any filtered children, we need to untrack those as well.
    sebmarkbage committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    a4ae4d6 View commit details
    Browse the repository at this point in the history