diff --git a/desktop/plugins/public/ui-debugger/ClientTypes.tsx b/desktop/plugins/public/ui-debugger/ClientTypes.tsx index d58e71514..85a11890b 100644 --- a/desktop/plugins/public/ui-debugger/ClientTypes.tsx +++ b/desktop/plugins/public/ui-debugger/ClientTypes.tsx @@ -228,6 +228,7 @@ export type Inspectable = | InspectableSize | InspectableBounds | InspectableSpaceBox + | InspectablePluginDeepLink | InspectableUnknown; export type InspectableText = { @@ -285,6 +286,13 @@ export type InspectableObject = { fields: Record; }; +export type InspectablePluginDeepLink = { + type: 'pluginDeeplink'; + label?: string; + pluginId: string; + deeplinkPayload: unknown; +}; + export type InspectableArray = { type: 'array'; items: Inspectable[]; diff --git a/desktop/plugins/public/ui-debugger/components/sidebarV2/AttributesInspector.tsx b/desktop/plugins/public/ui-debugger/components/sidebarV2/AttributesInspector.tsx index 73684e3db..2169bf2ba 100644 --- a/desktop/plugins/public/ui-debugger/components/sidebarV2/AttributesInspector.tsx +++ b/desktop/plugins/public/ui-debugger/components/sidebarV2/AttributesInspector.tsx @@ -16,6 +16,7 @@ import { Layout, styled, useLocalStorageState, + usePlugin, } from 'flipper-plugin'; import React, {useState} from 'react'; import { @@ -33,6 +34,9 @@ import {any} from 'lodash/fp'; import {InspectableColor} from '../../ClientTypes'; import {transformAny} from '../../utils/dataTransform'; import {SearchOutlined} from '@ant-design/icons'; +import {plugin} from '../../index'; +// eslint-disable-next-line @typescript-eslint/no-unused-vars +import {Glyph} from 'flipper'; type ModalData = { data: unknown; @@ -433,6 +437,7 @@ function AttributeValue({ name: string; inspectable: Inspectable; }) { + const instance = usePlugin(plugin); switch (inspectable.type) { case 'boolean': return ( @@ -551,6 +556,39 @@ function AttributeValue({ ); + case 'pluginDeeplink': + return ( + + ); } return null; } diff --git a/desktop/plugins/public/ui-debugger/index.tsx b/desktop/plugins/public/ui-debugger/index.tsx index a7cd12a87..10dcc97f6 100644 --- a/desktop/plugins/public/ui-debugger/index.tsx +++ b/desktop/plugins/public/ui-debugger/index.tsx @@ -297,6 +297,7 @@ export function plugin(client: PluginClient) { metadata, perfEvents, os: client.device.os, + client, }; }