Skip to content

Conversation

srinathvijay
Copy link
Contributor

  1. Extending the functionality of TodoList by adding support for - multiple todo lists, fetching todo items in a paginated response, option to support title and description for each todo item, bottomsheet to add/edit todo item, option to delete all todo items
  2. Extending the AutologgingWrapper to support captuing the surface tree of react native apps. The Surface.tsx component uses and listens to components mount/unmount lifecycle events to append/purge them to the surface tree
  3. Created ALSurfaceUtils.ts file, that extracts all platform agnostic logic and can be shared with web and react native
  4. Created the SurfaceDebugger util that provides useful console commands to log the different autologging outputs/status to the console. Use SurfaceDebugger.help() to see the list of supported commands
Screenshot 2025-09-04 at 19 11 55 Screenshot 2025-09-04 at 19 12 07

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 4, 2025
@srinathvijay srinathvijay force-pushed the react-native-surface-tree branch from 5c168f6 to ed24ded Compare September 10, 2025 13:34
children
);
}
// DOM-specific wrapper creation - commented out for React Native compatibility
Copy link
Member

Choose a reason for hiding this comment

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

With these types of things commented out, does the functionality you were testing in RN still work?

It seems like a lot of changes are specific to element reference, nodeRef is optional so it should be fine to just not pass for RN case.

The element specific things I'm wondering how we should approach conditionally doing vs. not doing those things depending on run context.

cc: @reshadi for thoughts

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, looks like all the changes is just about the element, we can make that optional, also in typescript we can use "interface merging" to define an HTMLElement type that can help us continue compiling code in RN even if those types are not defined.

I'm also thinking about splitting these components further to to server the the web/RN versions that have different useLayoutEffect.

}

SurfaceProxy.init({ ...options, surfaceComponent: Surface });
// SurfaceProxy.init({ ...options, surfaceComponent: Surface });
Copy link
Member

Choose a reason for hiding this comment

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

We confirmed there is no createPortal in RN right? This would be something else specific to web we need to conditionally do.

}
// DOM-specific lookup - commented out for React Native compatibility
// React Native doesn't have document.querySelectorAll
// const el = document.querySelectorAll(`[${this.domAttributeName}="${this.domAttributeValue}"]`);
Copy link
Member

Choose a reason for hiding this comment

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

This seems like just a fallback, I wonder if it is needed if we fully trust ALSurfaceData to be the SoT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants