Commit Graph

1536 Commits

Author SHA1 Message Date
Pascal Hartig
157f5a4ea6 Upgrade flow
Summary:
I'm reverting back to not using range qualifiers, too, because
my VSCode got out of sync with the flowconfig and got kinda upset.

Reviewed By: jknoxville

Differential Revision: D15940128

fbshipit-source-id: ce621e72245b66810a29559788515559740c028d
2019-06-24 04:05:07 -07:00
Daniel Büchele
74d7359cbe archive disconnected Android devices
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
2019-06-24 04:05:07 -07:00
John Knox
fdd75a123f Fix missing simulator bug
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
2019-06-21 09:00:21 -07:00
Pascal Hartig
c4acfa6507 Set marker for client time tracking
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
2019-06-21 06:33:00 -07:00
Pascal Hartig
eea7e1830b Track time for URL exports
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D15939231

fbshipit-source-id: edf6c854298b52d777cda56df14f268814fba9d2
2019-06-21 06:32:59 -07:00
Pascal Hartig
58c66a626d Track time for exports
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
2019-06-21 06:32:59 -07:00
Daniel Büchele
ab6fe68a70 show multiple lines of markers
Summary: Multiple markers might got truncated, now the list expands on hover

Reviewed By: jknoxville

Differential Revision: D15939404

fbshipit-source-id: 2640f200dc17876391e04eeced59bc7a2d925113
2019-06-21 05:57:29 -07:00
Pritesh Nandgaonkar
c86a6809cb Stacktrace rows now wrap into other line as it made difficult to read it with scroll bars
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
2019-06-21 03:45:58 -07:00
Pascal Hartig
375e313736 Consider callstack as nullable
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
2019-06-20 10:29:04 -07:00
Arnaud Frugier
f40ac0617c Add getTableInfo API to process incoming TableInfo queries
Summary: Getting the "definition" of the database was originally on the GetTableStructure endpoint. This diff moves it to a new GetTableInfo endpoint

Reviewed By: jknoxville

Differential Revision: D15902619

fbshipit-source-id: ac136d24ee577711366636801b5d74d83fbc523f
2019-06-20 08:29:53 -07:00
John Knox
a2663ea970 Make client -> device association more reliable
Summary:
For every client, there should be a device, otherwise flipper isn't working properly. However, these two things are created independently and either can be created first.

So make the device a promise, that will get fulfilled with the device if any appears in a reasonable time frame.
Previously, if there wasn't a device at the time needed, we just used '' for the name, I've preserved this functionality, though with a potential small delay.

We should be able to get rid of the NEW_CLIENT_SANITY_CHECK in the connections reducer, because the success rate of this promise achieves the same result.

Reviewed By: passy

Differential Revision: D14242264

fbshipit-source-id: ad21a179160a766304ff90f8c81e0563b990ebac
2019-06-20 07:06:51 -07:00
John Knox
9c99211221 Rename regexSupported to allowRegexSearch
Summary: This was annoying me so I thought I'd rename it before anyone else starts to use the prop.

Reviewed By: danielbuechele

Differential Revision: D15919159

fbshipit-source-id: c351503797cedc5c11a158cec62515b1eb791a70
2019-06-20 06:29:10 -07:00
Pritesh Nandgaonkar
b3979e7012 Fix the scroll of the crash headers in the plugin
Summary:
When the text is too long either for the crash name and the crash reason, user is not able to see scroll and see the text.

Bug:

{F162636692}

Reviewed By: danielbuechele

Differential Revision: D15907908

fbshipit-source-id: a9557074e310728d4cb4825ec18740ca0ea0c12f
2019-06-20 06:15:44 -07:00
Pritesh Nandgaonkar
0f9845a647 Fix the wrong notification filtering confition
Summary:
Fixes the bug which didn't fire the crash notification.

Bug:

{F162618487}

Reviewed By: passy

Differential Revision: D15905154

