Summary:
As mentioned in the previous diff pixel copy only support copying a Window, Surface or SurfaceView, All of these underneath use surface.
For views attached to the window manager there is no activity / window so we need another solution
There is no official way to get a views underlying surface so we had to do some dirty hacks to get it from the window manager. See the inline comments for details.
Additionally it turns out that the pixel copy api was actually made async in Android 34, so to prepare for this the snapshot method was made a suspend function and we wrap the callback based apit with suspendCoroutine.
Reviewed By: lblasa
Differential Revision: D50845281
fbshipit-source-id: 5ba8ed6f330c1e04549812a6493ae5f4cb629d1f
Summary:
Pixel copy is a more reliable and consistent way to take a snapshot rather than drawing into a canvas. It accepts either:
Surface
SurfaceView
Window
For root views that belong to an activity its easy to get the window so we do that here.
In the next diff we solve this for other root views
Reviewed By: lblasa
Differential Revision: D50845282
fbshipit-source-id: 3968828dedd1e96a854b907e0fd152ad64993d95
Summary: Snapshot never made much sense in the descriptor since we only snapshot the decor views. Additionally in the next diff i will introduce a new way to snapshot so this will make it easier
Reviewed By: lblasa
Differential Revision: D50845280
fbshipit-source-id: c2eac351b72786e7b66951d0fa09cea52a6dcc69
Summary:
The previous approach was designed for a world that didnt happen and was extremely confusing and allowed for states that didnt make a lot of sense. E.g it was possible we were snapshotting multiple views.
The new model is much simpler. we still depend on the root view resolver to tell us about root decor views but now we just attach a predraw listener to the top most view and push out the updates. This is handled by the new class decor view tracker which is a replacement for all the observer business
Additionally we use a conflated chanel in the update queue, this means if the background processing is slow we wont keep adding new frames to the queue, we just keep 1 and the most recent frame
Partial layout traversal -> Layout traversal as traversal is now always from top to bottom of the whole application
Reviewed By: lblasa
Differential Revision: D50791527
fbshipit-source-id: 43640723aefa775aa7b74065f405cc08224ed8b8
Summary: This is currently done by querying the 'console-log' event. Instead, make it type safe and official.
Reviewed By: antonk52
Differential Revision: D50927954
fbshipit-source-id: ff767acdc51b942c6deb92ffbfd93288b3367062
Summary: This is currently done by querying the 'console-log' event. Instead, make it type safe and official.
Reviewed By: antonk52
Differential Revision: D50927803
fbshipit-source-id: e0488782dd584e36b6f742f9892fc09ffaf62469
Summary: This is currently done by querying the 'console-log' event. Instead, make it type safe and official.
Reviewed By: antonk52
Differential Revision: D50927713
fbshipit-source-id: 780c0f158bf8bdaa6d009035a0cee62c7828f479
Summary:
Original commit changeset: 6bc0c942b3d9
Original Phabricator Diff: D50885337
There's an issue with the import, same reason we do:
```
require('flipper-ui-core').startFlipperDesktop(flipperServer);
```
Reviewed By: aigoncharov
Differential Revision: D50926125
fbshipit-source-id: 04e1b920bcecab9f245924907637b36dac312f1f
Summary:
This will ensure only one instance of Flipper is running at any given point in time.
#thanks antonk52 for guidance and advise implementing a single Flipper instance solution which will improve overall Flipper user experience.
Reviewed By: antonk52
Differential Revision: D50455446
fbshipit-source-id: 2407c77d43ba28e91d525f6cdb11d7b9db1cfab7
Summary: As a follow-up from the utility created on the previous diff
Reviewed By: aigoncharov
Differential Revision: D50885337
fbshipit-source-id: 6bc0c942b3d96eb020ec15395f34d5794ba2ae15
Summary: This is currently used in multiple places, let's put it under utils.
Reviewed By: aigoncharov
Differential Revision: D50883125
fbshipit-source-id: ee161a035cd01ca73a2521f813c4b397aa647037
Summary: Apparantly this can be null, we have received traversal errors with this in the stacktrace
Reviewed By: adityasharat
Differential Revision: D50839760
fbshipit-source-id: 8e43f35b2adfa91358924b1e162c53c50b0d855d
Summary:
https://fb.workplace.com/groups/443457641253219/permalink/1716178925529425/
we had this stack trace which i belive is because we are accessing the litho view after its been unmounted, this is possible as the attributes fetching is async. To fix we move this part to be sync on the main thread
ui-debugger] Client error during traversal: {\n \"nodeName\": \"DeferredProcessing\",\n \"errorType\": \"NullPointerException\",\n \"errorMessage\": \"Attempt to invoke virtual method 'com.facebook.rendercore.extensions.ExtensionState com.facebook.litho.LithoHostListenerCoordinator.getVisibilityExtensionState()' on a null object reference\",\n \"stack\": \"java.lang.NullPointerException: Attempt to invoke virtual method 'com.facebook.rendercore.extensions.ExtensionState com.facebook.litho.LithoHostListenerCoordinator.getVisibilityExtensionState()' on a null object reference\\n\\tat com.facebook.litho.LithoView.getVisibilityExtensionState(LithoView.java:710)\\n\\tat com.facebook.litho.DebugComponent$Companion.isVisible(DebugComponent.kt:406)\\n\\tat com.facebook.flipper.plugins.uidebugger.litho.descriptors.DebugComponentDescriptor.getMountingData(DebugComponentDescriptor.kt:182)\\n\\tat com.facebook.flipper.plugins.uidebugger.litho.descriptors.DebugComponentDescriptor.access$getMountingData(DebugComponentDescriptor.kt:32)\\n\\tat com.facebook.flipper.plugins.uidebugger.litho.descriptors.Debug
Reviewed By: adityasharat
Differential Revision: D50843793
fbshipit-source-id: 8c1df8b291371fd379cb819df33ed933f36026a6
Summary: These are local changes required to make an installer for the last RN-only Electron distribution of Flipper. Instead of just throwing this away, let's keep it in the history of the repository, just in case.
Reviewed By: passy
Differential Revision: D50838207
fbshipit-source-id: 4966e046161e24a616c04d5cf57fee2512f06525
Summary: Move them from programmatic API that is barely used to a central place that handles state updates
Reviewed By: lblasa
Differential Revision: D50841152
fbshipit-source-id: 7938ae08629ba05736cb7acba5ca2014e2827acc
Summary:
Reference:
https://fb.workplace.com/groups/flippersupport/permalink/1717333982080586/
The steps added below seem to have fixed the issue.
Still need to investigate why these steps are needed.
Reviewed By: aigoncharov
Differential Revision: D50797561
fbshipit-source-id: a31c71dbedc506344438082846b41ff16b6f459a
Summary:
The previous offline page suggested launching Flipper from terminal by running a command.
Although this works, guidance can be simplified by just instructing users to launch Flipper from within the Applications folder.
Reviewed By: aigoncharov
Differential Revision: D50833741
fbshipit-source-id: 5a41090a66ee62c30cfc35edd69de51ed9cbbab9
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/5251
Reviewed By: mweststrate
Differential Revision: D50793947
Pulled By: passy
fbshipit-source-id: be1d4967f825a125c1f8819f1c2eea4b52c9eaba
Summary: If we fail to load the main js bundle, retry after 3 seconds.
Reviewed By: aigoncharov
Differential Revision: D50732857
fbshipit-source-id: b19ea165776f8105d724e586b1bed20bf1f5178c
Summary:
Setup Doctor can be used to discover installation issues. I've seen numerous times when there's a setup issue but users didn't check / bother with using the tool.
Instead, if there's an issue, show the screen regardless.
Reviewed By: mweststrate
Differential Revision: D50642080
fbshipit-source-id: 10eb7a758a61765a5b06d398f5041897fff6280e
Summary:
In the new sidebar design complex types are behind a preview. before states was an array under the key states.
Now we create a top level attribute according to its index
Reviewed By: lblasa
Differential Revision: D50654698
fbshipit-source-id: 410c50c5f1ab14efc77184a5b147d9bdf70761d4
Summary:
Allows more content on screen. Final diff of stack
Changelog: UIDebugger, new sidebar design
Reviewed By: lblasa
Differential Revision: D50595987
fbshipit-source-id: 436af4191dba37f7a0f41dca23ab6349856358cd
Summary: This filtering scheme is extremely basic, we only filter based on top level fields. Other schemes I considered were somewhat confusing and this works well in most if not all cases
Reviewed By: lblasa
Differential Revision: D50595986
fbshipit-source-id: 90cb82f8fc482fd4c6f996ff9e857f27766df544
Summary: This was not handled and arrays were not properly transformed
Reviewed By: lblasa
Differential Revision: D50595983
fbshipit-source-id: cae8777c653cc9fc2a1ea8cab05b3df476121855
Summary:
This is only really an issue in theUIDebugger where we have a dynamic number of tabs. on some nodes you have 3 tabs, on others you have 2. if you select the 3rd tab and move to a node with 2 tabs nothing will be selected.
With this fix we will fallback to the first tab
Reviewed By: lblasa
Differential Revision: D50595977
fbshipit-source-id: 25c36a5609f774c2d3fd650eb6520104864fbe95
Summary:
Complex nested arrays and objects are displayed in a modal since there isnt enough space to it practically.
Not many attributes in practice fall into this category
Reviewed By: lblasa
Differential Revision: D50595981
fbshipit-source-id: b1eda93c448de19c8803d64eb4cf105e2b6636a8
Summary: we show rbga on one line, and hex + preview on second line
Reviewed By: lblasa
Differential Revision: D50595979
fbshipit-source-id: 86015ceeb5e64e67fb85e3431f85916f7d175ca2
Summary:
in the figma design we have the concept of subsections which are single level deep objects shown inline
{F1126292520}
More complex nested objects are shown a a preview that you have to click on and will come later
Reviewed By: lblasa
Differential Revision: D50595984
fbshipit-source-id: ea831731b87ce9968516129cf177953e200cf4d5
Summary: This seems to be (no longer) in use.
Reviewed By: lblasa
Differential Revision: D50659072
fbshipit-source-id: 0fde643711ee4859a5d270a878d858694337d6a5