Summary:
This adds support for handling incoming deeplinks in a Sandy plugin, which can be done by using a `client.onDeepLink(deepLink => { } )` listener
Also generalized deeplinks to not just support strings, but also richer objects, which is beneficial to plugin to plugin linking.
Reviewed By: jknoxville
Differential Revision: D22524749
fbshipit-source-id: 2cbe8d52f6eac91a1c1c8c8494706952920b9181
Summary: Created a communication between Layout Plugin and Flipper Desktop. The API allows users to open given file in a selected IDE. The openInIDE function returns true if the connection with Flipper is established, otherwise returns false.
Reviewed By: adityasharat
Differential Revision: D22625829
fbshipit-source-id: feaf186c107d62b1a75dfc6bbe2c1d66ffd7fd78
Summary:
Trying to get our OSS report green and lodash is currently flagged as a security issue on GH.
Manually merged the different PRs on GitHub together.
Reviewed By: jonathoma
Differential Revision: D22599614
fbshipit-source-id: ea4c9abf21aade14cff9338b78b764b181193227
Summary:
Created a few breakages. Would appreciate some closer eyes on this.
Pull Request resolved: https://github.com/facebook/flipper/pull/1366
Reviewed By: mweststrate
Differential Revision: D22501454
fbshipit-source-id: 9b882a12aecc65da85f29101bf87bf27519a7d2a
Summary:
While reading through the Inspector I found this prop passed down and not used anywhere
printer_shredder
Reviewed By: Katalune
Differential Revision: D22431895
fbshipit-source-id: 6cbc97b3faec26349a1ad900ffa455e95f53bb2b
Summary: Unit tests tend to randomly bail out once FBLogger is (indirectly) required by some module under test. This makes sure FBLogger is stubbed by default. We might want to do the same for `User` in the future.
Reviewed By: jknoxville
Differential Revision: D22186274
fbshipit-source-id: 2ede364c4b691d69826781355592226b075d8367
Summary: Removed back "prepack" script from every plugin package to keep it simple. Instead we will use `build-plugin` command defined in the root package.json (see next diff in the stack).
Reviewed By: mweststrate
Differential Revision: D22160252
fbshipit-source-id: cffb5df65b89df3fe390c051da0df797b3d16d2d
Summary: Fixed direct source import of Flipper code from layout plugin which broke its packaging
Reviewed By: cekkaewnumchai
Differential Revision: D22135716
fbshipit-source-id: 8f67a21ed94c13dd73d24ef8692d37ae51963319
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1267
Bumped versions of all plugins to match current Flipper version 0.46.0.
Reviewed By: mweststrate
Differential Revision: D22042959
fbshipit-source-id: 37c169bfd1b90debb8f94c9465a345a015524158
Summary: All the plugins migrated to spec v2 to allow packaging/publishing them independently from Flipper releases.
Reviewed By: passy
Differential Revision: D22041384
fbshipit-source-id: 23bfaf724f771a57bd628b9ea1c4d37846534a93
Summary:
Fixes a regression (D21716761) in the layout of the accessibility inspector where the layout was accidentally switched from right to bottom.
Also made the region resizable while at it.
Changelog: Fix regression in the layout plugin where accessibility info was rendered in the wrong place
Reviewed By: cekkaewnumchai
Differential Revision: D21903760
fbshipit-source-id: 08623c17428e86ea77d8438e78766a308dbac1e6
Summary:
Enabled linting rules that help to signal making errors with effect dependencies and such.
Fixed all errors, left any warnings generated by the hooks untouched
Reviewed By: nikoant
Differential Revision: D21721497
fbshipit-source-id: 9548453443fa7b663dc4d4289132f388c6697283
Summary:
We used flexbox to layout rows in the element inspector. The problem with that is that flexbox cannot nicely grow all its childrens to the largest one. Although we could still see contents thanks to the `overflow: visible` hack, this means that the backgrounds didn't continue when scrolling.
In contrast, tables do grow their children width :)
Also fixed an issue where the AX details tree wasn't scrollable
Reviewed By: cekkaewnumchai
Differential Revision: D21661766
fbshipit-source-id: 6b1d16c7aded8beebdd8a50f3e8ab0d9b8633e02
Summary:
in Layout plugin, scrollbars where often not visible, for example to see the vertical scrollbar, one had to scroll to the horizontal end first.
Also introduced the `Scrollable` component to simplify this in the feature and separate the concepts of rendering something large and making it scrollable.
This diff cleans up the layout structure and fixes the problem
changelog: Fixed several minor layout issues in the Layout plugin
Reviewed By: cekkaewnumchai
Differential Revision: D21283157
fbshipit-source-id: 81849151475165796c65001616f038a9d6cbdfb2
Summary:
To comply with recent agreement, coverage test for MultipleSelectorSection is added.
Also, add undefined check in `elements.tsx` found while adding the test
Reviewed By: mweststrate
Differential Revision: D21554782
fbshipit-source-id: 7cd868bf16f6105d6f523048f29bdaa052837f45
Summary:
per title
Changelog: Add multiple selector to layout inspector to allow user to select components at a position
Reviewed By: mweststrate
Differential Revision: D21214898
fbshipit-source-id: 7b52d9d3c93e7ec0d28124a3a675ccfdd014c54d
Summary:
This diff adds multiple selector UI on layout plugin, which shows up when there are more than one component at a touch.
This UI allows user to do similar thing to element inspector. Expanding functionality on main component will be added in next diffs.
Reviewed By: mweststrate
Differential Revision: D21214899
fbshipit-source-id: 5c9cae93122cc4f7c326ccd0878d2b9dddebf62b
Summary:
- add type to represent the returned component tree
```
expected data:
{
[nodeID1]: [subtree1],
[nodeID2]: [subtree2],
...
}
example:
{
id1: {
id2: {
id3: {
id4: {},
id5: {
id6: {}
}
}
}
}
}
```
- add functions to deal with a tree
- `_getElementLeaves` for finding ids that don't have any child given the tree structure
- `_getPathForNode` for finding path (similar to previous path parameter) for given id
- This diff still retain functionality in case of selector appear to touch only one element.
Reviewed By: mweststrate
Differential Revision: D21040427
fbshipit-source-id: e6704535a437ad47d9664cc16896b9f24c9d6736
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
Summary: Added eslint rule "no-extraneous-imports" which disallow using modules which are not listed as dependencies in the corresponding package.json. Fixed a bunch of reported errors after the rule applied.
Reviewed By: passy
Differential Revision: D21186848
fbshipit-source-id: 0af9ac4b3fffdfd0ab7c23ae4ff12a3f5989d5e9
Summary:
This enables the feature which showed the theme information in the layout plugin. It was disabled due to the OOM which occurred while exporting flipper trace. The OOM happened when we tried to serialise the whole layout hierarchy and the amount of info added per node by the theme info was quite heavy. Thus removing it solved the OOM problem at that point, but its not the correct solution.
The problem is that each node has too much information and sending it at one stretch is very heavy and causes OOM. So instead of sending it at one stretch, I have broken it into multiple calls at each level of the tree. This no longer causes OOM and we will be able to show theme information too.
Also for iOS we don't have AXNodes call or AXRoot feature implemented, so anyway I had to put a check to not make those calls, so instead I have kept the feature of fetching all nodes on the iOS instead, as there has been no problem on the iOS side with regards to the OOM. But I am indifferent, the same logic will work for iOS too, it might increase the time to export.
issue discussed [here](https://fb.workplace.com/groups/flippersupport/permalink/854729375007722/)
Reviewed By: jknoxville
Differential Revision: D21136057
fbshipit-source-id: becd237a6d53c50af082597f2e8ed790c25cb966
Summary: there are two plugins which uses copy-pasted ToolbarIcon and at least one more where it will be helpful. Let's move it to components folder
Reviewed By: nikoant
Differential Revision: D21089290
fbshipit-source-id: a14dcd56633dd24016711e34308b94023fcb40ed
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/969
Added all public plugins as workspaces to the root package.json. This means all these plugins will use the single root yarn.lock and installation of their dependencies will be faster. This also means that plugins can declare dependencies to other local packages included into workspaces and they will be symlinked automatically.
Changelog: Internals: plugins added as "yarn workspaces" into the root package.json to simplify dependency management between them
Reviewed By: mweststrate
Differential Revision: D20805231
fbshipit-source-id: e85c62d3195d1ea3c5c60def6ca12318a2b53466
Summary:
changelog: Add scroll to inspected element in layout plugin
Before this diff, when one inspected an element, one needed to scroll down to see highlighted line for that element. This diff added automatic scroll to inspected element. It will scroll so that the line is in middle of the app.
Also, fix direct state mutation and this error:
```
Public property 'onKeyDown' of exported class has or is using private name 'Element'.
```
Reviewed By: passy, mweststrate
Differential Revision: D20798587
fbshipit-source-id: 763eb63cd51abd73940e301e36e89232033722c3
Summary:
Quick notes:
- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.
Close https://github.com/facebook/flipper/pull/915
Reviewed By: jknoxville
Differential Revision: D20594929
fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03