Commit Graph

917 Commits

Author SHA1 Message Date
Andrey Goncharov
ccba2fb73e Prevent stack overflow in cyclical graphs
Summary: Logview reported "Error: Maximum call stack size exceeded" for "getElementLeaves". Apparently, there was a cycle in the graph that caused it. The new implementation should ignore cycles.

Reviewed By: lblasa

Differential Revision: D43976359

fbshipit-source-id: bb5218a3b29706146501241492ee079773d5abc3
2023-03-10 08:33:19 -08:00
Lorenzo Blasa
2dde672045 Events tab
Summary:
Add a frameworks events tab. This is currently using the `TimelineDataDescription` component which may ultimately be replaced by something more sophisticated.

In the meanwhile, this does the job of chronologically displaying events with a label.

Reviewed By: mweststrate

Differential Revision: D43948891

fbshipit-source-id: 31ebf8a1d0e126856c3aa5291a1a06d7f2547233
2023-03-10 06:18:21 -08:00
Lorenzo Blasa
d349135683 Badge for events instead of inline approach
Summary:
Instead of showing events as inline attributes, just show a badge with the number of it. Event details will be displayed with other means:

- Hover
- Dedicated tab
- Other

Reviewed By: mweststrate

Differential Revision: D43946575

fbshipit-source-id: 762a241040d7fc6afb2c86d129a620ff2bb15feb
2023-03-10 06:18:21 -08:00
Lorenzo Blasa
ed4903576a Better guidelines
Summary: Removes dotted/dashed lines for the hierarchy guidelines.

Reviewed By: ivanmisuno

Differential Revision: D43912904

