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:
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: 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:
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: Changelog: Fixed layout of doctor and error bars which was broken in version 50
Reviewed By: mweststrate
Differential Revision: D22692069
fbshipit-source-id: 43d779656d30675b785eab67d6b7dcca4471653f
Summary:
The original Popover component doesn't work when the popover goes out of bounds of the current container, and overflow is not visible, which is the case in the title bar.
This changes it to use a new absolutely positioned one instead.
Reviewed By: mweststrate
Differential Revision: D22724110
fbshipit-source-id: f41b6d154ccb66a94b63533fe9c30d2a2c49f1db
Summary:
The current Popover component isn't compatible with the new (in progress) component library because it relies on overflowing container elements, which isn't allowed in the generic Layout component.
So this is a new Popover element, which uses absolute positioning instead. It takes heavy inspiration from the Tooltip and TooltipProvider components which do a similar thing.
Still to do:
[x] Edge cases when popover would be near a window edge
[x] Style it to look nice
[x] Split the use case (RatingButton) changes into a separate diff
[x] When the location of the popover container moves (the rating button in this case, e.g. if you resize the window), it doesn't currently cause the effect function in the popover, so it doesn't get moved when it should
[x] Add a little pointer thingy like a speech bubble
[x] Make sure it's perfectly positioned
[ ] Rename it to Popover and delete the old one. Not done, since it's just a stopgap.
Reviewed By: mweststrate
Differential Revision: D22693105
fbshipit-source-id: bc141433914bc20da48f8ae96764a95f7cd74ce5
Summary:
Created functionality which allows user to open clicked file from inAppErrorReporter.
Created "iface" interface for openInIDE API and created default implementation which indicates that openInIDE is not supported.
Created "impl" implementation specifically for fb4a.
Reviewed By: arpitratan
Differential Revision: D22642497
fbshipit-source-id: 7b3011c128a479e556b869fcc8c4147e153caf71
Summary: All strong records with a matching record available in the store tab are underlined. When clicked on, it will direct the user to the corresponding store record.
Reviewed By: jonathoma
Differential Revision: D22622612
fbshipit-source-id: 537dbb282e4ae1ff695c577ab47c413d41a10fa4
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: Added functionality of choosing the best path from the list of potential full paths. By resolving a class name, the method getBestPath checks for the most accurate solution.
Reviewed By: adityasharat
Differential Revision: D22625186
fbshipit-source-id: 98ac4ccd1c18ec19b49edf2ed6e74a84a9899a9f
Summary: Update electron-devtools-installer to fix issue blocking installation of dev tools for some users currently: https://github.com/MarshallOfSound/electron-devtools-installer/pull/140
Reviewed By: passy
Differential Revision: D22604024
fbshipit-source-id: f98d8d6e138283c54d5e1cf446b7049bb31b51a0
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:
let's finally inspect flipper with flipper!
Here we have:
1) a self inspection client which implements FlipperClient interface from js sdk and FlipperClientConnection. It links back and front parts of self inspection
2) simple plugin (UI) to show messages
3) back part of that plugin - it sends all received messages to UI part via client
4) we initialize self inspection for dev builds only
P. S. filesystem dependency will be replaced with npm one before I ship it (need to publish to npm first)
Reviewed By: mweststrate
Differential Revision: D22524533
fbshipit-source-id: 5c77e2f7b50e24ff7314e791a4dfe3c349dccdee
Summary:
Bolded the record fields' keys if it is consistent (in the consistency white list).
*if the key is within an object, information on whether it is consistent will not be available in preview. The Object has to be physically expanded by the user in order to see the bolded key.
Reviewed By: mweststrate
Differential Revision: D22416084
fbshipit-source-id: 7eb1d8c65be07f880722a133b70195a4a63f0e75
Summary:
1) Added configuration for QPL to be used by Flipper, configured PigeonClient and added an instance of QPL
3) Add a deferred instance for the logger
Reviewed By: timur-valiev
Differential Revision: D22504767
fbshipit-source-id: 73ba2a31e86782fe097a8f14a8edebaee40ec946
Summary:
Add QPL code to Flipper and a lightweight implementation of PigeonClient so that QPL can be integrated into Flipper and it can be used to monitor events inside Flipper.
the code was copied from VSCode from these diffs:
https://www.internalfb.com/diffs/D21271812https://www.internalfb.com/diffs/D21565279
Reviewed By: nubbel, bestander
Differential Revision: D22393607
fbshipit-source-id: 3ce77320c187f406b77321c020afc116bed45a93
Summary:
Found a bug in the archived device visualizer. I realized I never actually announced this feature to anyone, so fixing it up before doing so.
CHANGELOG: Visual Android View inspection available in layout plugin export files.
Reviewed By: passy
Differential Revision: D22548586
fbshipit-source-id: bcb5b8bee6aac7c76354d2c7cb44d72c7d23f5ca
Summary: It's better to use title so user can easily match which plugin updated
Reviewed By: mweststrate
Differential Revision: D22546284
fbshipit-source-id: 5875f1b22e7637df45b8ae427d51e639f0867e2c
Summary:
Simple implementation of restart button on auto-update notifications. Should make the flow a bit more convenient.
Changelog: Added button "Restart Flipper" to plugin auto-update notifications.
Reviewed By: passy
Differential Revision: D22528729
fbshipit-source-id: 6da6b858baed1e0f3cae57f1a614907b61899d10
Summary:
This diff makes sure Sandy plugins show up as well in the plugin selector when making exports (and in support form as well).
Also verified that this works with the Sandy updated section plugin.
Note that persisted state now didn't need any changes in the plugin code to work :)
Commented / simplified the calculation of available plugins a little bit and fixed a confusing issue where two different redux stores where created in one unit test, which caused an issue in the new implementation.
Reviewed By: jknoxville
Differential Revision: D22434301
fbshipit-source-id: c911196bc5b105309e82204188f124f40aab487a
Summary:
Made Sandy plugins part of the export / import logic
Note that in the export format there is now a `pluginStates2` field. It could have been put in `pluginStates` as well, but I started with that and it felt very weird, as the `pluginStates` are supposed to reflect what is living in the Redux stores, where sandy state doesn't live in the Redux store (not directly at least). Trying to store it in the same field made things overcomplicated and confusing.
Reviewed By: jknoxville
Differential Revision: D22432769
fbshipit-source-id: d9858e561fad4fadbf0f90858874ed444e3a836c
Summary:
This plugin adds serialization capabilities to Sandy plugins buy setting the a `persist: <key>` flag. This shouldn't be used for state that is unserializable, too big, too sensitive, or irrelevant during export / import.
Using an explicit `persist` flag is done to make plugins robust to changes over time; as long as the key is kept the same, state variables can be renamed and reordered without breaking the import / export format. Also it allows us to detect some changes in the import / export format and warn about it.
Alternative designs considered but not implemented would be:
1. requiring the user to explicitly return the state from the factory (e.g. `const todos = createState([]); return { todos }`,
2. or construct the state from client (e.g. `const todos = client.createState([])`)
3. enable persistence by default, and store states in the order the states were created (much like useState in React). This was implemented in the first versions of this diff, but as pointed out in the discussions, this is too sensitive too (accidental) format changes, as the storage format would be quite implicit
A nice benefit of the current approach, especially compared with alternative approach 1, is that state being restored is immediately visible in the plugin factory. In other words, directly after initialization `const todos = createState([])`, the `todos.get()` is actually set to the state that is being restored, rather than having still the initial state which is only overridden rather. So this behaves very much like the `useState` hook in React.
Furthermore, in the future we could use the same `persist` key in combination with other options, such as `saveToLocalStorage`, in case some state acts as a 'preference' (T69989583).
`TestUtils.startPlugin` supports starting plugins with an initial state by using the optional `initialState` field
Actually wiring up the serialization and deserialization into the export / import functionality of Flipper is done in the next diff.
Reviewed By: jknoxville
Differential Revision: D22432770
fbshipit-source-id: 9a4849582c2f6f54d1e40f65a6cba73092c28fe8
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: Force using typescript SDK from node_modules instead of VSCode embedded version when "desktop" root folder opened. Before that we had this setting only when the root folder opened in VSCode.
Reviewed By: mweststrate
Differential Revision: D22508520
fbshipit-source-id: 3663f432f905094613f4c44b0d0d6eac02e1336d
Summary:
Turns out, we don't have any tests that _actually_ depend on Electron. What is more, the one test suite that was still left was actually failing for a long time, but somehow CI didn't pick and reported that :-P.
Note that I dropped the file `xplat/sonar/scripts/facebook/lego/run-sc-yarn-targets-with-electron.sh` entirely, as it appeared unused
Reviewed By: nikoant
Differential Revision: D22434441
fbshipit-source-id: 34df79a580a64904116ae93069bbc8fafc53d9d0