Summary:
This displays the data models passed to the Sections in the side panel when a data node is clicked. This does not change the collapse behaviour when a Section node is clicked.
To make it easier to associate a section with its changesets, appended the global indexes a Section is responsible for to the node label.
Reviewed By: passy
Differential Revision: D16283820
fbshipit-source-id: f1149f47dff448de05d919f7f8d16a2aba53bbb0
Summary: After setting up the navigation event emitter on the android side, we must now receive them on the client side and persist them in the Redux store.
Reviewed By: passy
Differential Revision: D16280944
fbshipit-source-id: 3dc4c5c6add41388469c801700974eb0ccd9a56b
Summary: Serializing the logs of the devices within Redux dev tools was causing Electron to crash due to it being out of memory. We can sanitize the state serialization by rewriting the device logs to <<DEVICE_LOGS>>. This fixes the issue and causes Electron to use less memory and CPU while in devlopment mode.
Reviewed By: jknoxville
Differential Revision: D16282673
fbshipit-source-id: abee6d167b23f24647e45f039a77ab60576ab3e6
Summary:
Original commit changeset: 650ef1344b8b
Backing this out until we can come up with a better way to do it.
The change was introduced so that when a device disconnects / crashes, we don't lose all plugin state, and you can still see what was on screen before the crash..
However, there are some problems with this solution, which get quite complicated. Putting them here for future reference:
* Closing an app results in the plugins staying there, and there's no way to tell it's not actually connected.
* If the app reconnects, the JS plugin doesn't get re-initialized. Even though the client plugin has been.
Reviewed By: bnelo12
Differential Revision: D16280931
fbshipit-source-id: 48e09b876e631aa87372054e706cdb9a2b3e2eb7
Summary:
Original commit changeset: 1d0e6ce17c89
Backing this out until we can come up with a better way to do it.
The change was introduced so that when a device disconnects / crashes, we don't lose all plugin state, and you can still see what was on screen before the crash..
However, there are some problems with this solution, which get quite complicated. Putting them here for future reference:
* Closing an app results in the plugins staying there, and there's no way to tell it's not actually connected.
* If the app reconnects, the JS plugin doesn't get re-initialized. Even though the client plugin has been.
Reviewed By: bnelo12
Differential Revision: D16280932
fbshipit-source-id: 92585cdd0dace2012924df4106327a1e21ab9f9b
Summary:
Add fields for colouring the changeset operation that was performed on a node in the tree.
Changesets are not ordered by type of operation, they need to be displayed in order
Reviewed By: danielbuechele
Differential Revision: D16121158
fbshipit-source-id: 411557170b16ada9d1d72fb617b1aaf583e0f0e7
Summary:
This changes the start date of all generated certificates to be 1h in the past.
Why? To allow for clock skew, and allow clock manipulation in tests.
To do this, I had to switch from `openssl x509 req`, to `openssl ca` for generating them, because it has the startdate parameter.
This variant is a bit more complicated to use, so I've added an openssl.conf and some extra files.
I also changed the org from Sonar to Flipper because it now needs to match the CSRs coming from the mobile apps, and they use Flipper.
Reviewed By: passy
Differential Revision: D16223722
fbshipit-source-id: bdbd61bce1bc1b54d7b0b3cc6741675aa68d2cf6
Summary: Adds a feature to display status update, while exporting Flipper trace. This will make user aware of the steps which are being executed to export flipper trace. This diff also logs the status update, to better support the issue posted by the user regarding the Flipper trace.
Reviewed By: jknoxville
Differential Revision: D16203810
fbshipit-source-id: 8f0bdc3836fec6dd79f2ca9827822d13f6cfd8bd
Summary: Adds close button to the dialog box which appears while exporting a flipper trace. To implement this I had to first see what is the bottle neck of the export process. The major bottle neck turned out to be the serialization step. So to make the export process interruptible, I have put in a call `await idler.idle()` which resolves when the main thread is idle. I have also added the tests for the idler.
Reviewed By: passy
Differential Revision: D16183582
fbshipit-source-id: 4ec0c985e216fd9d41e91cdcd8b4cca66d2cb04d
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:
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:
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: 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:
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: ... so device plugins can import it via the flipper module.
Reviewed By: danielbuechele
Differential Revision: D16111730
fbshipit-source-id: ac399692a11fc2b61d702eb46c57f6ca30fe0d72
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: 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
Summary: Now if you copy one of components in flipper in layout plugin, you will get not only name but also id in your clipboard
Reviewed By: priteshrnandgaonkar
Differential Revision: D16031628
fbshipit-source-id: e2c38182dea28719615609f3aa2c74e58749cce4
Summary:
Summary of Bug:
The devices menu popup does not toggle as expected.
Because of the way the click event is fired in Javascript, that is mousedown, mouseup, click, and the fact that the electron menu closes on mousedown, was why the menu was not toggling as expected.
Fix:
This is a potential fix where I add some state to tell if the menu was recently closed, and disable the popup if it was. This is done through the callback method of menu.popup. Then on the next mouse event I renable the popup.
In addition to this, I moved the popup logic into onMouseUp instead of onClick. This was simply to make the code neater. Before I would have to add a timer to the onMouseUp event that would fire after the click event and renable the popup.
Let me know if there is a simple solution to this problem that I've completely missed.
Reviewed By: jknoxville
Differential Revision: D16028864
fbshipit-source-id: a73202536762cce2ab623176cbda0369ca2b8079
Summary:
Fixes the bug when the crash options had same title. Selection was broken in that case. Look at the video.
{F163450316}
Reviewed By: jknoxville
Differential Revision: D15985919
fbshipit-source-id: 7366c8f5f33bbddc15c058b7d20d78d295161404
Summary: Before this diff "Clear Logs" didn't used to clear the log entries from the redux store. It just used to update the state, so when you switched back from other plugins, all previous log information used to pop up again. This diff fixes that.
Reviewed By: passy
Differential Revision: D16012710
fbshipit-source-id: 4393520ab6f77caa5f286e22446d2cb6d0827d71
Summary: Do not fetch meta data when the selected device is the archived one,
Reviewed By: jknoxville
Differential Revision: D16011742
fbshipit-source-id: cd84ef62094ffd8f90922d304ebd911f3b36f469
Summary:
Line 166 is missing a process.exit() causing the process to stay open forever if anything goes wrong.
Making everything use errorAndExit, and making use of the utility function so we don't need to remember when to print e, and when to print e.message.
Reviewed By: passy
Differential Revision: D15989164
fbshipit-source-id: c683fa07d98fe49283a59b5f8108ef54babc97a3
Summary: When an Android device disconnects, the device is marked as offline. In this diff, we want to make sure the client for the disconnected apps is not removed, but converted into a "disconnected" client. This makes sure plugins are still shown for the disconnected app.
Reviewed By: passy
Differential Revision: D15985424
fbshipit-source-id: 650ef1344b8be4411794b0344805cb75ceae4a83
Summary:
Logging to see how many people use this feature in addition to the notification logs
we keep.
Reviewed By: oprisnik
Differential Revision: D15983761
fbshipit-source-id: db64bf97d0643f2bfce25a539ee10147924ee3f8
Summary: Refactors the headless to have a list of closures instead of the `if` conditions. This will make addition of new arguments easy as it will be just adding a new closure to the list. One can change the order of the execution of the closures by inserting it at whatever index the user wants.
Reviewed By: passy
Differential Revision: D15965142
fbshipit-source-id: e9f348fe9d9011adcd47d140713d6187eab3b3d3
Summary: We catch everything that's thrown during the export, which sadly doesn't guarantee that everything is actually an `Error`. So we'll try to JSONify it instead if that happens. It's gross, but well, JavaScript.
Reviewed By: danielbuechele
Differential Revision: D15943111
fbshipit-source-id: 03e6c18403961c00c5878d093c813573461e637b
Summary:
Adding a `archive` method to Android devices, that returns a new ArchivedDevice with the same properties as the Android device. This method is called when an android device disconnects and the new ArchivedDevice is added to the devices list. When the device reconnects again, the archived device is removed.
Currently only logs are persisted. In following diffs we can:
- add support for iOS
- move the persisted pluginStates to the archived device as well
Reviewed By: passy
Differential Revision: D15942904
fbshipit-source-id: 07c5415994594abd630d0c4b458b76d1aac6ef02
Summary:
Apple has changed the xcrun api in some cases, it seems.
Adding support for true instead of YES...
Reviewed By: danielbuechele
Differential Revision: D15940810
fbshipit-source-id: 94ba2733527e005b989fb5a62ffbab2f7a0243b9
Summary:
We didn't start the perf marker with an actual marker, so I don't think we logged the event anywhere.
Searching for `onMessageCallback` doesn't bring anything up in the dev tools.
Reviewed By: danielbuechele
Differential Revision: D15939232
fbshipit-source-id: 95ede47f8a762e33d5532230ba83c2939539ba77
Summary:
This sometimes take *A LONG* time for me, so I want to
know if I'm an outlier or not.
Reviewed By: jknoxville
Differential Revision: D15939147
fbshipit-source-id: 9ebd3914efdd537eeadd49e522397acc97a6ff9c
Summary: Multiple markers might got truncated, now the list expands on hover
Reviewed By: jknoxville
Differential Revision: D15939404
fbshipit-source-id: 2640f200dc17876391e04eeced59bc7a2d925113
Summary:
When the stack trace is too long its difficult to read the stack trace as the scroll bar shows up. This diff makes the stack trace text to wrap onto the next line, inorder to avoid scrolling. Look at the attached image, to understand the bug.
{F162756039}
Reviewed By: passy
Differential Revision: D15921226
fbshipit-source-id: f7320951ccdcf531f4276088e3f3ee0f552ab2fc
Summary:
I received an error like this while rendering:
So we should type the callstack accordingly.
Reviewed By: priteshrnandgaonkar
Differential Revision: D15921517
fbshipit-source-id: 5863c75af142f1c22d5b520db8d7c0283f401e11