Summary:
T98487412 is firing again. This seems to be an expected case that's not handled
correctly.
thinkofthechildren
Reviewed By: fabiomassimo
Differential Revision: D30539615
fbshipit-source-id: d9625bb0a7b3622e5afb6e768bc525c27fdfb02d
Summary: Moved plugin documentation and related assets to plugin folders, fixed links and configured redirects where required. Now these docs are used for both showing docs in Flipper and generating Flipper docs website.
Reviewed By: passy
Differential Revision: D29465567
fbshipit-source-id: 3ec4240b215b0d5baea5154f64266a9ba7ead3a5
Summary:
This diff adds Sandy colors and dark mode support to the `DataInspector` and `LayoutInspector` components, and coverts hardcoded colors to semantic colors. Currently only one set of colors is used since they contrast fine with both dark and light mode, but this could be deviated from now onwards.
Also styled the legacy ManagedTable and Panel, since they are so commonly used (will convert more legacy components in next diffs).
Reviewed By: passy
Differential Revision: D28056698
fbshipit-source-id: 5a85103983f89e82b7f000d309bb9e1e1f07491d
Summary:
After loading a layout plugin snapshot, I noticed the plugin feels really sluggish. I noticed that getDimensions, which recursively walks the full tree, is triggered on every rendering, although the state it introduces is only required when opening a screenshot visualizer. So Moved the function invocation to there.
Also did some first steps on supporting iOS; the visualizer will no show a preview of iOS as well. I'll leave implementing the highlights to a volunteer :)
Reviewed By: passy
Differential Revision: D29262697
fbshipit-source-id: b13b19b013eeeb98abb66fb648a193c69688a7e3
Summary: Now we support splitting metadata to public and fb-internal (see the previous diff in the stack), and this diff actually cleans up all public plugin metadata from fb-specific things.
Reviewed By: passy
Differential Revision: D28568413
fbshipit-source-id: eae699eabaae489c4bcfbfcc407c3bef42bfd338
Summary:
Layer selection is pretty easy to miss, as reported in for example: https://fb.workplace.com/groups/flippersupport/permalink/1098169193997071/
Moved the layer selection to the top of the view and gave it some highlighting + dynamic height. The section is no longer collapsible.
Changelog: [Layout] Make the layer selection more prominent
Reviewed By: priteshrnandgaonkar
Differential Revision: D27708650
fbshipit-source-id: c86a55c3a20794aee86e64b6766b2ca4dd6b563f
Summary:
This diff fixes some more perf bottlenecks in the layout inspector (see the diffs earlier in the stack for the total picture). Mostly:
1. Pass down stable refs from the root for callbacks and configuration
2. Remove the deep-equality check in the sidebar section rendering, which has a pretty significant constant overhead, especially if the selection didn't change
3. If the selection changes, the correct semantics is to reset the sidebar rather than trying to reconcile the elements. (A consequence of this is that Panel collapse state isn't preserved atm after changing selection, will address that in a later diff)
This reduces average render time for sidebar from ~20 to ~2 ms.
Reviewed By: priteshrnandgaonkar
Differential Revision: D27677353
fbshipit-source-id: ba183b7e3d778c0b3c8e7ca0d51535ce99a097ca
Summary: Sidebar extensions were unkeyed, which make them render inefficiently. I cleaned the api a bit here by making the extensions more idiomatic; they are now components rather then functions, so that they have their own render cycle, state, etc. They are memo-ed now as well, so that they don't have to re-render if the selected item doesn't change.
Reviewed By: nikoant
Differential Revision: D27685980
fbshipit-source-id: b133bc42061b3b8cf971792f5818810ecb80e3ea
Summary:
Changelog: [Layout] Addressed several performance issues in the layout plugin
This diff and a few of the next stuff fix some performance issues in the Layout plugin. This diff fixes an issue where computing the context menu will cause all rows to render at all times, make the responiveness of the plugin quite slugish.
The fix in this case is to build up the context menu lazily, and pass a stable ref to the function through the tree, rather than a new menu every time the root component renders.
The changes in this diff and the next ones in total reduces the time (in prod builds) to draw a frame from ~200ms to ~5ms.
Reviewed By: cekkaewnumchai
Differential Revision: D27685983
fbshipit-source-id: a48b2ce2cdd1db31bb13122924617cbc3b6c198a
Summary:
This diff moves the core of ElementsInspector to flipper-plugin and decouples it from legacy design system and Electron, without any significant improvements or API changes yet, which will follow later.
Colors and docs will be added later in this stack.
Reviewed By: passy
Differential Revision: D27660300
fbshipit-source-id: 96abfa3b3174fa852cf04ae119c23c3d629fee74
Summary:
Here I'm changing plugin repository structure to allow re-using of shared packages between both public and fb-internal plugins, and to ensure that public plugins has their own yarn.lock as this will be required to implement reproducible jobs checking plugin compatibility with released flipper versions.
Please note that there are a lot of moved files in this diff, make sure to click "Expand all" to see all that actually changed (there are not much of them actually).
New proposed structure for plugin packages:
```
- root
- node_modules - modules included into Flipper: flipper, flipper-plugin, react, antd, emotion
-- plugins
--- node_modules - modules used by both public and fb-internal plugins (shared libs will be linked here, see D27034936)
--- public
---- node_modules - modules used by public plugins
---- pluginA
----- node_modules - modules used by plugin A exclusively
---- pluginB
----- node_modules - modules used by plugin B exclusively
--- fb
---- node_modules - modules used by fb-internal plugins
---- pluginC
----- node_modules - modules used by plugin C exclusively
---- pluginD
----- node_modules - modules used by plugin D exclusively
```
I've moved all public plugins under dir "plugins/public" and excluded them from root yarn workspaces. Instead, they will have their own yarn workspaces config and yarn.lock and they will use flipper modules as peer dependencies.
Reviewed By: mweststrate
Differential Revision: D27034108
fbshipit-source-id: c2310e3c5bfe7526033f51b46c0ae40199fd7586