fbshipit-source-id: 8b34cc567789fbf7f255663a14017cbe300ac387
2019-06-20 06:15:44 -07:00
John Knox
5200f4f528 Use monospace font for regex in searchable
Summary:
Seemed a bit weird typing a regex without monospace.
Still would be good to have syntax highlighting. I tried using prismjs, but it seems to not work by default on Input elements.

Reviewed By: danielbuechele

Differential Revision: D15918742

fbshipit-source-id: b44c228b30f37f97811d09c80b191b52282720f8
2019-06-20 05:04:50 -07:00
Alexander Oprisnik
c22bdbe205 Add docs for Fresco image attribution
Reviewed By: passy

Differential Revision: D15900104

fbshipit-source-id: 90f53fefbedfa32ed275900542f94650f487a679
2019-06-20 04:54:20 -07:00
Pritesh Nandgaonkar
3307576cb7 Use Buffer.bytelenght for calculating the length
Summary:
This diff fixes the bug which showed the length of characters as the byte length when the response headers didn't have `content-length` in it.

This diff uses `Buffer.bytelength` api to calculate the same.

Reviewed By: danielbuechele

Differential Revision: D15899547

fbshipit-source-id: 29f4e8a741f4dd550b9191cc31bf6930065653b3
2019-06-20 04:08:30 -07:00
Pascal Hartig
9e13b90708 Add setup docs for Fresco/Images
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D15898614

fbshipit-source-id: b2d86a58e80b1309159bc738bcc66ca09cd796ad
2019-06-20 03:51:18 -07:00
Pascal Hartig
aae6a7f109 Add docs for fresco plugin
Summary:
Now that we finally have something we can screenshot ...

Just for the features page right now, will add some
"installation" instructions next.

Reviewed By: oprisnik

Differential Revision: D15898050

fbshipit-source-id: 9dfd3b1121799e7069336aac845ba2abdb3e42df
2019-06-20 03:51:18 -07:00
Pascal Hartig
145e872be1 Upgrade docusaurus
Summary: Just a minor version change, no changes expected.

Reviewed By: jknoxville

Differential Revision: D15897958

fbshipit-source-id: b103772159177e47884eb88e47f7b4077f77be03
2019-06-20 03:51:17 -07:00
Pascal Hartig
e3f88e2a7b Move events processing to PSR
Summary: Means that attribution is now part of the export, too.

Reviewed By: oprisnik

Differential Revision: D15877937

fbshipit-source-id: e089597269b8977320d06284179f72d40d01ebf2
2019-06-20 03:51:17 -07:00
Pascal Hartig
5c497d3eea Make the sidebar pretty
Summary:
Now that the events tracking works again, make sure that the padding is not all over the place in the sidebar.

Before:

{F162525912}

Reviewed By: priteshrnandgaonkar

Differential Revision: D15875758

fbshipit-source-id: a30f057c8c0dc2dc77fc40f416ff565cc6621109
2019-06-20 03:51:17 -07:00
John Knox
0e7aaaacff Add regex search to network plugin
Reviewed By: danielbuechele

Differential Revision: D15899077

fbshipit-source-id: 92f2edf31925d73be252128afa851bb3fcb633a5
2019-06-20 02:50:20 -07:00
John Knox
b7229b40ac Add regex search to logs plugin
Summary:
Adds regex support to the logs plugin.

You can now do the same for any other SearchableTable, just by adding the prop `regexSupported={true}`

For other types of searchables, like maybe the layout hierarchy, we'll need to modify the class that does the filtering for that type.

I've done what I can with the UI to make it usable, though it would be awesome to have some proper regex syntax parsing and highlighting going on. It will go red if it's not valid at least.

Reviewed By: danielbuechele

Differential Revision: D15898806

fbshipit-source-id: 425edb1834dcc14ca741ac7fc8d566b4f2763c63
2019-06-20 02:50:20 -07:00
Sidharth Guglani
5a6d978536 Search with both name and id of the component in layout inspector and handle deeplinkpayload
Summary:
deepLinkPayload is passed as initialQuery to Search component and in componentDidMount we perform search if initially query is defined.

