Commit Graph

1557 Commits

Author SHA1 Message Date
Mihaela Ogrezeanu
353f65cd7f Move Sections Plugin to OS folder
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
2019-07-01 07:06:39 -07:00
Daniel Büchele
468468a3bc Client fixes
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
2019-07-01 02:36:18 -07:00
Benjamin Elo
1a0ee24b1a Mac devices excluded from default devices
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
2019-06-28 03:46:34 -07:00
Pascal Hartig
63ad32f66b Flow 0.102
Summary: Nothing broke. Yay.

Reviewed By: jknoxville

Differential Revision: D16048261

fbshipit-source-id: 536b7eec147552f702670aceadcd422fdc14364d
2019-06-28 02:57:02 -07:00
John Knox
2f5f69a2c8 Print success message to stderr after headless
Summary: Adding some verbose logging for remote debugging during integrations.

Reviewed By: passy

Differential Revision: D16039055

fbshipit-source-id: 963e0be5ac1526badbd71b9ef2f4906bec2f13ed
2019-06-28 02:52:47 -07:00
Roman Gorbunov
30b7d4e9dd Copy ID of view
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
2019-06-28 01:51:40 -07:00
Pascal Hartig
d6cb86e4c0 Update layout-plugin.md (#473)
Summary:
Fix https://github.com/facebook/flipper/issues/472
Pull Request resolved: https://github.com/facebook/flipper/pull/473

Reviewed By: jknoxville

Differential Revision: D16030793

Pulled By: passy

fbshipit-source-id: 52d53be3ca0a4932e4c762e9906bc4576dd8147d
2019-06-27 09:30:54 -07:00
Benjamin Elo
ecf2831d5d Added toggle fix for dropdown device menu
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
2019-06-27 07:19:43 -07:00
Pritesh Nandgaonkar
81b71352dd Fix the bug related to the crash selection
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
2019-06-27 06:58:08 -07:00
Pritesh Nandgaonkar
c38a55d98f Clear entries from the device when logs are cleared
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
2019-06-27 06:58:08 -07:00
Pritesh Nandgaonkar
43495fa64c Do no fetch meta data for the archived device
Summary: Do not fetch meta data when the selected device is the archived one,

Reviewed By: jknoxville

Differential Revision: D16011742

fbshipit-source-id: cd84ef62094ffd8f90922d304ebd911f3b36f469
2019-06-27 06:58:07 -07:00
John Knox
0a0aec17ca Don't allow rejecting with non-error objects
Summary: This will make it easier to handle errors, because you know you can get the message out, along with stack trace, without having to deal with potentially any object that could be passed in.

Reviewed By: passy

Differential Revision: D16006180

fbshipit-source-id: f200965d7663c5f8a471603fceb6b4cdbea73381
2019-06-26 09:59:26 -07:00
John Knox
34f835ace8 More exit handling fixes
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
2019-06-26 09:17:56 -07:00
Pascal Hartig
1fd5fa23a1 Upgrade deps
Summary:
Upgrading `tmp`, `dashify` and `fs-extras` to their latest versions in an attempt to break my PSC writer's block.
Changelogs don't indicate any breaking changes that should affect us.

Reviewed By: danielbuechele

Differential Revision: D15983944

fbshipit-source-id: 53e87cf3c05e5742db1073e6ccf7f3bd4412638d
2019-06-26 05:40:15 -07:00
Daniel Büchele
718939cd6b disconnect client instead of removing it
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
2019-06-25 07:51:51 -07:00
Pascal Hartig
7d4bd4e1f3 Track usage of leak switch
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
2019-06-25 05:42:08 -07:00
Pritesh Nandgaonkar
cad26c9319 Refactor headless start function
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
2019-06-25 04:59:44 -07:00
Pascal Hartig
4aafc49aaf Remove unneeded pod instructions from release script
Summary: Per title.

Reviewed By: jknoxville

Differential Revision: D15964257

fbshipit-source-id: 7f5888cff480df3a598d703b0f2c58bc9fa0ab89
2019-06-24 06:24:01 -07:00
Pascal Hartig
3982082f57 Flipper Bump: v0.22.1-SNAPSHOT
Summary: Back to snapshots.

Reviewed By: jknoxville

Differential Revision: D15963818

fbshipit-source-id: 986cf248465a39c784decf89592be487f769b599
2019-06-24 04:56:23 -07:00
Pascal Hartig
ebe416602b Flipper Release: v0.22.0
Summary:
Overall improvements

* Fixed a memory leak caused by promise chaining
* Fixing multi-row selection using shift in tables
* Option to include column names when copying from a table
* Copying table rows which are currently outside the viewport
* Support regex search
* Making client connection more reliable

Plugins

Layout

* fixed a bug in layout search which caused a crash
* Adding accessibilityIdentifier for iOS

Logs

* Debouncing user input in search
* Fixing “stick to bottom” in logs
* Showing timestamp with logs
* Logs for a disconnected device are kept

Network

* Catching malformed URLs in network plugin
* copy full network request and response
* search network request using regex
* Correctly calculate response size

Fresco

* UI fixes in Fresco plugin
* Add missing events
* Add open-source documentation

Crash Reporter

* Account for long crash titles
* Fixing crash notifications
* Fixing display of long stacktraces

Export

* Fix error display

Other Plugins

* Add analytics logging to export
* Fixing UI glitch in Sections plugin

Infrastructure

* Add experimental support for mixed mode with TypeScript
* Upgraded to Flow 0.101.1
* Fix tracking of request/response types between client and device
* Improved iOS simulator compatibility

Reviewed By: jknoxville

Differential Revision: D15963819

fbshipit-source-id: 8af009381c05b9891d46f05a4b8f018754ae6517
2019-06-24 04:56:22 -07:00
Pascal Hartig
136eca41ad Format non-errors in export panel
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
2019-06-24 04:56:22 -07:00
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