Summary:
- New Litho Sections APIs.
- New version of Metro.
- Hardened eslint rules.
- Flipper Headless now offers a `--no-plugins` build mode to speed up compilation.
Reviewed By: jknoxville
Differential Revision: D16221050
fbshipit-source-id: 5eb7a0e8caaf11188ece94a149003daa36eb0a30
Summary: Updated the OpenSSL dependency and released the new versions of Folly and RSocket.
Reviewed By: jknoxville
Differential Revision: D16222388
fbshipit-source-id: e894650a8c3ac764bc489e843e9a3ccf33688659
Summary: Let's migrate one file to TS, this helps us to test our tooling and make sure, everything works as expected.
Reviewed By: bnelo12
Differential Revision: D16149514
fbshipit-source-id: 05055a1830f187c6812baa661e109ea67995253b
Summary:
This colours data model nodes in the tree to show how they were part of the current changeset: whether the data model caused an insert, update, remove etc.
This also adds phantom Section nodes for Sections that were completely removed from the tree; this is helpful for debugging cases where a section's key changes without intention, causing items to be completely removed and inserted.
Reviewed By: topwu
Differential Revision: D16165767
fbshipit-source-id: a011666dce33e4d757fb415e71ba163aa334f6e6
Summary: the side panel displays information with the changesets that were applied for each section
Reviewed By: adityasharat
Differential Revision: D16131069
fbshipit-source-id: d03547148e483e196600191291e58a13acf505c3
Summary: It's annoying to have to treat things like they might not be errors, inside catch blocks. This should stop that.
Reviewed By: passy
Differential Revision: D16201509
fbshipit-source-id: b028ea3a1e0766763fcf2659d80456f4dd281c40
Summary:
Here I've started work on a search bar for the top of my plugin. Currently it supports navigation in a device by typing in an app uri and pressing the enter key or by pressing the send icon.
More features will be added as other components for this plugin are added. I have added a function stub for the bookmark button for now and the drop down icon is purely cosmetic at the moment.
Reviewed By: jknoxville
Differential Revision: D16183223
fbshipit-source-id: 0313d8c6e3a967c9400b9e9d3f24960e6a021a8c
Summary: Jest expects any promise rejections to be errors, not strings.
Reviewed By: passy
Differential Revision: D16200876
fbshipit-source-id: 7ebb6c63262b3c13ec677b1e72010146aa5b55e8
Summary:
It makes more sense for the navigation ability to be inside the Device's class instead of scattered throughout the rest of the app.
I have moved the Android navigation logic inside the AndroidDevice and added a function stub to BaseDevice. I also encoded the URI as an initial safeguard to injection attacks via adb, but will remove this altogether once I enable navigation through the socket connection.
Reviewed By: jknoxville
Differential Revision: D16182374
fbshipit-source-id: be3c6d1cfcbe293583edada1f77c023965dfd12c
Summary: This is the basic setup for TypeScript support in Flipper and makes sure our build system can handle `.ts(x)` files. Support for flow is still fully working, so we can land this and continue with the TS migration.
Reviewed By: jknoxville
Differential Revision: D15920150
fbshipit-source-id: d5a7f22fe824d1c1904105bbf738767d735cc0f1
Summary:
Fixed bug with live editing
Previously if the meaining of the value was changed in flipper you receive back same value as it was
Now you see correct changed value
Reviewed By: priteshrnandgaonkar
Differential Revision: D16162141
fbshipit-source-id: 1a68ea64603171e952382c5093470d2cc12f7bbe
Summary: Create Sections hierarchy from data received when a changeset is applied and send it to the plugin to render it
Reviewed By: adityasharat
Differential Revision: D16120480
fbshipit-source-id: 30b824d8d6e65b537c3e98b7ee3438055f6f1ec2
Summary:
This hooks up the listeners that send events from the SectionTree to the desktop plugin. gradle build will fail until I release a new Litho version with D16120818
ChangesetDebug receives events on every valid changeset, it will parse the data into Flipper objects and pass it to the desktop client to render it.
Right now this just sends an event with empty data
Reviewed By: adityasharat
Differential Revision: D16121473
fbshipit-source-id: eeef92cea7dae836861d417ed6a00fcb11901e78
Summary:
The SIGINT handler in headless was being squashed by the one that `tmp` adds. This is a bug introduced in its latest release: https://github.com/raszi/node-tmp/issues/192
Downgrading version to fix this for now. There's a PR to fix it, we can upgrade when it's shipped.
Reviewed By: passy
Differential Revision: D16163208
fbshipit-source-id: 058ec1094dd2e5e5474f7ac36be376bae0431f0c
Summary: This one snuck in while rebasing my new rules onto master.
Reviewed By: bnelo12
Differential Revision: D16180472
fbshipit-source-id: b715c218ff1886c1901c7730a6b8dac67beb3968
Summary: Taking another stab at adding some lint rules to make it harder to shoot yourself in the foot. Hopefully nothing too controversial. Preferring spread and rest should lead is more readable and there's no downside when using ES6. The "useless" rules are just things like renaming imports to the original name which should only happen during refactors.
Reviewed By: jknoxville
Differential Revision: D16180453
fbshipit-source-id: 1cf6851b7726c0aee953ec7cf7dd6fa0aca32253
Summary: Currently, `horizontallyScrollable` logic includes even invisible columns in the width calculation for `horizontallyScrollable` `ManagedTable`s, resulting in large empty spaces when many columns are invisible.
Reviewed By: danielbuechele
Differential Revision: D16139713
fbshipit-source-id: f653121845fbeac8a29bdb67ad0309add28e526a
Summary:
Creation of the adb client requires the logger to already be initialized, so this should never be called at the global scope in a module, or you'll get weird import-order related bugs.
I noticed this while debugging, I don't think it's impacting anything right now, but have made it lazy just to avoid confusion in future.
Reviewed By: passy
Differential Revision: D16162266
fbshipit-source-id: 5363292d5cfcf2867a2654777cd8f4baed01d2c0
Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.
This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.
Used `eslint --fix` to change all existing cases.
Reviewed By: jknoxville
Differential Revision: D16131329
fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
Summary: As we are trying to clean the console from any non-important logs, I am removing the warnings about GK'd plugins. This information can be seen on the "Plugin not showing" panel.
Reviewed By: jknoxville
Differential Revision: D16148408
fbshipit-source-id: 5aeffa6e82524aacb050385ba86439654c07c741
Summary: updating to the latest metro version
Reviewed By: passy
Differential Revision: D15986739
fbshipit-source-id: 83fba99bf7cc0903590831aeb852d14dde576901
Summary:
Pull Request resolved: https://github.com/facebook/flipper/pull/479
Just getting us to the latest major version. Luckily, no new errors were introduced.
Reviewed By: jknoxville
Differential Revision: D16131273
fbshipit-source-id: f605b315afbe4282e21923d7c970402f834f287c
Summary:
Text of the component is now can be searched if flipper layout plugin
Flipper now highlight all the row if name of id or text of this component matched to the query
Reviewed By: priteshrnandgaonkar
Differential Revision: D16108315
fbshipit-source-id: ff5eb0bc4890f02c9b07e47c26b9ea1408d9c606
Summary: Added a possibility to search for the text not only in name and id of components but also in text for all components, that conforms to a protocol <SKTextSearchable>
Reviewed By: priteshrnandgaonkar
Differential Revision: D16108297
fbshipit-source-id: 31da4ac6762c487ef644d62c9576d9eff43e8cd4
Summary: ... so device plugins can import it via the flipper module.
Reviewed By: danielbuechele
Differential Revision: D16111730
fbshipit-source-id: ac399692a11fc2b61d702eb46c57f6ca30fe0d72
Summary:
Manually applying these "fixes":
- fixes https://github.com/facebook/flipper/pull/480
- fixes https://github.com/facebook/flipper/pull/481
This is mainly to sush the security warnings we get
even though we don't really have an attack surface where these matter.
Reviewed By: danielbuechele
Differential Revision: D16148208
fbshipit-source-id: 79865a97b442fd2b2621f1ef632e974e1e355e84
Summary:
On Windows fs.watch fires multiple times after a single edit causing multiple instances of plugin compilation threads to start bogging down system resources.
This diff delays compilation by 1 second, soaking additional watch events fired for that plugin in that time window.
Reviewed By: danielbuechele
Differential Revision: D16109076
fbshipit-source-id: bc4f89d83f04487a3d32ee5cc2105fe0a8b7366c
Summary:
Compiling headless flipper takes a long time. This is because it individually compiles and bundles every plugin.
When debugging core headless, you don't need to compile any plugins, so this adds a build flag `--no-plugins` to skip that and vastly speed up iteration speed.
Reduces build time from 3 minutes to 20s
Reviewed By: priteshrnandgaonkar
Differential Revision: D16131322
fbshipit-source-id: 2b38ee37183a1257b3993f392cf623b2631fd7da
Summary:
# Highlights
- Disconnected devices now remain available as archived until they're reconnected.
- Exporting is now significantly faster.
# Bug Fixes
- Re-enable x86 distribution for Android.
Reviewed By: jknoxville
Differential Revision: D16121347
fbshipit-source-id: ab58086ef3dc1f2e43feaee66ab2a1e5a69b44a1
Summary:
We are using `redux-persist` to persist parts of our redux store over reloads. In this library, there is a check if a value "was removed to the store". However, they are doing this check by checking if the value of this key is `undefined`. This is not a good way of checking if a property exists on an object, because it can exists but explicitly be set to `undefined`. This was the case for `connections.selectedDevice`, we were setting the value to undefined, once the device disconnected. This caused the key to be persisted, eventhough it wasn't whitelisted for persisting.
In this diff, we are setting the `selectedDevice` to `null` instead of `undefined` once a device disconnects.
Reviewed By: passy
Differential Revision: D16121260
fbshipit-source-id: f32c8ea9e30f02e065fa63380ae0245379a47496
Summary: Adding the auto-genrated scarf files from creating the Flipper navigation plugin. GK for this plugin is flipper-navigation.
Reviewed By: jknoxville, danielbuechele
Differential Revision: D16119841
fbshipit-source-id: 74e19c82dc95e73fe2ae06d1eb8cef2456b81931
Summary:
fixed issue: https://github.com/facebook/flipper/issues/215
## Changelog
1. use pako to inflate direct to unicode string to avoid 'stack size limit exceed' problem
Pull Request resolved: https://github.com/facebook/flipper/pull/474
Test Plan:
Tested with Meetup trace that crashes reproducibly without this fix:
{F165395994}
Tested gzipped body with fb4a:
{F165396053}
Reviewed By: jknoxville
Differential Revision: D16090209
Pulled By: passy
fbshipit-source-id: 64b8a61fa9d80d9e8b62105b3f1dc3289a29cc07
Summary: just the skeleton for the android plugin
Reviewed By: passy
Differential Revision: D16006791
fbshipit-source-id: b0fe2143afeab6bc0671b7ad5a3ccfbccdd6e40a
Summary: The search text should only appear red when it's a regex, and when that regex is not valid.
Reviewed By: danielbuechele
Differential Revision: D16091096
fbshipit-source-id: 22b3e229e2c82ced956bae8fd203c5f177323dc2
Summary:
The serialization algo was slow. The problem was that it used to just go to the first child which was not serializable and went back to the parent which then looked for first child from the remaining children and serialized it, and this happened at all levels. Instead, currently, the child fills the stack up with the children which needs to be serialized, so there is no back and forth for each child. This improved the speed a lot.
Test case: Serializing ~10000 rows of logs
Previous Iterative algo: 33215.3 ms
Iterative Algo with the above change: 2051.1 ms
Recursive Algo: ~1000 ms
New Algo Video:
{F164050963}
Prev Algo: Too Slow
{F164051027}
{F164051085}
Recursive Speed:
{F164051982}
Reviewed By: jknoxville
Differential Revision: D16037998
fbshipit-source-id: 70fae9a0073ff28d1a6528ec0dbddceb213b2c5f
Summary: This button will be used to navigate between most recent and favorite locations within an Android app. Button is WIP and will be modified when work on the Navigation plugin begins.
Reviewed By: jknoxville
Differential Revision: D16088389
fbshipit-source-id: 64dcbc678ddeaeb36dd771d0cccef7c78bbc4b5c
Summary:
When an archived device reconnected, the clients from the architved device weren't removed and a new client was added. This caused a client to be shown multiple times after reconnecting a device.
In this diff, all clients and pluginStates from an archived device are removed once the device reconnects.
Reviewed By: passy
Differential Revision: D16075349
fbshipit-source-id: 1d0e6ce17c89bb75dd993466bca6bd64e2c63338
Summary:
This is a new component that allows for chaining of buttons in a button group by placing an icon in between them.
This is how we plan to navigate between views within an Android app.
Reviewed By: danielbuechele
Differential Revision: D16071234
fbshipit-source-id: 404a3a341081b6111667bd5acf27876bec627435
Summary: as title; we'd like to reuse this for the Litho sections plugin but not having it in OS makes setting up deps more difficult than it should be.
Reviewed By: danielbuechele
Differential Revision: D16052298
fbshipit-source-id: cd965688eff4fedbe57264e6676b6ca09b9deb45
Summary:
Event emitter was typed any. Therefore, Client extended any and thing went south.
removing the explicit any type and fixing flow errors.
Reviewed By: jknoxville
Differential Revision: D15987630
fbshipit-source-id: 9456149d46f839d9579fcc2671ab2a82935fc23a
Summary:
Bug Summary:
When running Flipper on Mac, the Mac device is always first to register with Flipper and thus is always selected as the default connected device when first launching. This blocks the beautiful tutorial screen from appearing for new users.
Fix:
When registering new devices in the redux store, a new check has been added that maintains a blacklist of devices that cannot be selected as default. I have added Mac to start. At the same time, this fix preserves userPreferredDevices so that if the user has selected Mac as a device in the past, then next time Flipper is opened, even blacklisted devices will be displayed.
Making this fix uncovered a race condition, between the redux state being rehydrated and the devices being registered. I have potentially fixed this via a callback function in persistStore.
Reviewed By: passy
Differential Revision: D16048371
fbshipit-source-id: 79580b30e8a3b077dac1ac15131266e59646253f