Commit Graph

12 Commits

Author SHA1 Message Date
Michel Weststrate
f0c54667e0 Support handling deeplinks in plugins
Summary:
This adds support for handling incoming deeplinks in a Sandy plugin, which can be done by using a `client.onDeepLink(deepLink => { } )` listener

Also generalized deeplinks to not just support strings, but also richer objects, which is beneficial to plugin to plugin linking.

Reviewed By: jknoxville

Differential Revision: D22524749

fbshipit-source-id: 2cbe8d52f6eac91a1c1c8c8494706952920b9181
2020-07-22 04:13:59 -07:00
Dominik Wielgórski
cf6df492ee Created openInIDE API inside Layout Plugin
Summary: Created a communication between Layout Plugin and Flipper Desktop. The API allows users to open given file in a selected IDE. The openInIDE function returns true if the connection with Flipper is established, otherwise returns false.

Reviewed By: adityasharat

Differential Revision: D22625829

fbshipit-source-id: feaf186c107d62b1a75dfc6bbe2c1d66ffd7fd78
2020-07-21 09:27:53 -07:00
Paco Estevez Garcia
29b6be23e8 Remove unused prop
Summary:
While reading through the Inspector I found this prop passed down and not used anywhere

printer_shredder

Reviewed By: Katalune

Differential Revision: D22431895

fbshipit-source-id: 6cbc97b3faec26349a1ad900ffa455e95f53bb2b
2020-07-08 07:13:38 -07:00
Michel Weststrate
db4c341eb3 Fix regression in accessibility layout
Summary:
Fixes a regression (D21716761) in the layout of the accessibility inspector where the layout was accidentally switched from right to bottom.

Also made the region resizable while at it.

Changelog: Fix regression in the layout plugin where accessibility info was rendered in the wrong place

Reviewed By: cekkaewnumchai

Differential Revision: D21903760

fbshipit-source-id: 08623c17428e86ea77d8438e78766a308dbac1e6
2020-06-05 08:34:26 -07:00
Pritesh Nandgaonkar
c9d2acab08 Remove flipper AD bar
Summary: This diff removes the FlipperAD bar which is shown in the layout inspector. Fixes [this](https://fb.workplace.com/groups/flippersupport/permalink/881019929045333/)

Reviewed By: passy

Differential Revision: D21716761

fbshipit-source-id: 503fc0002d137032c9a40853f7eeea599d65acea
2020-05-26 04:34:29 -07:00
Michel Weststrate
cdd0026e83 fix issue where row backgrounds are not continued when scrolling horizontally
Summary:
We used flexbox to layout rows in the element inspector. The problem with that is that flexbox cannot nicely grow all its childrens to the largest one. Although we could still see contents thanks to the `overflow: visible` hack, this means that the backgrounds didn't continue when scrolling.

In contrast, tables do grow their children width :)

Also fixed an issue where the AX details tree wasn't scrollable

Reviewed By: cekkaewnumchai

Differential Revision: D21661766

fbshipit-source-id: 6b1d16c7aded8beebdd8a50f3e8ab0d9b8633e02
2020-05-21 03:36:35 -07:00
Michel Weststrate
b0ab9b9b98 Fix Height for Main Layout Inspector
Summary:
in Layout plugin, scrollbars where often not visible, for example to see the vertical scrollbar, one had to scroll to the horizontal end first.

Also introduced the `Scrollable` component to simplify this in the feature and separate the concepts of rendering something large and making it scrollable.

This diff cleans up the layout structure and fixes the problem

changelog: Fixed several minor layout issues in the Layout plugin

Reviewed By: cekkaewnumchai

Differential Revision: D21283157

fbshipit-source-id: 81849151475165796c65001616f038a9d6cbdfb2
2020-05-21 03:36:34 -07:00
João Vieira
a2d7297bbb Rename Flipper trace to Flipper export.
Summary: Rename visual references from Flipper trace to Flipper export.

Reviewed By: passy

Differential Revision: D21408566

fbshipit-source-id: 1021fec095f2f2f3e5394e7ea2f7d49fee186050
2020-05-07 04:05:27 -07:00
Pritesh Nandgaonkar
17ccdeaf6f Change the export logic for the Inspector
Summary:
This enables the feature which showed the theme information in the layout plugin. It was disabled due to the OOM which occurred while exporting flipper trace. The OOM happened when we tried to serialise the whole layout hierarchy and the amount of info added per node by the theme info was quite heavy. Thus removing it solved the OOM problem at that point, but its not the correct solution.

The problem is that each node has too much information and sending it at one stretch is very heavy and causes OOM. So instead of sending it at one stretch, I have broken it into multiple calls at each level of the tree. This no longer causes OOM and we will be able to show theme information too.

Also for iOS we don't have AXNodes call or AXRoot feature implemented, so anyway I had to put a check to not make those calls, so instead I have kept the feature of fetching all nodes on the iOS instead, as there has been no problem on the iOS side with regards to the OOM. But I am indifferent, the same logic will work for iOS too, it might increase the time to export.

issue discussed [here](https://fb.workplace.com/groups/flippersupport/permalink/854729375007722/)

Reviewed By: jknoxville

Differential Revision: D21136057

fbshipit-source-id: becd237a6d53c50af082597f2e8ed790c25cb966
2020-04-23 04:31:17 -07:00
Timur Valiev
764ba546f7 Move ToolbarIcon to main ui components folder
Summary: there are two plugins which uses copy-pasted ToolbarIcon and at least one more where it will be helpful. Let's move it to components folder

Reviewed By: nikoant

Differential Revision: D21089290

fbshipit-source-id: a14dcd56633dd24016711e34308b94023fcb40ed
2020-04-21 09:23:46 -07:00
Pascal Hartig
fc9ed65762 prettier 2
Summary:
Quick notes:

- This looks worse than it is. It adds mandatory parentheses to single argument lambdas. Lots of outrage on Twitter about it, personally I'm {emoji:1f937_200d_2642} about it.
- Space before function, e.g. `a = function ()` is now enforced. I like this because both were fine before.
- I added `eslint-config-prettier` to the config because otherwise a ton of rules conflict with eslint itself.

Close https://github.com/facebook/flipper/pull/915

Reviewed By: jknoxville

Differential Revision: D20594929

fbshipit-source-id: ca1c65376b90e009550dd6d1f4e0831d32cbff03
2020-03-24 09:38:11 -07:00
Anton Nikolaev
10d990c32c Move plugins to "sonar/desktop/plugins"
Summary:
Plugins moved from "sonar/desktop/src/plugins" to "sonar/desktop/plugins".

Fixed all the paths after moving.

New "desktop" folder structure:
- `src` - Flipper desktop app JS code executing in Electron Renderer (Chrome) process.
- `static` - Flipper desktop app JS code executing in Electron Main (Node.js) process.
- `plugins` - Flipper desktop JS plugins.
- `pkg` - Flipper packaging lib and CLI tool.
- `doctor` - Flipper diagnostics lib and CLI tool.
- `scripts` - Build scripts for Flipper desktop app.
- `headless` - Headless version of Flipper desktop app.
- `headless-tests` - Integration tests running agains Flipper headless version.

Reviewed By: mweststrate

Differential Revision: D20344186

fbshipit-source-id: d020da970b2ea1e001f9061a8782bfeb54e31ba0
2020-03-14 14:35:18 -07:00