Commit Graph

961 Commits

Author SHA1 Message Date
generatedunixname89002005306973
7ef7b9a248 Flipper Release: v0.211.1
Summary: Releasing version 0.211.1

Reviewed By: passy

Differential Revision: D48349388

fbshipit-source-id: 7e152acb6009148bfbade2ee282bc681e12b110f
2023-08-15 06:56:48 -07:00
Lorenzo Blasa
ff6f98fc0d Import File implementation
Summary: Implementation was missing for the browser. This provides a default implementation.

Reviewed By: aigoncharov

Differential Revision: D48311198

fbshipit-source-id: fd067600f571234e0fbccfb90853b62f175ff8fb
2023-08-14 11:33:06 -07:00
generatedunixname89002005306973
22f67e389f Flipper Release: v0.211.0
Summary: Releasing version 0.211.0

Reviewed By: ivanmisuno

Differential Revision: D48185752

fbshipit-source-id: 9e81f1e869e86194e8d90d83a3a988c778bb22e4
2023-08-09 09:23:44 -07:00
generatedunixname89002005306973
1b0a5f4320 Flipper Release: v0.210.1
Summary: Releasing version 0.210.1

Reviewed By: passy

Differential Revision: D48112784

fbshipit-source-id: 8a6303e7cfeabd2b7f13a48be9c5f8bb0c0f5616
2023-08-07 09:21:54 -07:00
generatedunixname89002005306973
f81eb544fa Flipper Release: v0.210.0
Summary: Releasing version 0.210.0

Reviewed By: lblasa

Differential Revision: D47994316

fbshipit-source-id: 24559a57d58a769f6e578cf344135522e4e7c9be
2023-08-02 09:48:04 -07:00
Luke De Feo
af7c1c7e74 Dont allow focusing leaf node
Summary: This mode is useless for leaves

Reviewed By: aigoncharov

Differential Revision: D47949539

fbshipit-source-id: 7f3ae6652ad696e9f550fe5b8f2298a1a3eff329
2023-08-01 10:32:29 -07:00
Luke De Feo
9932d28b2f Optimize wireframe mode
Summary: I noticed a slow down when using key board controls as this would change the selection. this adds the optimization back when wireframe mode == All

Reviewed By: antonk52

Differential Revision: D47949836

fbshipit-source-id: a08e5608c159d23b8a0afed419724c02231718d6
2023-08-01 10:32:29 -07:00
Luke De Feo
4e7ca39168 Tweaks to tree UI
Summary:
Made rows smaller so you get to see more content
Monospace font

Reviewed By: antonk52

Differential Revision: D47949839

fbshipit-source-id: f8935e233838ff35acf8c1ab14bcf9b8f2153ab4
2023-08-01 10:32:29 -07:00
Luke De Feo
09042ec5d6 Make non visible views non opaque
Summary: On certain apps there are a lot of views that have zero size and this isnt clear from the tree view. This will help

Reviewed By: lblasa

Differential Revision: D47917167

fbshipit-source-id: 180ef1cf34c3735acfd54d3498db9d29f759d959
2023-08-01 10:32:29 -07:00
Luke De Feo
1cf0527a51 Double click to expand or collapse in tree
Reviewed By: aigoncharov

Differential Revision: D47949838

fbshipit-source-id: be7208633cee13579eaa20d3b0bfaa4380a4e399
2023-08-01 10:32:29 -07:00
Luke De Feo
795d1de10d Dont auto expand nodes
Summary:
Rather than automatically collapsing siblings when using the visualiser instead we take a different approach:
1. The tree starts out fully collapsed
2. Every time you click on the visualiser we expand it and its ancestory chain to expanded nodes.

This is exactly how the Dom inspector works. The previous approach of constantly collapsing all siblings when uinsg the visualiser felt too intrusive and taking control from the user. The option is still there but only in the context menu

Some ultilities around autocollapsing nodes were removed as they dont make sense anymore that we now send complete frames

Changelog: UIDebugger Tree starts collapsed and expands as you click from the visualiser

Reviewed By: aigoncharov

Differential Revision: D47949843