This does not handle the case if node is not present in the layout inspector tree.

Reviewed By: danielbuechele

Differential Revision: D15874343

fbshipit-source-id: c604baea16838f07e8f8bfc0f1e67c5e830dfe97
2019-06-19 09:08:10 -07:00
Daniel Büchele
8bc26378f0 copy virtualized rows
Summary: Rows that were virtualized and currently not rendered weren't copied, because we were using the DOM to get their content. This changes this to use out `textContent` utility to get the value of a row and therefore enables copying rows that are not rendered.

Reviewed By: jknoxville

Differential Revision: D15898935

fbshipit-source-id: c372bc4e77477214860f0513b442374da8f72416
2019-06-19 09:01:00 -07:00
Daniel Büchele
48b690169e Copy request details
Summary: Copying/Creating a Paste from a network request only copied the domain. Now we are including all request/response data.

Reviewed By: jknoxville

Differential Revision: D15898038

fbshipit-source-id: 570ca5bb76e65b90b2b467856e6d3747682cc20d
2019-06-19 09:00:59 -07:00
Daniel Büchele
3f1ab6be47 fix range select
Summary:
Where was a bug, where a range selection using the shift key wasn't working, when the start of the selection was outside the viewport.
The problem was caused by `selectInRange` firing twice, the second time with wrong arguments. In this diff, we are not firing the `onMouseEnterRow` handler, when the shift key is pressed.

Reviewed By: jknoxville

Differential Revision: D15897880

fbshipit-source-id: 95402dcbe9f8ce691be16cfd103918b09ff9e75c
2019-06-19 06:25:45 -07:00
Pascal Hartig
d6bb5e5d32 Allow both subscriptions and persistedStateReducer
Summary:
The previous setup would first check for the presence of a `persistedStateReducer` and then skip the standard subscriptions if this was found. This is a bit of a foot gun because simply by introducing a new function, you'd silently lose your existing subscriptions.

There are still some good reasons to support both as some subscriptions may not require persisting as they're directly tied to the state in the app at a given point.

Reviewed By: danielbuechele

Differential Revision: D15856372

fbshipit-source-id: a36bf40b1ceac431964610571eb70fff687b7607
2019-06-19 03:45:52 -07:00
Chenhao Xu
b41c4967a8 Flipper CPU Plugin: Thermal Information
Summary: display thermal information of connected device in the CPU plugin on a sidebar

Reviewed By: charles011

Differential Revision: D15715680

fbshipit-source-id: 1216da7bf8e0e6277d06aa02f40e6278f8e7fa07
2019-06-18 09:45:36 -07:00
John Knox
b0f44d9a9b Add accessibilityIdentifier to iOS layout attributes
Summary: Apparently useful for debugging e2e tests which reference accessibility Identifiers

Reviewed By: passy

Differential Revision: D15874161

fbshipit-source-id: b6a71a8474b52546bd825c0d13c1487688c7a30e
2019-06-18 09:40:19 -07:00
John Knox
6bdaa6aff1 Keep autoscrolling even when a table is cleared
Summary:
The logs plugin had an inconsistency where you'd be tailing the logs, and then hit "Clear Logs", which would empty the screen, but as the page fills up again, it would stay in the current position and not scroll with the new ones coming in.

This makes it consistent by making the behaviour:
```
If not props.stickyBottom
    never autoscroll, e.g. for static tables of data
else
    if scrolled to the bottom
        autoscroll
    if all the rows fit into the screen at once
        autoscroll
```

Reviewed By: passy

Differential Revision: D15856813

fbshipit-source-id: 1357b0e39b576dbe69d260545b21fdab808d2bd2
2019-06-18 09:34:16 -07:00
Pascal Hartig
447d88e935 Bump React Devtools
Summary: Just getting us up to 3.6 as we were quite far behind.

