From 475a425a20fc929169431793bd6c4d0d941db7e2 Mon Sep 17 00:00:00 2001 From: Chaiwat Ekkaewnumchai Date: Tue, 5 May 2020 06:40:46 -0700 Subject: [PATCH] Change ElementID to Element for Sidebar Extension Summary: Element also contains `id`, which is equivalent to ElementID used in the existing extension. This change will help the implementation of layout intern search easier. Reviewed By: mweststrate Differential Revision: D21385001 fbshipit-source-id: b8c6e6f052af8cfa54bf3a132571e40567cdee4b --- desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx | 4 ++-- desktop/plugins/layout/InspectorSidebar.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx b/desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx index 226d73232..25e98b5b5 100644 --- a/desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx +++ b/desktop/app/src/fb-stubs/LayoutInspectorSidebarExtensions.tsx @@ -7,14 +7,14 @@ * @format */ -import {PluginClient, Client, ElementID} from 'flipper'; +import {PluginClient, Client, Element} from 'flipper'; import {Logger} from 'app/src/fb-interfaces/Logger'; export default [] as Array< ( client: PluginClient, realClient: Client, - selectedNode: ElementID, + selectedNode: Element, logger: Logger, ) => React.ReactNode >; diff --git a/desktop/plugins/layout/InspectorSidebar.tsx b/desktop/plugins/layout/InspectorSidebar.tsx index 603a5dd97..877a6e007 100644 --- a/desktop/plugins/layout/InspectorSidebar.tsx +++ b/desktop/plugins/layout/InspectorSidebar.tsx @@ -149,7 +149,7 @@ const Sidebar: React.FC = (props: Props) => { const sections: Array = ( (SidebarExtensions && SidebarExtensions.map((ext) => - ext(props.client, props.realClient, element.id, props.logger), + ext(props.client, props.realClient, element, props.logger), )) || [] ).concat(