diff --git a/desktop/flipper-plugin/src/ui/data-inspector/DataInspector.tsx b/desktop/flipper-plugin/src/ui/data-inspector/DataInspector.tsx index e3713016ff3..6e3dff96081 100644 --- a/desktop/flipper-plugin/src/ui/data-inspector/DataInspector.tsx +++ b/desktop/flipper-plugin/src/ui/data-inspector/DataInspector.tsx @@ -14,6 +14,10 @@ import React from 'react'; import {DataValueExtractor} from './DataPreview'; import {HighlightProvider, HighlightManager} from '../Highlight'; import {Layout} from '../Layout'; +import {Dropdown, MenuProps} from 'antd'; +import {_tryGetFlipperLibImplementation} from 'flipper-plugin'; +import {safeStringify} from 'flipper-plugin'; +import {getValueAtPath} from '../data-table/DataTableManager'; export type DataInspectorProps = { /** @@ -109,7 +113,9 @@ export class DataInspector extends PureComponent< filterExpanded: {}, filter: '', hoveredNodePath: undefined, - }; + } as DataInspectorState; + + isContextMenuOpen = false; static getDerivedStateFromProps( nextProps: DataInspectorProps, @@ -193,9 +199,11 @@ export class DataInspector extends PureComponent< }; setHoveredNodePath = (path?: string) => { - this.setState({ - hoveredNodePath: path, - }); + if (!this.isContextMenuOpen) { + this.setState({ + hoveredNodePath: path, + }); + } }; removeHover = () => { @@ -209,34 +217,108 @@ export class DataInspector extends PureComponent< render() { return ( - - - - - - - + { + this.isContextMenuOpen = open; + }} + trigger={['contextMenu']}> + + + + + + + + ); } + + getContextMenu = () => { + const lib = _tryGetFlipperLibImplementation(); + + let extraItems = [] as MenuProps['items']; + + const hoveredNodePath = this.state.hoveredNodePath; + const value = + hoveredNodePath != null && hoveredNodePath.length > 0 + ? getValueAtPath(this.props.data, hoveredNodePath) + : this.props.data; + if ( + this.props.additionalContextMenuItems != null && + hoveredNodePath != null && + hoveredNodePath.length > 0 + ) { + const fullPath = hoveredNodePath.split('.'); + const parentPath = fullPath.slice(0, fullPath.length - 1); + const name = fullPath[fullPath.length - 1]; + + const additionalItems = this.props.additionalContextMenuItems( + parentPath, + value, + name, + ); + + extraItems = [ + ...additionalItems.map((component) => ({ + key: `additionalItem-${parentPath}.${name}`, + label: component, + })), + {type: 'divider'}, + ]; + } + + const items = [ + ...(extraItems as []), + {key: 'copy-value', label: 'Copy'}, + ...(this.props.onDelete != null + ? [{key: 'delete-value', label: 'Delete'}] + : []), + {type: 'divider'}, + {key: 'copy-tree', label: 'Copy full tree'}, + ...(lib?.isFB ? [{key: 'create-paste', label: 'Create paste'}] : []), + ] as MenuProps['items']; + + return { + items, + onClick: (info) => { + this.isContextMenuOpen = false; + if (info.key === 'copy-value') { + if (this.state.hoveredNodePath != null) { + const value = getValueAtPath( + this.props.data, + this.state.hoveredNodePath, + ); + lib?.writeTextToClipboard(safeStringify(value)); + } + } else if (info.key === 'delete-value') { + const pathStr = this.state.hoveredNodePath as string | undefined; + this.props.onDelete?.(pathStr?.split('.') ?? []); + } else if (info.key === 'copy-tree') { + lib?.writeTextToClipboard(safeStringify(this.props.data)); + } else if (info.key === 'create-paste') { + lib?.createPaste(safeStringify(this.props.data)); + } + }, + } as MenuProps; + }; } diff --git a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx index 3a099aad9a1..f24ee77649f 100644 --- a/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx +++ b/desktop/flipper-plugin/src/ui/data-inspector/DataInspectorNode.tsx @@ -16,27 +16,20 @@ import { useEffect, useCallback, createContext, - useContext, - ReactElement, - SyntheticEvent, } from 'react'; import styled from '@emotion/styled'; import DataPreview, {DataValueExtractor, InspectorName} from './DataPreview'; import {getSortedKeys} from './utils'; import React from 'react'; import {useHighlighter, HighlightManager} from '../Highlight'; -import {Dropdown, Menu, Tooltip} from 'antd'; +import {Tooltip} from 'antd'; import {useInUnitTest} from '../../utils/useInUnitTest'; import {theme} from '../theme'; -import {tryGetFlipperLibImplementation} from '../../plugin/FlipperLib'; -import {safeStringify} from '../../utils/safeStringify'; export {DataValueExtractor} from './DataPreview'; export const RootDataContext = createContext<() => any>(() => ({})); -export const contextMenuTrigger = ['contextMenu' as const]; - const BaseContainer = styled.div<{ depth?: number; disabled?: boolean; @@ -144,9 +137,6 @@ type DataInspectorProps = { */ onExpanded?: ((path: string, expanded: boolean) => void) | undefined | null; /** - * Callback whenever delete action is invoked on current path. - */ - onDelete?: DataInspectorDeleteValue | undefined | null; /** * Render callback that can be used to customize the rendering of object keys. */ @@ -175,11 +165,6 @@ type DataInspectorProps = { * Object of properties that will have tooltips */ tooltips?: any; - additionalContextMenuItems?: ( - parentPath: string[], - value: any, - name?: string, - ) => ReactElement[]; hoveredNodePath?: string; @@ -308,7 +293,6 @@ export const DataInspectorNode: React.FC = memo( expandRoot, parentPath, onExpanded, - onDelete, onRenderName, onRenderDescription, extractValue: extractValueProp, @@ -318,12 +302,10 @@ export const DataInspectorNode: React.FC = memo( collapsed, tooltips, setValue: setValueProp, - additionalContextMenuItems, hoveredNodePath, setHoveredNodePath, }) { const highlighter = useHighlighter(); - const getRoot = useContext(RootDataContext); const isUnitTest = useInUnitTest(); const shouldExpand = useRef(false); @@ -417,22 +399,19 @@ export const DataInspectorNode: React.FC = memo( [onExpanded, expandedPaths], ); - const handleClick = useCallback(() => { - if (!isUnitTest) { - cancelIdleCallback(expandHandle.current); - } - const isExpanded = shouldBeExpanded(expandedPaths, path, collapsed); - setExpanded(path, !isExpanded); - }, [expandedPaths, path, collapsed, isUnitTest]); - - const handleDelete = useCallback( - (path: Array) => { - if (!onDelete) { + const handleClick = useCallback( + (event) => { + if (!isUnitTest) { + cancelIdleCallback(expandHandle.current); + } + if (event.buttons !== 0) { + //only process left click return; } - onDelete(path); + const isExpanded = shouldBeExpanded(expandedPaths, path, collapsed); + setExpanded(path, !isExpanded); }, - [onDelete], + [expandedPaths, path, collapsed, isUnitTest], ); /** @@ -488,7 +467,6 @@ export const DataInspectorNode: React.FC = memo( expanded={expandedPaths} collapsed={collapsed} onExpanded={onExpanded} - onDelete={onDelete} onRenderName={onRenderName} onRenderDescription={onRenderDescription} parentPath={path} @@ -498,7 +476,6 @@ export const DataInspectorNode: React.FC = memo( data={metadata.data} diff={metadata.diff} tooltips={tooltips} - additionalContextMenuItems={additionalContextMenuItems} /> ); @@ -592,78 +569,27 @@ export const DataInspectorNode: React.FC = memo( } } - function getContextMenu() { - const lib = tryGetFlipperLibImplementation(); - const extraItems = additionalContextMenuItems - ? [ - additionalContextMenuItems(parentPath, value, name), - , - ] - : []; - return ( - - {extraItems} - { - lib?.writeTextToClipboard(safeStringify(getRoot())); - }}> - Copy tree - - {lib?.isFB && ( - { - lib?.createPaste(safeStringify(getRoot())); - }}> - Create paste from tree - - )} - - { - lib?.writeTextToClipboard(safeStringify(data)); - }}> - Copy value - - {!isExpandable && onDelete ? ( - { - handleDelete(path); - }}> - Delete - - ) : null} - - ); - } - const nodePath = path.join('.'); return ( - - { - setHoveredNodePath(nodePath); - }} - onMouseLeave={() => { - setHoveredNodePath(parentPath.join('.')); - }} - depth={depth} - disabled={!!setValueProp && !!setValue === false}> - - {expandedPaths && {expandGlyph}} - {descriptionOrPreview} - {wrapperStart} - - {propertyNodesContainer} - {wrapperEnd} - - + { + setHoveredNodePath(nodePath); + }} + onMouseLeave={() => { + setHoveredNodePath(parentPath.join('.')); + }} + depth={depth} + disabled={!!setValueProp && !!setValue === false}> + + {expandedPaths && {expandGlyph}} + {descriptionOrPreview} + {wrapperStart} + + {propertyNodesContainer} + {wrapperEnd} + ); }, dataInspectorPropsAreEqual, @@ -748,7 +674,6 @@ function dataInspectorPropsAreEqual( nextProps.depth === props.depth && nextProps.parentPath === props.parentPath && nextProps.onExpanded === props.onExpanded && - nextProps.onDelete === props.onDelete && nextProps.setValue === props.setValue && nextProps.collapsed === props.collapsed && nextProps.expandRoot === props.expandRoot && @@ -761,8 +686,3 @@ function isValueExpandable(data: any) { typeof data === 'object' && data !== null && Object.keys(data).length > 0 ); } - -function stopPropagation(e: SyntheticEvent) { - //without this the parent element will receive the context menu event and multiple context menus overlap - e.stopPropagation(); -} diff --git a/desktop/flipper-plugin/src/ui/data-inspector/__tests__/DataInspector.node.tsx b/desktop/flipper-plugin/src/ui/data-inspector/__tests__/DataInspector.node.tsx index 657187239cd..1b3ba807b5a 100644 --- a/desktop/flipper-plugin/src/ui/data-inspector/__tests__/DataInspector.node.tsx +++ b/desktop/flipper-plugin/src/ui/data-inspector/__tests__/DataInspector.node.tsx @@ -45,21 +45,27 @@ test('additional context menu items are rendered', async () => { data={json} expandRoot additionalContextMenuItems={(parentPath, value, name) => { - return [ - - path={[...parentPath, name].join('->')} - , - ]; + const path = [...parentPath, name].join('->'); + return [path={path}]; }} />, ); expect(await res.queryByText('path=data')).toBeFalsy; - fireEvent.contextMenu(await res.findByText(/data/), {}); - expect(await res.findByText('path=data')).toBeTruthy; + const dataContainer = await res.findByText(/data/); + fireEvent.mouseEnter(dataContainer, {}); + fireEvent.contextMenu(dataContainer, {}); + + const contextItem = await res.findByText('path=data'); + expect(contextItem).toBeTruthy; + fireEvent.click(contextItem); + expect(await res.queryByText('path=data')).toBeFalsy; + fireEvent.mouseLeave(dataContainer, {}); //try on a nested element - fireEvent.contextMenu(await res.findByText(/awesomely/), {}); + const awesomely = await res.findByText(/awesomely/); + fireEvent.mouseEnter(awesomely, {}); + fireEvent.contextMenu(awesomely, {}); expect(await res.findByText('path=data->is->awesomely')).toBeTruthy; }); diff --git a/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx b/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx index 81211b10532..95d276ba1f8 100644 --- a/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx +++ b/desktop/flipper-plugin/src/ui/data-table/TableRow.tsx @@ -14,7 +14,7 @@ import {DataTableColumn, TableRowRenderContext} from './DataTable'; import {Width} from '../../utils/widthUtils'; import {DataFormatter} from '../DataFormatter'; import {Dropdown} from 'antd'; -import {contextMenuTrigger} from '../data-inspector/DataInspectorNode'; + import {getValueAtPath} from './DataTableManager'; import {HighlightManager, useHighlighter} from '../Highlight'; @@ -146,7 +146,7 @@ export const TableRow = memo(function TableRow({ ); if (config.onContextMenu) { return ( - + {row} ); diff --git a/desktop/flipper-ui/src/app-connection-updates.tsx b/desktop/flipper-ui/src/app-connection-updates.tsx index 670913d73ee..786a30e5fde 100644 --- a/desktop/flipper-ui/src/app-connection-updates.tsx +++ b/desktop/flipper-ui/src/app-connection-updates.tsx @@ -8,13 +8,16 @@ */ import {css} from '@emotion/css'; -import {Button, message, notification, Typography} from 'antd'; +import {Button, message, Modal, notification, Typography} from 'antd'; import React from 'react'; import {Layout} from './ui'; +import {Dialog} from 'flipper-plugin'; +import {getFlipperServer} from './flipperServer'; type ConnectionUpdate = { key: string; type: 'loading' | 'info' | 'success' | 'success-info' | 'error' | 'warning'; + os: string; app: string; device: string; title: string; @@ -92,14 +95,150 @@ export const connectionUpdate = ( if (update.detail) { content += `\n ${update.detail}`; } + let duration = 0; + if (update.type === 'success' || update.type === 'success-info') { + duration = 3; + } else if (update.type === 'loading') { + // seconds until show how to debug hanging connection + duration = 30; + } message.open({ - key: update.app, + key: update.key, type: update.type === 'success-info' ? 'info' : update.type, content, className, - duration: - update.type === 'success' || update.type === 'success-info' ? 3 : 0, - onClick: () => message.destroy(update.key), + duration, + onClick: + update.type !== 'loading' + ? () => { + message.destroy(update.key); + } + : undefined, + // NOTE: `onClose` is only called when the message is closed by antd because of `duration` + // It is not closed when we call `message.destroy(key)`. + // Thus we can use it trigger a timeout modal for hanging "attempting to connect" messages + onClose: () => { + if (update.type === 'loading') { + Dialog.showModal((hide) => ( + + )); + } + }, }); } }; + +const styles = { + numberedList: { + listStyle: 'auto', + paddingLeft: 16, + display: 'flex', + flexDirection: 'column', + gap: 4, + } satisfies React.CSSProperties, + title: { + marginBottom: 8, + } satisfies React.CSSProperties, +}; + +function DIYConnectivityFixModal({ + app, + os, + onHide, +}: { + app: string; + os: string; + onHide: () => void; +}) { + return ( + +
+ + Connecting to {app} has timed out. + + + This is usually can be fixed in a few ways. Try the following in the + order presented. + + + Least involved + +
    +
  1. + + Completly close the app on the device + +
  2. +
  3. + +
  4. +
  5. + Launch the app on the device +
  6. +
+ + More involved + +
    +
  1. + Restart device +
  2. +
  3. + +
  4. +
+ + Most involved + + + This can be frequently fixed by restarting your computer. + +
+
+ ); +} diff --git a/desktop/flipper-ui/src/chrome/ShareSheetExportUrl.tsx b/desktop/flipper-ui/src/chrome/ShareSheetExportUrl.tsx deleted file mode 100644 index a2a60ccfbac..00000000000 --- a/desktop/flipper-ui/src/chrome/ShareSheetExportUrl.tsx +++ /dev/null @@ -1,224 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - */ - -import {FlexColumn, styled, Text, FlexRow, Spacer, Input} from '../ui'; -import React, {Component} from 'react'; -import {ReactReduxContext, ReactReduxContextValue} from 'react-redux'; -import {Logger} from 'flipper-common'; -import {IdlerImpl} from '../utils/Idler'; -import { - DataExportResult, - DataExportError, - shareFlipperData, -} from '../fb-stubs/user'; -import { - exportStore, - EXPORT_FLIPPER_TRACE_EVENT, - displayFetchMetadataErrors, -} from '../utils/exportData'; -import ShareSheetErrorList from './ShareSheetErrorList'; -import {reportPlatformFailures} from 'flipper-common'; -import ShareSheetPendingDialog from './ShareSheetPendingDialog'; -import {getLogger} from 'flipper-common'; -import {MiddlewareAPI} from '../reducers/index'; -import {getFlipperLib, Layout} from 'flipper-plugin'; -import {Button, Modal} from 'antd'; - -export const SHARE_FLIPPER_TRACE_EVENT = 'share-flipper-link'; - -const Copy = styled(Input)({ - marginRight: 0, - marginBottom: 15, -}); - -const InfoText = styled(Text)({ - lineHeight: 1.35, - marginBottom: 15, -}); - -const Title = styled(Text)({ - marginBottom: 6, -}); - -const ErrorMessage = styled(Text)({ - display: 'block', - marginTop: 6, - wordBreak: 'break-all', - whiteSpace: 'pre-line', - lineHeight: 1.35, -}); - -type Props = { - onHide: () => any; - logger: Logger; -}; - -type State = { - fetchMetaDataErrors: { - [plugin: string]: Error; - } | null; - result: DataExportError | DataExportResult | null; - statusUpdate: string | null; -}; - -export default class ShareSheetExportUrl extends Component { - static contextType: React.Context = ReactReduxContext; - - state: State = { - fetchMetaDataErrors: null, - result: null, - statusUpdate: null, - }; - - get store(): MiddlewareAPI { - return this.context.store; - } - - idler = new IdlerImpl(); - - async componentDidMount() { - const mark = 'shareSheetExportUrl'; - performance.mark(mark); - try { - const statusUpdate = (msg: string) => { - this.setState({statusUpdate: msg}); - }; - const {serializedString, fetchMetaDataErrors} = - await reportPlatformFailures( - exportStore(this.store, false, this.idler, statusUpdate), - `${EXPORT_FLIPPER_TRACE_EVENT}:UI_LINK`, - ); - const uploadMarker = `${EXPORT_FLIPPER_TRACE_EVENT}:upload`; - performance.mark(uploadMarker); - statusUpdate('Uploading Flipper Export...'); - const result = await reportPlatformFailures( - shareFlipperData(serializedString), - `${SHARE_FLIPPER_TRACE_EVENT}`, - ); - - if ((result as DataExportError).error != undefined) { - const res = result as DataExportError; - const err = new Error(res.error); - err.stack = res.stacktrace; - throw err; - } - getLogger().trackTimeSince(uploadMarker, uploadMarker, { - plugins: this.store.getState().plugins.selectedPlugins, - }); - const flipperUrl = (result as DataExportResult).flipperUrl; - if (flipperUrl) { - getFlipperLib().writeTextToClipboard(String(flipperUrl)); - new Notification('Shareable Flipper Export created', { - body: 'URL copied to clipboard', - requireInteraction: true, - }); - } - this.setState({fetchMetaDataErrors, result}); - this.props.logger.trackTimeSince(mark, 'export:url-success'); - } catch (e) { - const result: DataExportError = { - error_class: 'EXPORT_ERROR', - error: e, - stacktrace: '', - }; - if (e instanceof Error) { - result.error = e.message; - result.stacktrace = e.stack || ''; - } - // Show the error in UI. - this.setState({result}); - this.props.logger.trackTimeSince(mark, 'export:url-error', result); - console.error('Failed to export to flipper trace', e); - } - } - - componentDidUpdate() { - const {result} = this.state; - if (!result || !(result as DataExportResult).flipperUrl) { - return; - } - } - - cancelAndHide = () => { - this.props.onHide(); - this.idler.cancel(); - }; - - renderPending(statusUpdate: string | null) { - return ( - - - - ); - } - - render() { - const {result, statusUpdate, fetchMetaDataErrors} = this.state; - if (!result) { - return this.renderPending(statusUpdate); - } - - const {title, errorArray} = displayFetchMetadataErrors(fetchMetaDataErrors); - return ( - - - <> - - {(result as DataExportResult).flipperUrl ? ( - <> - Data Upload Successful - - Flipper's data was successfully uploaded. This URL can be - used to share with other Flipper users. Opening it will - import the data from your export. - - - - When sharing your Flipper link, consider that the captured - data might contain sensitve information like access tokens - used in network requests. - - - - ) : ( - <> - - {(result as DataExportError).error_class || 'Error'} - - - {(result as DataExportError).error || - 'The data could not be uploaded'} - - - )} - - - - - - - - - ); - } -} diff --git a/desktop/flipper-ui/src/dispatcher/flipperServer.tsx b/desktop/flipper-ui/src/dispatcher/flipperServer.tsx index 8118cd6d23a..bc31d325dc5 100644 --- a/desktop/flipper-ui/src/dispatcher/flipperServer.tsx +++ b/desktop/flipper-ui/src/dispatcher/flipperServer.tsx @@ -102,6 +102,7 @@ export function connectFlipperServerToStore( type: 'loading', app: client.appName, device: client.deviceName, + os: client.os, title: 'is attempting to connect...', }, troubleshootConnection, @@ -113,6 +114,7 @@ export function connectFlipperServerToStore( { key: buildGenericClientId(client), type, + os: client.os, app: client.appName, device: client.deviceName, title: 'failed to establish a connection', @@ -161,6 +163,7 @@ export function connectFlipperServerToStore( key: buildGenericClientId(client), type: 'info', app: client.appName, + os: client.os, device: client.deviceName, title: step, }, @@ -182,6 +185,7 @@ export function connectFlipperServerToStore( type: 'success', app: payload.query.app, device: payload.query.device, + os: payload.query.os, title: 'successfully connected', }, troubleshootConnection, @@ -198,6 +202,7 @@ export function connectFlipperServerToStore( key: buildGenericClientIdFromQuery(existingClient.query), type: 'success-info', app: existingClient.query.app, + os: existingClient.query.os, device: existingClient.query.device, title: 'disconnected', }, diff --git a/desktop/flipper-ui/src/fb-stubs/constants.tsx b/desktop/flipper-ui/src/fb-stubs/constants.tsx index 501d88ea1d5..da1e3b8571e 100644 --- a/desktop/flipper-ui/src/fb-stubs/constants.tsx +++ b/desktop/flipper-ui/src/fb-stubs/constants.tsx @@ -12,9 +12,6 @@ import {DeviceOS} from 'flipper-plugin'; export default Object.freeze({ IS_PUBLIC_BUILD: true, - // Enables the flipper data to be exported through shareabale link - ENABLE_SHAREABLE_LINK: false, - FEEDBACK_GROUP_LINK: 'https://github.com/facebook/flipper/issues', // Workplace Group ID's diff --git a/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx b/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx index 52326841af5..90125e0576b 100644 --- a/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx +++ b/desktop/flipper-ui/src/sandy-chrome/Navbar.tsx @@ -53,11 +53,9 @@ import { ExportEverythingEverywhereAllAtOnceStatus, startFileImport, startFileExport, - startLinkExport, } from '../utils/exportData'; import UpdateIndicator from '../chrome/UpdateIndicator'; import {css} from '@emotion/css'; -import constants from '../fb-stubs/constants'; import {setStaticView} from '../reducers/connections'; import {StyleGuide} from './StyleGuide'; import {openDeeplinkDialog} from '../deeplink'; @@ -638,11 +636,6 @@ function ExtrasMenu() { () => startFileExport(store.dispatch), [store.dispatch], ); - const startLinkExportTracked = useTrackedCallback( - 'Link export', - () => startLinkExport(store.dispatch), - [store.dispatch], - ); const startFileImportTracked = useTrackedCallback( 'File import', () => startFileImport(store), @@ -679,15 +672,6 @@ function ExtrasMenu() { label: 'Export Flipper file', onClick: startFileExportTracked, }, - ...(constants.ENABLE_SHAREABLE_LINK - ? [ - { - key: 'exportShareableLink', - label: 'Export shareable link', - onClick: startLinkExportTracked, - }, - ] - : []), { type: 'divider', }, diff --git a/desktop/flipper-ui/src/utils/exportData.tsx b/desktop/flipper-ui/src/utils/exportData.tsx index 4f5d24c0816..4ae11306bc4 100644 --- a/desktop/flipper-ui/src/utils/exportData.tsx +++ b/desktop/flipper-ui/src/utils/exportData.tsx @@ -28,7 +28,6 @@ import {processMessageQueue} from './messageQueue'; import {getPluginTitle} from './pluginUtils'; import {Dialog, getFlipperLib, Idler} from 'flipper-plugin'; import {ClientQuery} from 'flipper-common'; -import ShareSheetExportUrl from '../chrome/ShareSheetExportUrl'; import ShareSheetExportFile from '../chrome/ShareSheetExportFile'; import ExportDataPluginSheet from '../chrome/ExportDataPluginSheet'; import {exportLogs} from '../chrome/ConsoleLogs'; @@ -456,7 +455,7 @@ async function getStoreExport( export async function exportStore( store: MiddlewareAPI, - includeSupportDetails?: boolean, + _includeSupportDetails?: boolean, idler: Idler = new TestIdler(true), statusUpdate: (msg: string) => void = () => {}, ): Promise<{ @@ -755,19 +754,6 @@ export async function startFileExport(dispatch: Store['dispatch']) { )); } -export async function startLinkExport(dispatch: Store['dispatch']) { - const plugins = await selectPlugins(); - if (plugins === false) { - return; // cancelled - } - // TODO: no need to put this in the store, - // need to be cleaned up later in combination with SupportForm - dispatch(selectedPlugins(plugins)); - Dialog.showModal((onHide) => ( - - )); -} - async function selectPlugins() { return await Dialog.select({ title: 'Select plugins to export', diff --git a/desktop/package.json b/desktop/package.json index 6c043b53a39..20343ea5d2a 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -165,7 +165,7 @@ "npm": "use yarn instead", "yarn": "^1.16" }, - "version": "0.257.0", + "version": "0.259.0", "workspaces": { "packages": [ "scripts", diff --git a/desktop/pkg/package.json b/desktop/pkg/package.json index 96e965dae26..9bee7c22f32 100644 --- a/desktop/pkg/package.json +++ b/desktop/pkg/package.json @@ -15,7 +15,7 @@ "@oclif/command": "^1.8.36", "@oclif/config": "^1.18.17", "@oclif/parser": "^3.8.17", - "@oclif/plugin-help": "^5.2.20", + "@oclif/plugin-help": "^3.3.1", "@oclif/plugin-warn-if-update-available": "^2.1.1", "ajv": "^6.12.2", "ajv-errors": "^1.0.1", diff --git a/desktop/plugins/public/layout/docs/setup.mdx b/desktop/plugins/public/layout/docs/setup.mdx index 4b49b8a9c56..268d3e63451 100644 --- a/desktop/plugins/public/layout/docs/setup.mdx +++ b/desktop/plugins/public/layout/docs/setup.mdx @@ -27,7 +27,7 @@ You also need to compile in the `litho-annotations` package, as Flipper reflects ```groovy dependencies { - debugImplementation 'com.facebook.flipper:flipper-litho-plugin:0.257.0' + debugImplementation 'com.facebook.flipper:flipper-litho-plugin:0.259.0' debugImplementation 'com.facebook.litho:litho-annotations:0.19.0' // ... } diff --git a/desktop/plugins/public/leak_canary/docs/setup.mdx b/desktop/plugins/public/leak_canary/docs/setup.mdx index 0a272114d4c..406238b2917 100644 --- a/desktop/plugins/public/leak_canary/docs/setup.mdx +++ b/desktop/plugins/public/leak_canary/docs/setup.mdx @@ -8,7 +8,7 @@ To setup the LeakCan ```groovy dependencies { - debugImplementation 'com.facebook.flipper:flipper-leakcanary2-plugin:0.257.0' + debugImplementation 'com.facebook.flipper:flipper-leakcanary2-plugin:0.259.0' debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1' } ``` diff --git a/desktop/plugins/public/network/docs/setup.mdx b/desktop/plugins/public/network/docs/setup.mdx index 12e154e3fa7..02c2c0782c2 100644 --- a/desktop/plugins/public/network/docs/setup.mdx +++ b/desktop/plugins/public/network/docs/setup.mdx @@ -11,7 +11,7 @@ The network plugin is shipped as a separate Maven artifact, as follows: ```groovy dependencies { - debugImplementation 'com.facebook.flipper:flipper-network-plugin:0.257.0' + debugImplementation 'com.facebook.flipper:flipper-network-plugin:0.259.0' } ``` diff --git a/desktop/static/CHANGELOG.md b/desktop/static/CHANGELOG.md index d593f9aaf7d..d346becf32c 100644 --- a/desktop/static/CHANGELOG.md +++ b/desktop/static/CHANGELOG.md @@ -1,3 +1,8 @@ +# 0.258.0 (16/7/2024) + + * [D59629955](https://github.com/facebook/flipper/search?q=D59629955&type=Commits) - Update offline message + + # 0.257.0 (10/7/2024) * [D59001348](https://github.com/facebook/flipper/search?q=D59001348&type=Commits) - [Internal] diff --git a/desktop/yarn.lock b/desktop/yarn.lock index a6bab64a0a4..47edeae3885 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -3083,12 +3083,22 @@ widest-line "^3.1.0" wrap-ansi "^6.2.0" -"@oclif/plugin-help@^5.2.20": - version "5.2.20" - resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-5.2.20.tgz#4035a0ac231f95fb8e334da342175e3ca00f6abc" - integrity sha512-u+GXX/KAGL9S10LxAwNUaWdzbEBARJ92ogmM7g3gDVud2HioCmvWQCDohNRVZ9GYV9oKwZ/M8xwd6a1d95rEKQ== +"@oclif/plugin-help@^3.3.1": + version "3.3.1" + resolved "https://registry.yarnpkg.com/@oclif/plugin-help/-/plugin-help-3.3.1.tgz#36adb4e0173f741df409bb4b69036d24a53bfb24" + integrity sha512-QuSiseNRJygaqAdABYFWn/H1CwIZCp9zp/PLid6yXvy6VcQV7OenEFF5XuYaCvSARe2Tg9r8Jqls5+fw1A9CbQ== dependencies: - "@oclif/core" "^2.15.0" + "@oclif/command" "^1.8.15" + "@oclif/config" "1.18.2" + "@oclif/errors" "1.3.5" + "@oclif/help" "^1.0.1" + chalk "^4.1.2" + indent-string "^4.0.0" + lodash "^4.17.21" + string-width "^4.2.0" + strip-ansi "^6.0.0" + widest-line "^3.1.0" + wrap-ansi "^6.2.0" "@oclif/plugin-warn-if-update-available@^2.1.1": version "2.1.1" diff --git a/docs/getting-started/android-native.mdx b/docs/getting-started/android-native.mdx index 22acd81b231..02e17eae9f5 100644 --- a/docs/getting-started/android-native.mdx +++ b/docs/getting-started/android-native.mdx @@ -24,10 +24,10 @@ repositories { } dependencies { - debugImplementation 'com.facebook.flipper:flipper:0.257.0' + debugImplementation 'com.facebook.flipper:flipper:0.259.0' debugImplementation 'com.facebook.soloader:soloader:0.10.5' - releaseImplementation 'com.facebook.flipper:flipper-noop:0.257.0' + releaseImplementation 'com.facebook.flipper:flipper-noop:0.259.0' } ``` @@ -124,10 +124,10 @@ repositories { } dependencies { - debugImplementation 'com.facebook.flipper:flipper:0.257.1-SNAPSHOT' + debugImplementation 'com.facebook.flipper:flipper:0.259.1-SNAPSHOT' debugImplementation 'com.facebook.soloader:soloader:0.10.5' - releaseImplementation 'com.facebook.flipper:flipper-noop:0.257.1-SNAPSHOT' + releaseImplementation 'com.facebook.flipper:flipper-noop:0.259.1-SNAPSHOT' } ``` diff --git a/docs/getting-started/react-native-ios.mdx b/docs/getting-started/react-native-ios.mdx index 5bc7f3b0726..fb16681f44e 100644 --- a/docs/getting-started/react-native-ios.mdx +++ b/docs/getting-started/react-native-ios.mdx @@ -51,7 +51,7 @@ Add all of the code below to your `ios/Podfile`: platform :ios, '9.0' def flipper_pods() - flipperkit_version = '0.257.0' # should match the version of your Flipper client app + flipperkit_version = '0.259.0' # should match the version of your Flipper client app pod 'FlipperKit', '~>' + flipperkit_version, :configuration => 'Debug' pod 'FlipperKit/FlipperKitLayoutPlugin', '~>' + flipperkit_version, :configuration => 'Debug' pod 'FlipperKit/SKIOSNetworkPlugin', '~>' + flipperkit_version, :configuration => 'Debug' diff --git a/docs/getting-started/react-native.mdx b/docs/getting-started/react-native.mdx index 2ece2118838..0cd0ef9689a 100644 --- a/docs/getting-started/react-native.mdx +++ b/docs/getting-started/react-native.mdx @@ -34,7 +34,7 @@ Latest version of Flipper requires react-native 0.69+! If you use react-native < Android: -1. Bump the `FLIPPER_VERSION` variable in `android/gradle.properties`, for example: `FLIPPER_VERSION=0.257.0`. +1. Bump the `FLIPPER_VERSION` variable in `android/gradle.properties`, for example: `FLIPPER_VERSION=0.259.0`. 2. Run `./gradlew clean` in the `android` directory. iOS: @@ -44,7 +44,7 @@ react-native version => 0.69.0 2. Run `pod install --repo-update` in the `ios` directory. react-native version < 0.69.0 -1. Call `use_flipper` with a specific version in `ios/Podfile`, for example: `use_flipper!({ 'Flipper' => '0.257.0' })`. +1. Call `use_flipper` with a specific version in `ios/Podfile`, for example: `use_flipper!({ 'Flipper' => '0.259.0' })`. 2. Run `pod install --repo-update` in the `ios` directory. ## Manual Setup diff --git a/gradle.properties b/gradle.properties index bdca638aa1e..b707f0595a6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # POM publishing constants -VERSION_NAME=0.257.1-SNAPSHOT +VERSION_NAME=0.259.1-SNAPSHOT GROUP=com.facebook.flipper SONATYPE_STAGING_PROFILE=comfacebook POM_URL=https://github.com/facebook/flipper diff --git a/js/js-flipper/package.json b/js/js-flipper/package.json index f1ee533711c..f867fd514d9 100644 --- a/js/js-flipper/package.json +++ b/js/js-flipper/package.json @@ -1,7 +1,7 @@ { "name": "js-flipper", "title": "JS Flipper Bindings for Web-Socket based clients", - "version": "0.257.0", + "version": "0.259.0", "main": "lib/index.js", "browser": { "os": false diff --git a/react-native/react-native-flipper/package.json b/react-native/react-native-flipper/package.json index 1874bce6dee..4a65557b0e6 100644 --- a/react-native/react-native-flipper/package.json +++ b/react-native/react-native-flipper/package.json @@ -1,7 +1,7 @@ { "name": "react-native-flipper", "title": "React Native Flipper Bindings", - "version": "0.257.0", + "version": "0.259.0", "description": "Flipper bindings for React Native", "main": "index.js", "types": "index.d.ts",