fbshipit-source-id: 4381d22b12874dde5a89267572bee95f084380e3
2023-08-01 10:32:29 -07:00
Luke De Feo
ce1fdfdf19 Added context menu items for collapsing and expanding nodes
Summary:
Added 3 context menu items:
- expand recursive
- collapse recursive

These are self explanatory.

I also collapse non ancestors. This collapses everything except your direct ancestor path to the root. Quite useful to refocus the tree on a node

Changelog: UIDebugger - added  context menu items for exanding and collapsing the tree.

Reviewed By: aigoncharov

Differential Revision: D47949840

fbshipit-source-id: 6eebba182fe2092fbf5f0db0ec5ff728c3900424
2023-08-01 10:32:29 -07:00
Luke De Feo
129c848b78 Fixed bug where target mode would contain parents of hit nodes
Summary: The idea of the hit test is to return the deepest children that hit an element and not their parents. Due to this bug we were actually returning every other node all the way up to the root resulting in way to many hit nodes for target mode

Reviewed By: lblasa

Differential Revision: D47949837

fbshipit-source-id: d3391b4a700ab0be4c3b21dde5f13452f90c887b
2023-08-01 10:32:29 -07:00
Luke De Feo
fb503a0a2f Add wireframe mode control
Summary:
This allows you to control how the wire frames are drawn, useful when there are lots of overalpping wireframes

Changelog: UIDebugger - Added wireframe mode control, useful when lots of overlapping wireframes

Reviewed By: aigoncharov

Differential Revision: D47949841

fbshipit-source-id: 72de7d085ca433557107ab0cc6e4399220836d9f
2023-08-01 10:32:29 -07:00
Luke De Feo
1394a41599 Fix subtile bug with keyboard controls
Summary:
The code used the hovered node and selected node somewhere inconsistently for keyboard controls, this led to subitle bugs where if you moused over the next keybaord jump point would be the hovered node sometimes. This straightens it all out

Changelog: [UIDebugger] Fixed bug with keyboard tree controls

Reviewed By: aigoncharov

Differential Revision: D47832249

fbshipit-source-id: 7697c97a817ed5b70250c0c4f12fc1c59bdb96b9
2023-08-01 06:41:14 -07:00
Luke De Feo
21483986c3 Fix bug in tree when search term is set
Summary: Previously we would run the effect even if search term hadnt changed causing us to scorll to a search term rather than the selected node when selecting in the visualiser

Reviewed By: antonk52

Differential Revision: D47831188

fbshipit-source-id: 5700d49aea219a1229bcc8df462e55d8508c6c1a
2023-08-01 06:41:14 -07:00
generatedunixname89002005306973
27d98663c5 Flipper Release: v0.209.0
Summary: Releasing version 0.209.0

Reviewed By: lblasa

Differential Revision: D47836467

fbshipit-source-id: 4bf76e428a505a5182bb8d5a8608cae9c12e426e
2023-07-28 01:54:03 -07:00
generatedunixname89002005306973
6962289ad9 Flipper Release: v0.208.0
Summary: Releasing version 0.208.0

Reviewed By: aigoncharov

Differential Revision: D47791662

fbshipit-source-id: 9a93f9d49c0fa9a3e1598e3f00f988a94cc1eea0
2023-07-26 04:32:34 -07:00
Luke De Feo
b47c88f2b5 Analytics for target mode
Reviewed By: antonk52

Differential Revision: D47757367

fbshipit-source-id: f6ce53a1edc3095a488097e304d3774b0702185b
2023-07-26 04:24:54 -07:00
Luke De Feo
c1a99a8a52 ONly show framework event monitoring where there are events
Reviewed By: antonk52

Differential Revision: D47757004

fbshipit-source-id: 44e0e6aff0213d3bf684652906abae28777cfe9e
2023-07-26 04:24:54 -07:00
Luke De Feo
f854e9f3f3 rename controls to tree controls and consistent button style
Reviewed By: mweststrate

Differential Revision: D47672437

