Summary:
Enabled linting rules that help to signal making errors with effect dependencies and such.
Fixed all errors, left any warnings generated by the hooks untouched
Reviewed By: nikoant
Differential Revision: D21721497
fbshipit-source-id: 9548453443fa7b663dc4d4289132f388c6697283
Summary:
This refactor has the following changes:
- Change way to store data: raw data instead of rendered data
- Move render function to separated function component file
- Remove repetitive pattern
Reviewed By: jknoxville
Differential Revision: D21739468
fbshipit-source-id: 1f7e7ae902c3b55f3863300aaed26c2adda898ac
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
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
Summary:
As suggested in the previous diff, I change the way to store row values. Now, (kinda) raw values are stored instead of processed values that can be used directly for `ManagedTable`. This simplifies logic in detail sidebar.
I'm not sure what the effect to performance.
Reviewed By: mweststrate
Differential Revision: D21621896
fbshipit-source-id: 472be3caa955ca32f876f81095af21e9c17cb159
Summary:
This allows long text to be seen on the sidebar in database plugin. Also, remove weird padding in the sidebar and separate sidebar component to a new file
Refactoring is in the next diff
Reviewed By: mweststrate
Differential Revision: D21550672
fbshipit-source-id: 3e80be16783719e18392fe3d8f8068caf9283f8f
Summary:
To comply with recent agreement, coverage test for MultipleSelectorSection is added.
Also, add undefined check in `elements.tsx` found while adding the test
Reviewed By: mweststrate
Differential Revision: D21554782
fbshipit-source-id: 7cd868bf16f6105d6f523048f29bdaa052837f45
Summary: This diff updates the typescript version and it fixes `yarn lint:tsc`. It also successfully pointed out fes of the problems in our codebase. I have fixed those problems
Reviewed By: mweststrate
Differential Revision: D21548003
fbshipit-source-id: e69c986ee3c763588d9e1e290dad08d1cf1976a8
Summary:
As mentioned in [the first comment in the Github issue](https://github.com/facebook/flipper/issues/989#issuecomment-616673590), we were mixing database `id` given from client and `index + 1` on server side. After investigating, most are used correctly; it searches `id` from given database `name`. However, there are a few (if not one) that, in my opinion, was used incorrectly. For example, [`tableOption`](https://fburl.com/diffusion/vlo7xbo1) assumed `id - 1` is the index, which is sometime incorrect.
This diff sorts the database listed from client by `id` before storing in the state.
Changelog: Fixed wrong order assumption on server side
Reviewed By: jknoxville
Differential Revision: D21496345
fbshipit-source-id: 5e15f776356b0357ac14fbde6c2a11efd76cd1e1
Summary:
- Add detail sidebar to data tab. This reuses `renderSidebar` from SQL tab
- `renderTable` function is moved into the component to easier access `renderSidebar`
Reviewed By: mweststrate
Differential Revision: D21406942
fbshipit-source-id: 5c79489a80931b1133c0a28ca5897a27ba9dd6b8
Summary: It doesn't currently work on them, so removing to avoid confusion.
Reviewed By: priteshrnandgaonkar
Differential Revision: D21448681
fbshipit-source-id: 6ef46f8551921c1c5bdba17fd65f762292f1dd0e
Summary:
per title
Changelog: Add multiple selector to layout inspector to allow user to select components at a position
Reviewed By: mweststrate
Differential Revision: D21214898
fbshipit-source-id: 7b52d9d3c93e7ec0d28124a3a675ccfdd014c54d
Summary:
This diff adds multiple selector UI on layout plugin, which shows up when there are more than one component at a touch.
This UI allows user to do similar thing to element inspector. Expanding functionality on main component will be added in next diffs.
Reviewed By: mweststrate
Differential Revision: D21214899
fbshipit-source-id: 5c9cae93122cc4f7c326ccd0878d2b9dddebf62b
Summary:
- add type to represent the returned component tree
```
expected data:
{
[nodeID1]: [subtree1],
[nodeID2]: [subtree2],
...
}
example:
{
id1: {
id2: {
id3: {
id4: {},
id5: {
id6: {}
}
}
}
}
}
```
- add functions to deal with a tree
- `_getElementLeaves` for finding ids that don't have any child given the tree structure
- `_getPathForNode` for finding path (similar to previous path parameter) for given id
- This diff still retain functionality in case of selector appear to touch only one element.
Reviewed By: mweststrate
Differential Revision: D21040427
fbshipit-source-id: e6704535a437ad47d9664cc16896b9f24c9d6736
Summary:
Mainly convert `js` to `tsx`
Additional change:
- Try not to directly change object value in reduce function
- Add emotion styled when there is error using style prop directly
Reviewed By: nikoant
Differential Revision: D21406943
fbshipit-source-id: 30312fa0b0d2d70fa52c5ff9db747e1a83beb270
Summary: Element also contains `id`, which is equivalent to ElementID used in the existing extension. This change will help the implementation of layout intern search easier.
Reviewed By: mweststrate
Differential Revision: D21385001
fbshipit-source-id: b8c6e6f052af8cfa54bf3a132571e40567cdee4b
Summary: There was an error on "lint" command, because json schemas was not published as a part of npm package
Reviewed By: jknoxville
Differential Revision: D21328254
fbshipit-source-id: 531d5892ccfea0c68a6369d44af43c840c3fe4ca
Summary: Fixed bumping of local peer dependencies and manually bumped the version which was not bumped automatically during the latest release.
Reviewed By: passy
Differential Revision: D21308701
fbshipit-source-id: 936a04b432ad3c9313644c1bf96966c52e022d7e
Summary:
Searched for broken link patterns inside the app itself. I think I found them all but it's not certain.
Patterns searched for and replaced:
```
.html
getting-started/)
getting-started)
getting-started"
```
and also searched the repo for regex `\]\(.*)` and checked them by eye.
Reviewed By: passy
Differential Revision: D21306944
fbshipit-source-id: a2e09b0fd8677f5f26e5cc4a06805b474247f7e6
Summary:
Implemented json schema for flipper plugin package.json and used it for validation in "flipper-pkg lint" command.
Nice thing about json schema is that it not only allows to validate json, but also can be referenced using "$schema" property in json so IDEs like VSCode can find it and use for code completion, validation and to show properties documentation. I'm going to deploy the schema as a part of documentation website so it can be referenced as https://fbflipper.com/schemas/plugin-package/v2.json.
Also the "$schema" field can be used instead of "specVersion" to determine the specification according to which the plugin is defined. E.g., if specification version 3 would be created, it will be described in schema https://fbflipper.com/schemas/plugin-package/v3.json, etc.
Reviewed By: passy
Differential Revision: D21228294
fbshipit-source-id: f21351e584ef936a7d6b314436448489691f83a6
Summary:
The versions in the plugin are fixed to a particular version, so we ignore them in greenkeeper to avoid spam.
***
{emoji:261d} **Important announcement:** Greenkeeper will be saying goodbye {emoji:1f44b} and passing the torch to Snyk on June 3rd, 2020! [Find out how to migrate to Snyk and more at greenkeeper.io](https://greenkeeper.io)
***
## The devDependency [types/recharts](https://github.com/DefinitelyTyped/DefinitelyTyped) was updated from `1.8.8` to `1.8.10`.
This version is **not covered** by your **current version range**.
If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.
---
**Publisher:** [types](https://www.npmjs.com/~types)
**License:** MIT
[Find out more about this release](https://github.com/DefinitelyTyped/DefinitelyTyped).
---
<details>
<summary>FAQ and help</summary>
There is a collection of [frequently asked questions](https://greenkeeper.io/faq.html). If those don’t help, you can always [ask the humans behind Greenkeeper](https://github.com/greenkeeperio/greenkeeper/issues/new).
</details>
---
Your [Greenkeeper](https://greenkeeper.io) bot 🌴
Pull Request resolved: https://github.com/facebook/flipper/pull/1046
Reviewed By: mweststrate
Differential Revision: D21226349
Pulled By: passy
fbshipit-source-id: 01dd268cb461a69d19053ca45818b6ac6277b906
Summary: Flipper should never be a normal dependency of a flipper plugin. And since this an example, lets do it properly :)
Reviewed By: jknoxville, passy
Differential Revision: D21228427
fbshipit-source-id: 72166c8706a213e2cb649f1201984dd722b63d2f
Summary: Added eslint rule "no-extraneous-imports" which disallow using modules which are not listed as dependencies in the corresponding package.json. Fixed a bunch of reported errors after the rule applied.
Reviewed By: passy
Differential Revision: D21186848
fbshipit-source-id: 0af9ac4b3fffdfd0ab7c23ae4ff12a3f5989d5e9
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
Summary: Returning arrays from render kills react-reconciliation and produces missing key warnings. Turned all array rendering methods to use Fragments, where I could find them.
Reviewed By: jknoxville
Differential Revision: D21178253
fbshipit-source-id: 85ddf8adfa79732ccbe68409fdcf150399455983
Summary:
- Library name can contain whitespace and dots.
- Not using fixed number of whitespace characters.
Reviewed By: fabiomassimo
Differential Revision: D21185820
fbshipit-source-id: 429656dc03b6450ef61383ed91b5aee132802ca8
Summary:
Added the ability to search tree generations for a particular component. As soon as you start typing in the search bar, only relevant timeline tracks would be displayed.
Currently, I'm looking for the search string in `component_class_name` of the payload and among all nodes in the tree.
Reviewed By: fabiomassimo
Differential Revision: D21175734
fbshipit-source-id: 642c628350192697980becd20352d303200a031e
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
Summary:
Added "id" field to Flipper plugin manifest which is used to match native and desktop plugin parts. Before that, "name" field was used both as npm package name and as plugin id.
The problem is that currently there are a lot of plugins which has invalid values in "name", e.g. not starting with "flipper-package-", or containing upper cased letters.
Simple renaming of "name" field can be very problematic, so we need a new field to avoid any breaking changes and keep historical analytics data which is also bound to plugin id.
Reviewed By: mweststrate
Differential Revision: D21129689
fbshipit-source-id: efd143c82a6a802cc0b5438fd3f509bd99aded0e
Summary:
Added versioning for plugin format.
The first version is where "main" points to source code entry and plugins are bundled by Flipper in run-time on loading them.
The second version is where "main" points to the already existing bundle and Flipper just loads it without bundling. The plugins of version 2 must be bundled using "flipper-pkg" tool before publishing.
Changelog: Support new packaging format for plugins.
Reviewed By: mweststrate
Differential Revision: D21074173
fbshipit-source-id: 7b70250e48e5bd5d359c96149fb5b14e67783c4d
Summary:
This change makes it possible to remove preferences. I also added a `Delete` context menu option to `DataInspector` because I needed it to implement this feature. passy confirmed that it makes sense to add this because delete is a common action.
Fixes https://github.com/facebook/flipper/issues/451
Pull Request resolved: https://github.com/facebook/flipper/pull/1018
Reviewed By: jknoxville
Differential Revision: D21086308
Pulled By: passy
fbshipit-source-id: 551ff0908d5e6c93f58d6012b42e1ee3531de997
Summary:
Treat only packages with "flipper-plugin" keyword as Flipper plugins. This will allow to place lib packages re-used by different plugins into "plugins" folder.
Changelog: Internals: it is now possible to add modules for re-use by different plugins into `desktop/plugins` folder.
Reviewed By: mweststrate
Differential Revision: D20898133
fbshipit-source-id: 8934870350ce42af3dc8060d1494025519ed307e