Reviewed By: danielbuechele

Differential Revision: D15863375

fbshipit-source-id: 39c444bd8e788cd8cff4b6d19513d072182dc179
2019-06-18 04:29:51 -07:00
suyimo
eb4de1f3b7 Add protect when save task (#466)
Summary:
Bugfix

Add protect when save task

If local cache resource are valid, we don't create a Task .So here are crash.
Pull Request resolved: https://github.com/facebook/flipper/pull/466

Reviewed By: passy

Differential Revision: D15851816

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 753b3c5c9a6ed4c703c934a89e45fa30df99068c
2019-06-18 03:56:56 -07:00
Pascal Hartig
977a304672 Fix sidebar display
Summary:
Before:

{F162109040}

Reviewed By: danielbuechele

Differential Revision: D15855444

fbshipit-source-id: c95ab1b0aa577dec5d493a0f6d166cb3aeeb7419
2019-06-18 03:14:14 -07:00
Pascal Hartig
098d0bdba3 Increase z-index
Summary:
Ensure that sheets aren't underneath the headers in the images plugin.

{F162094893}

Reviewed By: jknoxville

Differential Revision: D15853171

fbshipit-source-id: 8fd7217a50ee2823a89b788718fdef50830dc31a
2019-06-18 03:14:14 -07:00
Pascal Hartig
9c75ea7665 Refactor share sheet selection
Summary:
We're if-ing over an enum, so this should be a switch.
Also removed the edge case for the share sheet and
made the error handling part of the component so the
user actually sees it.

Reviewed By: jknoxville

Differential Revision: D15853056

fbshipit-source-id: 241ed0f2e042b08c4c157db9616175297b683ac3
2019-06-18 03:14:14 -07:00
Daniel Büchele
5aaf0c4f29 debounce search
Summary:
Debouncing search to prevent triggering multiple searches, while typing.
Now, a search is only triggered, when the input hasn't changed for more than 200ms.
This affects all SearchableTables.

Reviewed By: passy

Differential Revision: D15855343

fbshipit-source-id: 261cf601249ac604c865ae10deb25d5c836f964a
2019-06-17 10:02:37 -07:00
John Knox
ee3473c42a Show timestamp in logs by default
Summary:
Makes the timestamp column visible by default in the logs plugin.
Can still be hidden by right clicking the column name.

Reviewed By: passy

Differential Revision: D15855890

fbshipit-source-id: 349a224c6a0ddfe607e7d92ce11df07c42b5db36
2019-06-17 09:58:05 -07:00
John Knox
1d776f6b9e Add copy with columns header option to table rows
Summary: Add "With columns header" and "Without columns header" options when copying rows.

Reviewed By: danielbuechele

Differential Revision: D15854176

fbshipit-source-id: ff7b5639cc313b74528e5e85f6c84e314058e899
2019-06-17 09:29:37 -07:00
John Knox
ef1eb41dba Use mutex library instead of repeatedly chaining promises
Summary:
I noticed that after a long-running flipper session, 11% of the memory was composed of millions of tiny PromiseReaction records (https://github.com/domenic/promises-unwrapping#promisereaction-records).

It seems this method of chaining promises meant that it was forming a linked list of these from the most recent, back to the very first invocation.

Instead of using a home-rolled lock, I'm replacing it with an actual library. Haven't verified the fix, but this seems like a better approach regardless.

Reviewed By: passy

Differential Revision: D15853570

fbshipit-source-id: 1626d9f25cba809794b13ee920bdec2cd1d4b874
2019-06-17 09:11:50 -07:00
Pritesh Nandgaonkar
347487a328 Fix fresco tests
Summary:
The test used to exit before the promise was fulfilled, so essentially all tests passed. For more details, read [here](https://jestjs.io/docs/en/asynchronous.html)

> Be sure to return the assertion—if you omit this return statement, your test will complete before the promise returned from fetchData is resolved and then() has a chance to execute the callback.

Reviewed By: jknoxville

Differential Revision: D15804017

fbshipit-source-id: 769caa8957737b4864c5888d28854920e6a1447a
2019-06-17 06:18:45 -07:00
Pritesh Nandgaonkar
e5294d34f0 Plugin name list
Summary:
Adds an argument to the headless Flipper to print the list of available plugins. Added `--list-plugins`.

Currently the startFlipper function is not scalable enough to add new arguments and its implementation. I am planning to tackle this with the list of Actions which will be closure. So adding a new argument with its implementation will be just appending a closure at the correct location in an array. Will work on that in the later diff stacked on the current one.

Reviewed By: jknoxville

Differential Revision: D15789778

fbshipit-source-id: 91ba472617d593c3490bb932590a06d83597cba7
2019-06-17 06:18:45 -07:00
Andres Suarez
198841d1d7 Rename uses of install-node-modules.sh in fbsource
Differential Revision: D15848788

fbshipit-source-id: b98626083ed7aee108f27d6e8c5c7b637e1b2327
2019-06-17 06:07:19 -07:00
Pascal Hartig
66c52930f2 Force newer underscore.string version
Summary:
To fix security alert from GitHub:

https://github.com/facebook/flipper/network/alert/website/yarn.lock/underscore.string/open

Reviewed By: jknoxville

Differential Revision: D15851515

fbshipit-source-id: ce9ca1543f9315c38c73b92fd84b8376283eb7bb
2019-06-17 04:47:23 -07:00
Arthur Kushka
1444946afa Added retries information to Insights tab of Networking plugin
Summary:
In React VR we doing automatic retries in cases when request takes too much time. It helps in cases when network quality is poor. As long as this implicit for developer, we would like to highlight this information in insights. It helps to explain why request were so long.

This diff adds one more field to insights which displays amount of time spent on retries, count and limit of them.

https://pxl.cl/CntV

Reviewed By: passy

Differential Revision: D15845598

fbshipit-source-id: 3e0d1baf93b6be5c4d1c6c1d2b64c05852b843b7
2019-06-17 03:05:40 -07:00
Pascal Hartig
f0d7667b3e Add missing snapshot test
Summary: Don't know how this landed without?

Reviewed By: jknoxville

Differential Revision: D15826033

fbshipit-source-id: 4895d26620b868b99429c7a6f290c05e1e805b8d
2019-06-14 10:28:12 -07:00
Arthur Kushka
1e700b944c Implemented insights tab in sidebar of networking plugin
Summary:
https://pxl.cl/Cd84

In React VR we got a case to explain developers why their requests took so long. To do this we export timings from Curl and send them in Flipper. This diff added visualization for this data. Any other platforms can use this feature by extending json which they send to Flipper.

Reviewed By: jknoxville

Differential Revision: D15804247

fbshipit-source-id: 9deea5c9f5f7c5416b42c476f7f0ed431c8dea04
2019-06-14 09:29:34 -07:00
John Knox
08454c056b Allow multi-highlight in db plugin
Summary: Enable highlight of multiple rows so they can be copied

Reviewed By: passy

Differential Revision: D15822749

fbshipit-source-id: 2302ddd27a57574c1eaf1f1395939c9f006ba301
2019-06-14 09:13:52 -07:00
John Knox
062cbc0dbd Fix contextClick after multi-highlight
Summary:
Select multiple rows, and then right click, or use Ctrl-click.
This was broken, it was resetting the selection when this happened.
This fixes it.

Now after selecting multiple, what happens depends where you right-click.

If you right-click within the current selection, it stays selected and you can copy it.
But if you right-click outside the current selection, that row becomes the new selected set, and you will just be able to copy that one. This feels right to me.

Reviewed By: passy

Differential Revision: D15822668

fbshipit-source-id: 6a6cda8a8f16fec55cffa52c1c2ff958c86b3f43
2019-06-14 09:13:52 -07:00