fbshipit-source-id: 5ce237cfd300a481450411a0242410e01bcc5411
2023-07-26 03:22:38 -07:00
Luke De Feo
ab84bb9bad Add visualiser controls + target mode
Summary:
Now that we have panels for tree visualiser separately we can have visualiser specific controls. There is a dedicated button for focus mode which should make that more discoverable and a better implementation of target mode which uses a slider. This has several benefits:
1. more discoverable
2. more obvious what is going on with the text prompts and a real slider control instead of mouse enter
3. there is no context menu getting in the way of the content

Changelog: UIDebugger Add visualizer target mode feature for selecting views in the z stack easily
Changelog: UIDebugger Add FocusMode button to visualiser toolbar

Reviewed By: mweststrate

Differential Revision: D47671658

fbshipit-source-id: 6f657f9d417280627457624660b934c9898cda58
2023-07-26 03:22:38 -07:00
Luke De Feo
8adf153380 Remove visualizer context menu
Summary: This isnt very discoverable and we can put functionality in the toolbar

Reviewed By: mweststrate

Differential Revision: D47670683

fbshipit-source-id: 8426ba05135f9a56f0a0952e94ac80480cd30a48
2023-07-26 03:22:38 -07:00
Luke De Feo
bf74877ff5 Move visualiser into folder pre split
Reviewed By: mweststrate

Differential Revision: D47664272

fbshipit-source-id: 7cc22b272b9298837d45976996d0197d5e5550f0
2023-07-26 03:22:38 -07:00
Luke De Feo
272d2d2106 Redesign Split Tree and visualiser into panels
Summary: This looks a lot neater and allows us to have separate dedicated visualiser header

Reviewed By: mweststrate

Differential Revision: D47626867

fbshipit-source-id: 843721853e0ff88837afbb9bf3f510a908160d12
2023-07-26 03:22:38 -07:00
Luke De Feo
0e15dce033 New Tree design
Summary:
1. Add indent guidess to all tree depths
2. Monospaced font
3. cleaned up alignment of icons
4. Gave everything a bit more space to breathe

Changelog: UI Debugger Tree UI refresh, added indent guides and fixed alignment

Reviewed By: mweststrate

Differential Revision: D47626869

fbshipit-source-id: e4509621cda6c254f7dd5a7ec9b99c13efb577f4
2023-07-26 03:22:38 -07:00
Luke De Feo
3891a5d61b Introduce selection for elements in z stack aka target mode
Summary:
The old layout plugins target mode would ask you which view you wanted to select when you clicked, the visualiser currently chooses for you based on size of the element.

Sometimes this isnt what you want so I have added a context menu with all the intersecting nodes from which you can select or focus

Reviewed By: lblasa

Differential Revision: D47589789

fbshipit-source-id: 9c9d0d7587b830aa72089267d9bcf2b687142574
2023-07-26 03:22:38 -07:00
Michel Weststrate
e7ac579d1c Fix exception initial databaseList request failed: T.sort is not a function
Summary: Exception showed up in our monitoring. The only `.sort` that happens in that request/response sequence is the one updated. Didn't get to the root of this, but likely the plugin returns nothing rather than an empty array when no databases present?

Reviewed By: LukeDefeo

Differential Revision: D47665268

fbshipit-source-id: 3f8dea591db3e6cb5d4e0d09f893a177ad4f642e
2023-07-24 07:46:34 -07:00
Luke De Feo
8f857dc1c5 Fixed bug where visualizer not working after using focus more in visualiser context menu
Summary:
I introduced this to stop the visualiser going off while the framework events modal was open. However on mouse leave fires when the context menu is open. and if you click to focus then it never refires.

Also renamed the ref to make it clearer

Reviewed By: lblasa

Differential Revision: D47550672

fbshipit-source-id: 62e108e55e5c42a37d3aebded6467ececdc458df
2023-07-21 07:17:31 -07:00
Luke De Feo
f6dcaa2143 Selection interaction from overlay
Summary:
Previously we were registering a click handler with every single div in the visualiser. This is somewhat wasteful as well as was causing issues since i needed to call stop propagation to prevent the click bubbling and selecting all the parents too.

as a result of stop propagation the context menu behaviour was weird, when left clicking elsewhere to close the context menu it wouldnt work as the click was swallowed by the click handlers for the nodes.

