Summary:
Added infra for writing and using custom eslint rules and created a rule for disallowing cross-package file imports. Such imports are anti-pattern and they also break standalone plugin bundling.
We still have a bunch of places where Flipper core references code directly from plugins. I've ignored these places for now and added task T71355623 to revisit them.
Reviewed By: passy
Differential Revision: D22998955
fbshipit-source-id: d04cff8fc115ba1300a7e6830306ec134046e927
Summary:
thefutureisnowoldman
Changelog: Changelog entries now link to their GitHub commits
Reviewed By: passy
Differential Revision: D22999105
fbshipit-source-id: 77e4884a3515245ba9296d8c4f59cdcb3c4b098d
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/1444
Reviewed By: nikoant
Differential Revision: D22998104
Pulled By: passy
fbshipit-source-id: a36d2e8bcf618dabea05e65228433ee33fa78a0d
Summary:
Populate class name for Litho Sections.
See D22922106 (86cafb9e80) for reference
Reviewed By: adityasharat
Differential Revision: D22949896
fbshipit-source-id: d804971708cf8c8466dd74eda3e750957dc95fc9
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/1442
Layout plugin cannot be bundled as a standalone package because it imports a file from outside of its folder. This change exposes IDEFileResolver in a proper way so now it's possible to import it from 'flipper'.
Reviewed By: passy
Differential Revision: D22975515
fbshipit-source-id: 8af6d2ca1ceb8627a449e055c8773549dd681b7a
Summary:
Dropdown menu to select IDE in which the Litho Component will be opened.
Some Litho Components do not have corresponding Spec files. Hence, I am first trying to access files with Spec suffix and retrying if fails without the suffix. The number of such files is limited.
[FB Only]
changelog: It is now possible to directly open source files from the Layout inspector
Reviewed By: adityasharat
Differential Revision: D22922126
fbshipit-source-id: e1109c995427755a28ba78a65f5ff98392fb7060
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/1439
Reviewed By: mweststrate
Differential Revision: D22925823
Pulled By: passy
fbshipit-source-id: c08f31513b715441a1837963de1e36bf938acb39
Summary: Populate class name for Litho Components.
Reviewed By: adityasharat
Differential Revision: D22922106
fbshipit-source-id: e18b748e0e0bd6f511558124a28b4b58d217ded7
Summary:
Added support for `createPaste` in Sandy plugins
Nice minimalistic example of how to expose a Flipper api to Sandy.
Note that some indirection could be removed by having an interface that is shared directly between `BasePluginClient` and `FlipperLib` (e.g. `PublicFlipperLib`). In contrast to `addMenuEntries` from the previous diff, `createPaste` is basically exposed verbatim to Sandy without additional wrapping, so those cases could be made simpler. Maybe will do that later.
Reviewed By: passy
Differential Revision: D22815873
fbshipit-source-id: e6d0773a35341edfe5de0898317eaadf88de79d0
Summary:
[interesting] since it shows how Flipper APIs are exposed through sandy. However, the next diff is a much simpler example of that
This diff adds support for adding menu entries for sandy plugin (renamed keyboard actions to menus, as it always creates a menu entry, but not necessarily a keyboard shortcut)
```
client.addMenuEntry(
// custom entry
{
label: 'Reset Selection',
topLevelMenu: 'Edit',
handler: () => {
selectedID.set(null);
},
},
// based on built-in action (sets standard label, shortcut)
{
action: 'createPaste',
handler: () => {
console.log('creating paste');
},
},
);
```
Most of this diff is introducing the concept of FlipperUtils, a set of static Flipper methods (not related to a device or client) that can be used from Sandy. This will for example be used to implement things as `createPaste` as well
Reviewed By: nikoant
Differential Revision: D22766990
fbshipit-source-id: ce90af3b700e6c3d9a779a3bab4673ba356f3933
Summary:
No device was using this feature, so doesn't look like there is a reason to keep it.
...if somebody was about to use this feature, let me know :). But probably, if we need this, a much more simple solution is to determine the visible columns with a simple switch on device type in the logs plugin, even though that is strictly speaking less scalable. But the current solution feels a bit over-engineered for something that is not really used.
Marked [interesting] as I might be missing some background concept which would make this relevant as well.
Reviewed By: jknoxville, nikoant
Differential Revision: D22763507
fbshipit-source-id: ecdbc779cbbfa3b0b72c80b459b12c1a25bf3fc4
Summary:
The device type enum was mixing two different concepts (emulator vs physical) and (archived vs not), and we already have a separate `isArchived` field. So cleaned this up to not leak it into sandy.
If anybody can think of any unforeseen consequences of this, lemme know :)
Reviewed By: jknoxville
Differential Revision: D22763506
fbshipit-source-id: bd2f7dbd1d2d2e6942ba7c6ddd8dc91ee34d591d
Summary: More is more. Just moving code, no further changes.
Reviewed By: nikoant
Differential Revision: D22374891
fbshipit-source-id: 65c9af8b4b34ee8e16aeae5705528093e1c800cc
Summary: Didn't understand what that field meant. Turns out, it was never used.
Reviewed By: nikoant
Differential Revision: D22374893
fbshipit-source-id: c36d8f0c1be1b27306347d1c8c8a763c621720a5
Summary: Introducing a base abstract class (blegh) to share some life cycle management between Device- and normal plugins. Cleaned up the test utils a bit as well + some old TODO's that now have been taken care of
Reviewed By: nikoant
Differential Revision: D22727089
fbshipit-source-id: 507816f1bfdbc6e7e71d4bd365b881b6710ca917
Summary:
Device plugins have an activate and deactivate hook, that reflects the plugin being selected in the UI. Added these same hooks to client plugins as well. In practice they are called at the same times as `onConnect` and `onDisconnect`, except for background plugins, which connect only once, so it is pretty useful to be still able to make the distinction.
Since there is now quite some common functionality between plugins and device plugins, will clean things a bit up in a next diff
[Interesting] as it explains the difference between the different lifecycle methods of plugins, and the impact of being a background plugin
LIfecycle summary:
1. app connects
2. for background plugins: connect them (`onConnect`)
3. user selects a plugin, triggers `onActivate`. will also trigger `onConnect` the plugin if it _isnt_ a bg plugin
4. user selects a different plugin, triggers `onDeactivate`. will also trigger `onDisconnect` if it isn't a bg plugin.
5. app is unloaded. Triggers `onDisconnect` for bg plugins. Triggers `onDestroy` for all plugins,
Reviewed By: jknoxville
Differential Revision: D22724791
fbshipit-source-id: 9fe2e666eb37fa2e0bd00fa61d78d2d4b1080137
Summary:
Make sure device plugins can be deeplinked as well.
(note that the duplication between `Plugin` and `DevicePlugin` is cleaned up again in D22727089, first wanted to make it work and tested, then clean)
DeepLink no longer have to be strings, per popular requests, as that makes direct linking between plugins easier (online links from the outside world have to arrive as strings)
Reviewed By: jknoxville, nikoant
Differential Revision: D22727091
fbshipit-source-id: 523c90b1e1fbf3700fdb4f62699dd57070cbc980
Summary: Now that we can load device plugins, let's make sure they are rendered as well.
Reviewed By: passy, nikoant
Differential Revision: D22693927
fbshipit-source-id: 22574ec6e629e6dd66e42193b406ceb7dfcf1836
Summary:
This diff makes sure that devices will actually instantiate applicable sandy device plugins. Similar to how client plugins are owned by Client, device plugins are directly owned by BaseDevice, which significantly simplifies life cycle management and doesn't dispatch updates to all Redux connect components whenever something irrelevant changes.
Also made sure `device.teardown()` is called. That API already existed, but wasn't used or implemented before.
Updated Flipper test utils to support testing device plugins as well (both Sandy and classic ones)
Reviewed By: passy, nikoant
Differential Revision: D22693929
fbshipit-source-id: 73b2b8666ef7a0e748ea89360db84734d37eb5be
Summary: Add unit tests to verify that the unit test utilities for for Sandy device plugins work as expected. Fixed a bug revealed by that and cleaned up some TODO's
Reviewed By: jknoxville, passy, nikoant
Differential Revision: D22693928
fbshipit-source-id: 93162db19d826d0cd7f642cef1447fd756261ac8
Summary:
This stack introduces Sandy device plugins, they are quite similar to normal plugins, but, a devicePlugin module is organized as
```
export function supportsDevice(device): boolean
export function devicePlugin(devicePluginClient)
export function Component
```
Device plugins get access to the device meta data and can subscribe to the `onLogEntry` callback and `onDestroy` lifecycle.
They will be able to store state just as normal plugins, but can't send or receive methods, so devicePluginClient is a bit limited.
This diff only sets up most of the new data structures, and makes sure everything still compiles and no existing tests fail.
To prevent this diff from becoming to big, actually loading, rendering and testing device plugins will be done in next diffs
Please take a critical look at the api proposed and the (especially) the public names used :)
Reviewed By: passy, nikoant
Differential Revision: D22691351
fbshipit-source-id: bdbbd7f86d14b646fc9a693ad19f33583a76f26d
Summary:
Fix long standing issue where text by default in Flipper is not selectable. Which is super annoying when working with tables, trying to copy error messages, etc etc. Wanted to fix it with ant.design, but got so annoyed by not being able to select an error I needed, that I fixed it now :-P.
This diff makes all text selectable by default, and then bails out for specific elements, like section headers, button captions, the left toolbar (navigation) and top toolbar to preserve the desktop app look & feel.
Fixes a popular papercut issue
Changelog: All text is now selectable by default in Flipper.
Reviewed By: passy
Differential Revision: D22897793
fbshipit-source-id: 7bc50a987e012595956c07d1997959a5480790aa
Summary:
This diff adds several improvements to displaying requests / responses in the network plugin
1. If there is no formatter rendering the data, the data is rendered 'raw'
2. For binary data, `(binary data)` text is printed, rather than an empty box
3. For request that have an empty request / response, `(empty)` is printed, rather than an empty box
4. If a formatter is applied, we show which formatter was used, which makes it easier to debug / spot / report issues
5. If the graphql formatter can't parse the data because it is truncated, it won't return anything, so that it falls back to the next formatter (urlencoder) to take care of the presentation
Changelog: [Network plugin] Improved presentation of request / response bodies and fixed issues where they would sometimes not be displayed.
Reviewed By: jknoxville
Differential Revision: D22865373
fbshipit-source-id: 912d2f27269a4c9edbf62f2039d46ccf90a008af
Summary:
This was originally done in https://github.com/facebook/flipper/pull/377 to support chinese characters, but it's not clear how it works, or what problem specifically it is trying to solve.
It's causing some problems where valid responses are failing to be "decoded", so I'm removing it.
Reviewed By: mweststrate
Differential Revision: D22866879
fbshipit-source-id: a19a57b0ddba2b9f434eb3c37e6b92da1dfbef01
Summary:
Bumps [react-native-flipper](https://github.com/facebook/flipper) from 0.49.0 to 0.51.0.
<details>
<summary>Commits</summary>
<ul>
<li><a href="5dc98bab9d"><code>5dc98ba</code></a> Flipper Release: v0.51.0</li>
<li><a href="323c9d25d4"><code>323c9d2</code></a> Fix layout of error and doctor bars</li>
<li><a href="9ada27526c"><code>9ada275</code></a> Change RatingButton to use Popover2</li>
<li><a href="d7a6356fb6"><code>d7a6356</code></a> Add Popover2 component</li>
<li><a href="5a56ee65b8"><code>5a56ee6</code></a> Fix contributing image link</li>
<li><a href="ce180a106f"><code>ce180a1</code></a> Log login success rate</li>
<li><a href="6561bc8f16"><code>6561bc8</code></a> Added connection between InAppErrorReporter and Flipper Desktop App via Layou...</li>
<li><a href="9e4c5363c5"><code>9e4c536</code></a> Deep-linking records to other strong records in the Store tab</li>
<li><a href="7d06571cfa"><code>7d06571</code></a> Add marker start and end to App to measure the startup time for Flipper (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1398">https://github.com/facebook/flipper/issues/1398</a>)</li>
<li><a href="33cd7d29df"><code>33cd7d2</code></a> Set up coveralls Jest coverage tracking on GitHub (<a href="https://github-redirect.dependabot.com/facebook/flipper/issues/1392">https://github.com/facebook/flipper/issues/1392</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/facebook/flipper/compare/v0.49.0...v0.51.0">compare view</a></li>
</ul>
</details>
<br />
[](https://help.github.com/articles/configuring-automated-security-fixes)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1419
Reviewed By: mweststrate
Differential Revision: D22896632
Pulled By: passy
fbshipit-source-id: c1a89a86f354befe18a996f6bcdaa6ec74bcf815
Summary:
Bumps [elliptic](https://github.com/indutny/elliptic) from 6.5.2 to 6.5.3.
<details>
<summary>Commits</summary>
<ul>
<li><a href="8647803dc3"><code>8647803</code></a> 6.5.3</li>
<li><a href="856fe4d99f"><code>856fe4d</code></a> signature: prevent malleability and overflows</li>
<li>See full diff in <a href="https://github.com/indutny/elliptic/compare/v6.5.2...v6.5.3">compare view</a></li>
</ul>
</details>
<br />
[](https://help.github.com/articles/configuring-automated-security-fixes)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/flipper/network/alerts).
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1430
Reviewed By: mweststrate
Differential Revision: D22896630
Pulled By: passy
fbshipit-source-id: 43f12a10528828a1a5b96b0e92e13261b702a4f4
Summary:
This is just an initial setup from Flipper. I just ran `scarf flipper-plugin`, followed the iOS path, removed the native files (as we will use the JS infra directly later on) and submitted. :)
I followed this documentation/tutorial: https://www.internalfb.com/intern/wiki/Flipper/create-new-plugin/
(Followed iOS path, then removed native code as not needed)
Differential Revision: D22754500
fbshipit-source-id: 39130b4ee17c6bc72990eec34c466cfa7a650d17
Summary:
Added IDE menu functionalities.
Changed minor UX detail - for classes that cannot be opened user will always see 'Can't open' prompt.
Design: https://www.figma.com/file/M0l6qhQqzllIcefVE4tQvG/Error-Reporter-IDE-Selector?node-id=82%3A0
Reviewed By: arpitratan, adityasharat
Differential Revision: D22790328
fbshipit-source-id: 8dfbcf7408c53947909bcf3fa700dee7ae47e14a
Summary: There was in inconsistency in the timestamps used for markerStart and markerEnd, resulting in negative duration being reported in the Scuba table.
Reviewed By: nubbel
Differential Revision: D22791255
fbshipit-source-id: a4a16c6583974a0423b12805fb8d1a22af44cf5c
Summary: Adds a toggle switch to show/hide disk cache images defaulting to inactive. The image data is only sent on the adb connection when the toggle is activated.
Reviewed By: defHLT
Differential Revision: D20002059
fbshipit-source-id: 05c9e515ffe09441e5cfb6f66eb14559ac4a322c
Summary:
Usually ':' is used before the command
Usually while presenting a command ':' is used instead of that '.' was used.
Pull Request resolved: https://github.com/facebook/flipper/pull/1406
Reviewed By: jknoxville
Differential Revision: D22766378
Pulled By: passy
fbshipit-source-id: 6811f36262a5520db3afddbe68afa492831f48f2
Summary:
Convert section plugin to Sandy API.
TODO
- Fix layout issues
- scrollbar occurs in small component (bottom layout)
- scrollbar in wrong place (top layout)
- text shrunk in bottom part of tree component
- (?) move away from d3
- better typing for payload
- move components to functional one
- unit test
Reviewed By: mweststrate
Differential Revision: D22385993
fbshipit-source-id: 862d4b775caf2d9a7bcb37446299251965a5d6db
Summary:
This diff implements the integration between a Litho Editor and Flipper. It does so by converting the Editor format to FlipperObject, and then converting it back from FlipperDynamic.
This conversion works for both `State` and `Prop`. We already provide default implementations for primitive + wrapped types and String, so the functionality should match the existing one.
Reviewed By: passy, Katalune
Differential Revision: D22455220
fbshipit-source-id: f7f633765f3d997ce6de09d2c1277019e72c0802