fbshipit-source-id: c65de8258c7efc997ae739022e6af5919d6453f6
2023-03-10 03:14:32 -08:00
Vova-SH
a46b7c2e78 Fix example code on setup leakCanary plugin (#4566)
Summary:
Fix sample for install leak canary plugin

## Changelog

add brackets on sample code

Pull Request resolved: https://github.com/facebook/flipper/pull/4566

Test Plan: -

Reviewed By: antonk52

Differential Revision: D43766946

Pulled By: passy

fbshipit-source-id: 4bded0122330ab4186745a9f5b2dcbd511318ee3
2023-03-03 10:38:42 -08:00
Lorenzo Blasa
4d5bf8084b Remove feedback request
Summary: It has served its purpose, remove.

Reviewed By: LukeDefeo

Differential Revision: D43769239

fbshipit-source-id: 36fb575b15fe9d092c7728a56b735ff98ff78608
2023-03-03 07:33:24 -08:00
generatedunixname89002005306973
80edf44dc5 Flipper Release: v0.183.0
Summary: Releasing version 0.183.0

Reviewed By: passy

Differential Revision: D43692458

fbshipit-source-id: 7a879ae59de489643cf2195b89bf5232e0eecdf7
2023-03-01 10:06:37 -08:00
Lorenzo Blasa
3a36c269e7 Element name to not overflow
Summary: ^

Reviewed By: LukeDefeo, antonk52

Differential Revision: D43697303

fbshipit-source-id: 4acb6d50c02581688bcfd9ad65bf107412cffa42
2023-03-01 08:51:32 -08:00
generatedunixname89002005306973
5be020479d Flipper Release: v0.182.0
Summary: Releasing version 0.182.0

Reviewed By: ivanmisuno

Differential Revision: D43389080

fbshipit-source-id: 3a59082194d24c138fbd2c9bcc2e984b46c6f54e
2023-02-17 08:04:32 -08:00
Luke De Feo
95ef9bf585 Preserve scroll position after exiting focus mode
Summary: Previously we would scroll back to the top of the list

Reviewed By: passy, ivanmisuno

Differential Revision: D43390481

fbshipit-source-id: ce2d5d57d35b22e87a538720fe2760707a6bc058
2023-02-17 04:10:17 -08:00
Luke De Feo
d28748e69f Dont allow focusing nodes with zero area
Summary: If you focused a node with zero area (e.g a fragment) it would make the visualiser disappear. Simple solution is to prevent this in this case

Reviewed By: mweststrate

Differential Revision: D43363219

fbshipit-source-id: 8035db47486a2872fd86a5336e9fcaabeb0016a6
2023-02-17 02:45:05 -08:00
Luke De Feo
f12d8221d6 Fixed issue where visualiser would crop bottom few pixels of screen
Summary:
Fixes https://fb.workplace.com/groups/443457641253219/permalink/522118536720462/

On android for some reason our display metrics for the application, activity and winow were smaller than the decor view. We were using the root view as the base static view for the visualiser with overflow hidden. Since it will slightly smaller than the decor view we were losing some of the lower pixels of the snapshot

The decor view is the one that is actually snapshot so any bounds for nodes above are meaningless . The fix is to simply have the visualiser start at the snapshot view. We know this bounds is correct.

Tested on ios and android and all looks ok

Reviewed By: lblasa

Differential Revision: D43356523

fbshipit-source-id: 4d6177c8242365f33b1d64fc149a10baff7c85d6
2023-02-17 02:45:05 -08:00
Luke De Feo
d24343d2ac Make the visualiser scrollable and remember width
Summary:
Previously If you set the visualiser too wide, the height adjusts with the aspect ratio and  the bottom was cut off and there was no way to scroll. Have added a scrollbar if it exceeds the available height

Also the width state was promoted to an atom so the users resize amount is preserved when moving between plugins

A better solution might be to prevent the visualiser from getting too wide for the available hieght but it get complex when the window resizes.

Reviewed By: lblasa

Differential Revision: D43351294

fbshipit-source-id: f618a69ed025214593a74b952ce75c5fd98447cd
2023-02-17 02:45:05 -08:00
Luke De Feo
0651bb27df Fix automatic scrolling bug
Summary:
Fixes https://fb.workplace.com/groups/443457641253219/permalink/522121466720169/

For context see changelog.

The issue was because when an update comes in it creates an entirely new treeList. Since we were accessing that treeList in useEffect it was added to the dependency array. Therefore when an update came in we would scroll back to the last selected node. This effect was only meant to run when the selection changed in the visualiser. To fix we have to put the data it depends on in a ref so it can access the latest value without needing this data in the dependency array

changelog: UIDebugger Fix bug where if video playing on android and if element selected it would sometimes jump back to selected element when you scroll away

Reviewed By: mweststrate

Differential Revision: D43347501

fbshipit-source-id: f03bb32ddfa7828a4742d1a57e9be133a455ec30
2023-02-17 02:45:05 -08:00
Luke De Feo
8cae1f0de6 On select expand ancestory
Summary: Previously when selecting from the visualiser nothing would happen in the tree if one of the parents was collapsed

Reviewed By: lblasa

Differential Revision: D43318177

fbshipit-source-id: 7bf9296dec2ca82e3f983b4cf2676ea8741a9d0e
2023-02-17 02:45:05 -08:00
Luke De Feo
1cd916e414 Increase indent and automatically scroll horiztonally on selection
Summary:
Indent is made bigger so the horizontal lines have more space and the whole thing can breath more. To componesate the view scroll horiztontally so that the tree node is always visible. Was also able to clean up the hierachy a bit

changelog: increase tree indent and automatically scroll both horizontally and vertically when selecting an element

Reviewed By: lblasa

Differential Revision: D43311566

fbshipit-source-id: 53bc7bd55027e87fdecadac9aa8bc41612bb684a
2023-02-17 02:45:05 -08:00
Luke De Feo
d1e6b27358 Remove gap between tree scroll bar and visualiser resize handle
Summary:
So much tidier

changelog: UIDebugger remove gap between tree and visualiser

Reviewed By: lblasa

Differential Revision: D43307743

fbshipit-source-id: ceec9b3b164c93ecadfe8c0b7299a978b2915e3b
2023-02-17 02:45:05 -08:00
Luke De Feo
8581aa1944 Memoise selection of nodes
Summary:
For the visualiser we use the same trick as with the hover state. We subscribe to selection changes and only render if the prev or new state concerns us.

For the tree we change from object identity to the node id + and indent guide are added to the memoisation equal check.

Depending on teh change this tree memoisation can vary in effectiveness. If you go from nothing selecting to selecting the top element nothing is memoised since react needs to render every element to draw the indent guide. If you have somethign selected and select a nearby element the memoisation works well.

There are ways to improve this more down the road

changelog: UIDebugger improve performance of selecting nodes

Reviewed By: lblasa

Differential Revision: D43305979

fbshipit-source-id: 5d90e806ed7b6a8401e9968be398d4a67ed0c294
2023-02-17 02:45:05 -08:00
generatedunixname89002005306973
690a8df436 Flipper Release: v0.181.0
Summary: Releasing version 0.181.0

Reviewed By: lblasa

Differential Revision: D43351298

fbshipit-source-id: ac2196a1780ef58c04c20f56ea46bf9700cababb
2023-02-16 07:04:28 -08:00
Luke De Feo
25149cc8c9 Added bgs on android ID + cleanup
Summary:
Paddings and alignments were improved also

changelog:
UIDebugger - Added ability to big grep search based on android ID if available

Reviewed By: lblasa

Differential Revision: D43159228

fbshipit-source-id: e2d7190ea2411e936ba065328bcc375c64619e8f
2023-02-15 08:27:19 -08:00
Luke De Feo
96bed18df2 More context menu options in the tree
Summary:
Added ability to copy element name and any inline attributes

Changelog:
UI Debugger - Added extra context menu items for copying element name and attributes
UI Debugger - Added open in Android studio button
UI Debugger - Improve speed of loading the Open in IDE buttons

Reviewed By: lblasa

Differential Revision: D43153666

fbshipit-source-id: 8b440d77444cd6849388e7e9d348da4527db5baf
2023-02-15 08:27:19 -08:00
Xin Chen
2e511b5d08 Upgrade react-devtools-core to 4.27.2
Summary:
This diff upgrade dependencies to `react-devtools-core` to 4.27.2, which includes changes I need to unblock trace update highlights.

- Update package.json file for dependencies in all existing deps with latest version (4.26.1): https://fburl.com/code/litgze0m
- Run `yarn` under `xplat/js` and `xplat/js/public`

Changelog:
[General][Internal] - Upgrade react-devtools-core to 4.27.2

Reviewed By: javache

Differential Revision: D43176345

fbshipit-source-id: 8bd5a9eca286bbfbb1630cb92c15f9653fa3534a
2023-02-13 10:49:13 -08:00
kongxiaojun
42ac82bc8c Fix a crash when trying to remove a mock network call (#4403)
Summary:
Crash when trying to remove a mock network call

Issue: https://github.com/facebook/flipper/issues/3799

## Changelog

Read mock routes type error.Transform it from array to object.

Pull Request resolved: https://github.com/facebook/flipper/pull/4403

Test Plan: Test passed on my Mac.

Reviewed By: antonk52

Differential Revision: D42918910

Pulled By: passy

fbshipit-source-id: 919bb6d2a2887aed46fb4a348f3f93e7abb765e5
2023-02-13 05:05:18 -08:00
generatedunixname89002005306973
0c1d121201 Flipper Release: v0.180.0
Summary: Releasing version 0.180.0

Reviewed By: lblasa

Differential Revision: D43189826

fbshipit-source-id: f1e70cc76e1008b2ea989d70cb383d80eadc19a2
2023-02-10 09:48:48 -08:00
Lorenzo Blasa
ada748170f Make glyph optional
Summary:
Make it optional to display the icon (glyph) with a default of true.

Not used in this diff, but it will in future diffs.

Reviewed By: ivanmisuno

Differential Revision: D43186605

fbshipit-source-id: b525e126bcc46604e0abc0f83b6ff33a7ce78962
2023-02-10 06:04:04 -08:00
Lorenzo Blasa
5fc0bcb631 Dark mode fix for Glyph
Summary: <NoData /> didn't support dark mode, now it does.

Reviewed By: ivanmisuno

Differential Revision: D43186565

fbshipit-source-id: 9952535d8762d8510afcce03b6cde7b603292107
2023-02-10 06:04:04 -08:00
Lorenzo Blasa
ca602bffd0 Clearer section creation
Summary: A bit more explicit with the intent, clearer code.

Reviewed By: ivanmisuno

Differential Revision: D43186540

fbshipit-source-id: 24f2168f5be91673683966208c9b8b54125aaa5b
2023-02-10 06:04:04 -08:00
Lorenzo Blasa
6316852026 Remove unnecessary fragment
Summary: Remove unnecessary fragment.

Reviewed By: ivanmisuno

Differential Revision: D43186534

fbshipit-source-id: cf9c761b1ce3b9103d2facfba3c7acc7fc1fe339
2023-02-10 06:04:04 -08:00
Lorenzo Blasa
d858459516 Search placeholder and icon
Summary: ^

Reviewed By: antonk52

Differential Revision: D43118750

fbshipit-source-id: 46c341772d05d6712ac2c0d76d94ee942609c1b3
2023-02-08 07:09:08 -08:00
generatedunixname89002005306973
4f5c716c05 Flipper Release: v0.179.0
Summary: Releasing version 0.179.0

Reviewed By: lblasa

Differential Revision: D43084743

fbshipit-source-id: 14a237cccd4b423ae617040ec6b6bc9320dd7109
2023-02-07 10:23:53 -08:00
Lorenzo Blasa
39a4cc22b1 Dark mode support
Summary:
This change addresses some obvious issues which made the ui-debugger unusable with dark mode on.

There may more things that need changing, but at the very least this should be a good place to start.

Reviewed By: fabiomassimo

Differential Revision: D43083218

fbshipit-source-id: 8e4338b79178d3a0f05f9bcaffa2fc6f35eb0e21
2023-02-07 07:58:12 -08:00
Lorenzo Blasa
9c9cd91832 Remove id from Inspector
Summary: This is internal to ui-debugger so there's no need to surface this information to users.

Reviewed By: ivanmisuno

Differential Revision: D43081188

fbshipit-source-id: f6abdeb7828a1709d2590cf2a10407baec645420
2023-02-07 07:16:20 -08:00
Luke De Feo
c19dc150e6 Use event metadata in init event
Summary:
Previously we were checking the framework events stream for any new events and populating the map from that. Now we expect the init event to contain event types.

This allows us to know if the app supports framework event and therefore we dont show the controls to monitor it. Additionally we can fully populate the event monitoring dialog

Reviewed By: lblasa

Differential Revision: D42996552

fbshipit-source-id: 7850ada53d0630ba102af6c0d74d9d904f75eada
2023-02-06 04:33:11 -08:00
Luke De Feo
dc9c445f9e Highlight tree nodes when monitored event matches
Summary: Tree node flashes to highlight an event occured

Reviewed By: lblasa

Differential Revision: D42996554

fbshipit-source-id: fc51a76ce7e33d041d094fedc91f05338b907bec
2023-02-06 04:33:11 -08:00
Luke De Feo
8fc97f2caa Add monitored event summary
Summary: When an event is monitored show running total  in the tree

Reviewed By: lblasa

Differential Revision: D42996553

fbshipit-source-id: 9b7bd5d2e98d8775f28b0b541f4eb1bd8231cc3e
2023-02-06 04:33:11 -08:00
Luke De Feo
d93c9d45a9 Ability to highlight nodes that match monitored event
Summary:
Listen to framework events and store in a map based on node id

Added UI to allow for monitoring framework event types.

The event type is a string separated by : Each segment of this string represents a level in the dialog hierachy. For example Litho:Layout:StateUpdateSync  would have levels, Litho Layout StateUpdateSync

When event type monitored and event comes in for a node flash the visualiser node briefly

Reviewed By: lblasa

Differential Revision: D42074988

fbshipit-source-id: 52458ad87ab84bf7b1749e87be516ed73106a6c0
2023-02-06 04:33:11 -08:00
Luke De Feo
d3df6bc00e Attempt to render txid as date if possible
Summary: We are using frame time on android so make sense to present it

Reviewed By: lblasa

Differential Revision: D42996555

fbshipit-source-id: 595a08571ccd82de0761cfeea8a204e576981ee0
2023-02-06 04:33:11 -08:00
generatedunixname89002005306973
c3588417bd Flipper Release: v0.178.1
Summary: Releasing version 0.178.1

Reviewed By: mweststrate

Differential Revision: D42990168

fbshipit-source-id: 14306a45ef95facf37a4f3207cc3b8cc5a1a4da9
2023-02-06 02:49:30 -08:00
Lorenzo Blasa
4e21a67903 Better offset
Summary: For deep nested hierarchies, the current offset was too big making the hierarchy almost un-browsable. The current offset seems to work better.

Reviewed By: LukeDefeo

Differential Revision: D42996296

fbshipit-source-id: 808a2ecc32aff2d8d252bdb9f653344866e5653b
2023-02-03 08:37:33 -08:00
Lorenzo Blasa
dacc6ebb16 Feedback request
Summary:
^

Only for iOS this time.

Note: passing the device OS freely to the main component as this is just temporary code that will be deleted soon.

Reviewed By: antonk52

Differential Revision: D42990221

fbshipit-source-id: 41b4107caa6bf312191889af75afd28873f6eda5
2023-02-03 07:43:00 -08:00
Luke De Feo
df9b0a6aa6 Use react query to cache myles query
Summary: The call to myles was a little slow and very cachable so use react query. Additionally it depends on VPN / light so added an error state to make that clear.

Reviewed By: lblasa

Differential Revision: D42990344

fbshipit-source-id: 8d6ad20aea79f1972a7cf1f61f8af729e5f3464f
2023-02-03 04:38:51 -08:00
Lorenzo Blasa
7cc8e3732c Advertise UI Debugger for iOS
Summary:
^

If the connected device was not an Android device, we were not showing the notification. This change removes that check to also advertise on iOS.

Reviewed By: mweststrate

Differential Revision: D42989975

fbshipit-source-id: eac8d588be789dcab281a746395a4fb7a88df790
2023-02-03 04:01:23 -08:00
generatedunixname89002005306973
44451a3749 Flipper Release: v0.178.0
Summary: Releasing version 0.178.0

Reviewed By: lblasa

Differential Revision: D42918309

fbshipit-source-id: c1b7c9fa6088e71109cb998a460d472664d2c191
2023-02-02 04:46:35 -08:00
Lorenzo Blasa
92ac6988d5 Attributes inspector style improvements
Summary:
- Vertically center values
- Add gutter between rows/cols
- Tryout the removal of the indentation border (it could either be removed in the future or brought back)

Reviewed By: antonk52

Differential Revision: D42581663

fbshipit-source-id: cd682adca7f76f80240a0ca6d9023368a33453c3
2023-01-19 05:05:49 -08:00
generatedunixname89002005306973
61a9b14401 Flipper Release: v0.177.0
Summary: Releasing version 0.177.0

Reviewed By: lblasa

Differential Revision: D42530047

fbshipit-source-id: 477eb81e2fcab0d7ace9701b098483d3349c904a
2023-01-16 06:32:36 -08:00
Lorenzo Blasa
49403df95f Remove survey banner
Summary:
^

Not removing the component, yet, as we may re-introduce the survey once we officially release on iOS.

Reviewed By: antonk52

Differential Revision: D42499399

fbshipit-source-id: 596ebda7acf39c0b8377bbd3a1a8f4dfa81e59a4
2023-01-13 07:36:20 -08:00
Lorenzo Blasa
f007da93d3 Show the banner only once per day
Summary: ^

Reviewed By: jknoxville

Differential Revision: D42499338

fbshipit-source-id: 85c1edc676d00a1e442c5490575f8a14465d5a4f
2023-01-13 07:36:20 -08:00
Anton Nikolaev
45770eeff4 Small wording fix regarding support of iOS for Navigation plugin
Summary: There is no support of navigation plugin outside of Meta and it is not planned, so it's better to state directly in open-source docs instead of saying "Coming soon".

Reviewed By: lblasa

Differential Revision: D42370752

fbshipit-source-id: 23d6400ab7374877a0b13ae3b9c79fcb584763db
2023-01-06 09:29:44 -08:00
Luke De Feo
edf7dd1b8f Add entire node to raw data
Reviewed By: lblasa

Differential Revision: D41612115

fbshipit-source-id: a89dc1b3c994435afa9b85f6681df73f637c3f3f
2022-12-19 09:20:27 -08:00
Luke De Feo
989797a225 Dynamic scaling of visualizer and resizable window
Summary: Fixes https://fb.workplace.com/groups/443457641253219/permalink/480446154221034/

Reviewed By: mweststrate

Differential Revision: D42095625

fbshipit-source-id: 364577141f2819dd22b0b499b11770d0bb88b1f5
2022-12-16 03:47:58 -08:00