Now we have a much simpler system. The hovered overlay is the click handler. Thats it.

Another benefit of this is the visualisation nodes under the overlays are all interaction less so they can be moved to canvas one day if need be

Reviewed By: lblasa

Differential Revision: D47550673

fbshipit-source-id: 1a607059c68f0b936f0184bd98a6a1492703d41b
2023-07-21 07:17:31 -07:00
Luke De Feo
6faccc4889 UIDRefactor 8/n rename tree types
Summary: The previous names made no sense after they drifted over time

Reviewed By: lblasa

Differential Revision: D47550916

fbshipit-source-id: fa7df17b090c52b68ab4af9388d87365da6e8ff3
2023-07-21 07:17:31 -07:00
Luke De Feo
d8fda847b8 UIDREfactor 7/n Split tree.tsx
Reviewed By: lblasa

Differential Revision: D47548809

fbshipit-source-id: bdcbc96129a289c64a4a0b17fab29ac91d73d48e
2023-07-21 07:17:31 -07:00
Luke De Feo
2655ea8523 UIDRefactor 6/n Move tree into folder
Summary: preparing to split this up a bit

Reviewed By: lblasa

Differential Revision: D47548840

fbshipit-source-id: 907b9cd6a7a044e4aad97f9755fd9b43b81768f1
2023-07-21 07:17:31 -07:00
Luke De Feo
efb23be4cf UID Refactor 5/n Refactor index.tsx
Summary:
This file was huge and was hard to understand what was going on.  changes:

1. UIActions moved out to separate file
2. create UIstate moved out
3. All declared state (atoms or plain js objects) moved to the top of the function like a class
4. utilities moved out

Reviewed By: lblasa

Differential Revision: D47547844

fbshipit-source-id: e7fa705a14a23bff2415016a488147bed7ad9e91
2023-07-21 07:17:31 -07:00
Luke De Feo
957a336349 UID refactor 4/ Expose readonly UIState
Summary:
Currently state writes can either go through a named handler that is easy to find and debug or they can directly modify the state.

By exposing readonly atoms only we ensure that all state writes go through a UIACtions. This adds consistency and ease of future debugging.

E.g We could add a utility to wrap all ui actions with logging statements

Reviewed By: antonk52

Differential Revision: D47547531

fbshipit-source-id: f88651169d8e7c5f7e31068d64f9aa5b6b573647
2023-07-21 07:17:31 -07:00
Luke De Feo
87a1b657c3 UID Refactor 3/n UINode -> ClientNode
Summary:
UINode has never been a good name, we have 3 versions of a node.
ClientNode Previously UINode (the raw data from the client)
NestedNode (for the visualiser)
TreeNode (extends ClientNode and adds stuff specific to the tree like indentation and expanded states)

Arguablely we dont need nested node but that is another story

Reviewed By: elboman

Differential Revision: D47547529

fbshipit-source-id: 9a3b119d1230ea7b6734e7a3270c28287b04faf1
2023-07-21 07:17:31 -07:00
Luke De Feo
f181551ce6 UID refactor 2/n Split types into client and desktop types
Summary: This file was getting overwelhming, and this seemed like a reasonable way to split it

Reviewed By: elboman

Differential Revision: D47547532

fbshipit-source-id: ab2bfa22daabbed13ec1445da0cf8ba88bda12d7
2023-07-21 07:17:31 -07:00
Luke De Feo
2cc0ca0167 UID Refactor 1/n move to utils
Summary: Lets start adding some organisation to the folder structure

Reviewed By: lblasa

Differential Revision: D47547530

fbshipit-source-id: 30d20340ccc4b1c3ab4d4712c807831d74028322
2023-07-21 07:17:31 -07:00
Luke De Feo
4df0ad4d35 Add Framework event table
Summary: Very basic framework events table, quite useful for debugging will add more to this soon

Reviewed By: lblasa

Differential Revision: D47520035

fbshipit-source-id: 10f4572dd4ed3529324f03a969773c7e91fde030
2023-07-21 07:17:31 -07:00
generatedunixname89002005306973
503abd6d22 Flipper Release: v0.207.0
Summary: Releasing version 0.207.0

Reviewed By: lblasa

Differential Revision: D47629967

fbshipit-source-id: 625011003adde117d024754aab65327dc44e147a
2023-07-20 06:41:58 -07:00
Luke De Feo
7812dae764 Migrate framework events backing data structure to datasource
Summary: This will allow us to build a nice table easily.

Reviewed By: lblasa

Differential Revision: D47520029

fbshipit-source-id: 3cdd776533b66688329171eb29b892e0b9153540
2023-07-19 08:58:20 -07:00
Luke De Feo
16480a95f3 Move framework event monitoring out of options
Summary: An more options page drop down of size one didnt really make a great deal of sense

Reviewed By: lblasa

Differential Revision: D47520034

fbshipit-source-id: cea7ac404f73a0d7e5a1541b16097c4fd6549215
2023-07-19 08:58:20 -07:00
Luke De Feo
3282417663 Fix bug where if events come in the creation of a new tab throws exception
Summary:
See title. The issue occurs because this tabs component derives a key by essentially serializing the children. Since its possible for different elements in the UIDebugger to have different number of tabs, due to framework events not always being present this was never anticipated.

Solution is to just let the callee supply a storage key which does not depend on the exact number of tabs

Reviewed By: lblasa

Differential Revision: D47520033

fbshipit-source-id: 67e57db5110fde52451d30496c25a25b0eb4a6f7
2023-07-19 08:58:20 -07:00
Luke De Feo
ff7182525a Add main thread filter control
Summary: This adds a filter on top of the event types to only highlight when the thread occurs on the main thread

Reviewed By: lblasa

Differential Revision: D47520036

fbshipit-source-id: b4a67b262345d845e5dcbf79bba5a210c1bca4f8
2023-07-19 08:58:20 -07:00
Luke De Feo
5ef37684eb Report framework events in diagnostics
Reviewed By: lblasa

Differential Revision: D47520032

fbshipit-source-id: c88f57f3a9c81e32c8c4c3ac46f523407bd44463
2023-07-19 08:58:20 -07:00
Luke De Feo
9d0b8ac0fe Align badge in tree
Reviewed By: lblasa

Differential Revision: D47520030

fbshipit-source-id: 01466aff57d048a50803366957396abeb76d5649
2023-07-19 08:58:20 -07:00
Luke De Feo
34f6b100d7 Refactor node highlighting
Summary: The previous approach would set the atom many times causing several unnecessary renders

Reviewed By: lblasa

Differential Revision: D47519869

fbshipit-source-id: 536334c892334035a6c0fefc86a2e205b2c9769d
2023-07-19 08:58:20 -07:00
Luke De Feo
b17c1be12f Ensure hover state of visualiser doesnt go off when modal open
Summary: I was experiencing some odd behaviour and locks ups from deep within Ant d. It seems to be related to the fact that tooltips for the visualiser were showing up when there was a modal on top.

Reviewed By: lblasa

Differential Revision: D47519848

fbshipit-source-id: d67edaedba2910069ba1eb424548de55c2badff3
2023-07-19 08:58:20 -07:00
Luke De Feo
a6bc8933cc No longer autoscroll when selecting via tree
Summary:
Added selection source concept to onSelect callback. This allows us to only autoscroll the tree when selection source is the visualiser. We had feedback that the horizontal autoscrolling whilst using the tree was unhelpful.

A side benefit of selection source is better tracking of how people use kb, tree vs visualiser to select things

Changelog: UIDebugger only autoscroll horizontally when selecting via the visualiser

Reviewed By: lblasa

Differential Revision: D47334078

fbshipit-source-id: d7eadddb8d3d0fd428d5c294b2dccc2f1efa5a95
2023-07-19 08:58:20 -07:00
Luke De Feo
d9c8dbf404 Fix react error
Summary: It was complaining about no key for items in a list

Reviewed By: antonk52

Differential Revision: D47396639

fbshipit-source-id: c3d5cb7205dbe1c343d109e22f43e5756a071119
2023-07-19 08:58:20 -07:00