Commit Graph

1952 Commits

Author SHA1 Message Date
Paul O'Shannessy
dfefb1ff65 Adopt Contributor Covenant
Summary:
In order to foster healthy open source communities, we're adopting the
[Contributor Covenant](https://www.contributor-covenant.org/). It has been
built by open source community members and represents a shared understanding of
what is expected from a healthy community.

Reviewed By: josephsavona, danobi, rdzhabarov

Differential Revision: D17104640

fbshipit-source-id: d210000de686c5f0d97d602b50472d5869bc6a49
2019-08-29 23:21:14 -07:00
Pascal Hartig
31ce78b128 Add stack.yaml.lock
Summary: Stack has lock files now. Let's use them.

Reviewed By: danielbuechele

Differential Revision: D17112200

fbshipit-source-id: 898fff67ac74cbad918dbe1be6667523c4392b35
2019-08-29 09:23:57 -07:00
Pascal Hartig
f4f7245732 Add README
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D17111990

fbshipit-source-id: f5a14b7f0ce544cec324b70b74eeed8d6efb42b0
2019-08-29 09:19:01 -07:00
Daniel Büchele
5868946818 certificate provider
Summary: _typescript_

Reviewed By: passy

Differential Revision: D17096517

fbshipit-source-id: a6e69e8b9a82fe76bb1de51a3a93182f35f40b3f
2019-08-28 20:34:59 -07:00
Daniel Büchele
9970c50daf gylphs
Summary: Adding type declaration for glyphs

Reviewed By: passy

Differential Revision: D17096295

fbshipit-source-id: e8994e0c81c3668fa909479dbaea613ec2b86dc4
2019-08-28 19:50:29 -07:00
Pascal Hartig
bc4fc12ea4 Add prebuilt version of stricter
Summary:
Adds a binary we can run on Sandcastle.

allow-large-files

Reviewed By: danielbuechele

Differential Revision: D17093672

fbshipit-source-id: 3695739a65aea72bc8c8268404c9d3e025349e16
2019-08-28 14:31:33 -07:00
Pascal Hartig
a612792995 Add script to watch for TSC strict mode regressions
Summary:
This is a simple script that runs `tsc --strict` twice: on the current revision and the previous one, compares the number of errors and if there are more, prints them out and raises a failure exit code.

This should help us ensure that while we clean up the 500-odd errors we don't land more in the process.

Reviewed By: danielbuechele

Differential Revision: D17093671

fbshipit-source-id: 6c5d1424c729d15d66a32ae17f15b17c3b76fc68
2019-08-28 14:31:33 -07:00
Daniel Büchele
ff31ac0b45 fix strict errors
Summary: fixing some errors for strict mode enabled files

Reviewed By: passy

Differential Revision: D16988271

fbshipit-source-id: 09834cad9c2dd8abb987e4f708ae7a30922d90c7
2019-08-28 11:12:22 -07:00
Daniel Büchele
8d653672f2 fix keyboard navigation
Summary: Keyboard events were not handled correctly. This was because the tabIndex was not set correctly. Maybe a regression from the TypeScript conversion.

Reviewed By: passy

Differential Revision: D17079157

fbshipit-source-id: 752853c0d761da67c7b09f50b531abf58bc7feec
2019-08-28 10:36:44 -07:00
dependabot[bot]
fe87fd9346 Bump eslint-utils from 1.4.0 to 1.4.2 (#526)
Summary:
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.4.0 to 1.4.2.
<details>
<summary>Commits</summary>

- [`4e1bc07`](4e1bc077c2) 1.4.2
- [`e4cb014`](e4cb01498d) 🐛 add null test
- [`230a4e2`](230a4e2275) 1.4.1
- [`08158db`](08158db1c9) 🐛 fix getStaticValue security issue
- [`587cca2`](587cca2f82) 🐛 fix getStringIfConstant to handle literals correctly
- [`c119e83`](c119e83295) 🐛 fix getStaticValue to handle bigint correctly
- See full diff in [compare view](https://github.com/mysticatea/eslint-utils/compare/v1.4.0...v1.4.2)
</details>
<br />

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=eslint-utils&package-manager=npm_and_yarn&previous-version=1.4.0&new-version=1.4.2)](https://help.github.com/articles/configuring-automated-security-fixes)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

 ---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `dependabot rebase` will rebase this PR
- `dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `dependabot merge` will merge this PR after your CI passes on it
- `dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `dependabot cancel merge` will cancel a previously requested merge and block automerging
- `dependabot reopen` will reopen this PR if it is closed
- `dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language

You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/facebook/flipper/network/alerts).

</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/526

Reviewed By: danielbuechele

Differential Revision: D17074295

Pulled By: passy

fbshipit-source-id: f416d2c5b5f300c60694a3e411f16c585fb52afb
2019-08-28 07:37:39 -07:00
Benjamin Elo
ec47c93ea0 Display class name of view if available
Summary: This commit provides the navigation plugin with more value, showing the ViewController of the rendered view.This allows the user to quickly start working on that view controller once they have the name. This works on nearly all views in the iOS app.

Reviewed By: passy

Differential Revision: D17071558

fbshipit-source-id: 22a22d4a0991e9f20bc85eb106a98a42214d4d0c
2019-08-28 05:05:34 -07:00
Benjamin Elo
a2ec178456 Added ability to navigate to deeplinks for iOS
Summary: Added ability to navigate to deeplinks from Flipper for iOS. This is done through the "xcrun simctl" command, much like how we handle screenshots on iOS.

Reviewed By: passy

Differential Revision: D17071428

fbshipit-source-id: 86cb375e750e89ddf598a42ce33d3099bb08803a
2019-08-28 05:05:33 -07:00
Pascal Hartig
9a63ee9fff Make exportMetrics strict
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D17074932

fbshipit-source-id: 1a6a8e81a9d15021dd9b51a0c3a394a2cf349e9c
2019-08-28 03:01:58 -07:00
Pascal Hartig
5c69ad8e8b Make LowPassFilter strict
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D17073163

fbshipit-source-id: 08127d85af317ff701f4d131fd41df095f50f6a4
2019-08-28 03:01:58 -07:00
Pascal Hartig
78a7789f49 Add types for promise-retry
Summary: Per title.

Reviewed By: danielbuechele

Differential Revision: D17073128

fbshipit-source-id: 0c93a63f0419dcbef209f0ae203906457481529f
2019-08-28 03:01:57 -07:00
Pascal Hartig
b6df5ecb83 Make onRegisterDevice strict
Summary: Needed relaxing some types in pluginUtils, but it's actually fine.

Reviewed By: danielbuechele

Differential Revision: D17072974

fbshipit-source-id: c3d3923ed70f71964aa10cf35f1b9ea2f30a8fa1
2019-08-28 03:01:57 -07:00
Pascal Hartig
5cac2edc37 Make processConfig pass strict mode
Summary: _typescript_

Reviewed By: danielbuechele

Differential Revision: D17072572

fbshipit-source-id: fed0d93e7a4cfe04f339370dbace7181bec73ca1
2019-08-28 03:01:57 -07:00
Pascal Hartig
f548844df5 Extend travis_wait time (#528)
Summary:
Sigh ... https://travis-ci.com/facebook/flipper/jobs/228611726
Pull Request resolved: https://github.com/facebook/flipper/pull/528

Reviewed By: danielbuechele

Differential Revision: D17075766

Pulled By: passy

fbshipit-source-id: c26ac08e25c9a537d2a62ac02da74d0ae1094b42
2019-08-28 02:18:22 -07:00
Pascal Hartig
268aee897c Remove Litho references
Summary: There were some leftover Litho references.

Reviewed By: danielbuechele

Differential Revision: D17071513

fbshipit-source-id: feec9a5748c359a830746c2f9944e0256b16bc09
2019-08-27 08:49:51 -07:00
Brian Vaughn
85d098e695 React DevTools v4 integration
Summary:
This Diff is being posted for discussion purposes. It will not be ready to land until React DevTools v4 has been published to NPM.

Update React Native to be compatible with the [new version 4 React DevTools extension](https://github.com/bvaughn/react-devtools-experimental).

**Note that this is a breaking change**, as the version 3 and version 4 backends are **not compatible**. Once this update ships (in React Native) users will be required to update their version of the [`react-devtools` NPM package](https://www.npmjs.com/package/react-devtools). The same will be true for IDEs like Nuclide as well as other developer tools like Flipper and [React Native Debugger](https://github.com/jhen0409/react-native-debugger).

Related changes also included in this diff are:
* Pass an explicit whitelist of style props for the React Native style editor (to improve developer experience when adding new styles).
* Update `YellowBox` console patching to coordinate with DevTools own console patching.
  * Also improved formatting slightly by not calling `stringifySafe` for strings (since this adds visible quotation marks).

Regarding the console patching- component stacks will be appended by default when there's no DevTools frontend open. The frontend will provide an option to turn this behavior off though:

{F168852162}

React DevTools will detect if the new version is used with an older version of React Native, and offer inline upgrade instructions:

{F169306863}

**Note that the change to the `RCTEnableTurboModule` will not be included in this Diff**. I've just turned those off temporarily so I can use v8+Chrome for debugging.

Reviewed By: rickhanlonii

Differential Revision: D15973709

fbshipit-source-id: bb9d83fc829af4693e7a10a622acc95a411a48e4
2019-08-26 23:56:55 -07:00
Ron Edelstein
0f503f40ac Apply java formatting
Reviewed By: zertosh

Differential Revision: D17006136

fbshipit-source-id: 356442170cee830f4794bff456a6d2162f45d6b3
2019-08-24 20:33:38 -07:00
Daniel Büchele
378638a451 website updates for TS
Summary: update website to use TS instead of JS

Reviewed By: passy

Differential Revision: D16986666

fbshipit-source-id: 969de3ffcdf4aa594d9811947e5b440e594838e7
2019-08-24 03:28:28 -07:00
Daniel Büchele
f69bfab0f4 npm
Summary:
Publishing flipper to npm via Sandcastle.
- NPM token added to secrets tool
- removing private flag from package JSON
- adding publish script

Reviewed By: passy

Differential Revision: D16984934

fbshipit-source-id: 334991381d4035928af9a9d98d3905280938736a
2019-08-23 09:33:56 -07:00
Daniel Büchele
853d80f182 headless
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16962733

fbshipit-source-id: 6583c5a4471b12f91895f6449ed9c510265a63e2
2019-08-23 09:33:56 -07:00
Daniel Büchele
7ed9e8e670 migrate workflow to TS
Summary: Updates scarf workflow to generate TypeScript plugins

Reviewed By: passy

Differential Revision: D16940711

fbshipit-source-id: 5005013512bad969833669c6b0b911d55ea5cd79
2019-08-23 09:33:56 -07:00
Alexander Blom
acf7eb1080 Initialize instance to nullptr
Summary:
In tests, the instance is never initialized and it's hard to guard against null when the
instance isn't initialized to nullptr (instead being random data).

Reviewed By: ximyu

Differential Revision: D16984717

fbshipit-source-id: 414539e1117abaad16df9f9b7d3b8dbb328e38d0
2019-08-23 08:15:06 -07:00
Daniel Büchele
651c9db5c4 seamammals plugin
Summary: _typescript_

Reviewed By: passy

Differential Revision: D16936889

fbshipit-source-id: 68ec6a14e1ee4517d76816b4156f0eebaca27ab4
2019-08-23 07:19:12 -07:00
Pascal Hartig
f824329151 Upgrade to Node 11 in Travis (#525)
Summary:
I hope this fixes the obnoxious libuv IO error we see quite often.
Pull Request resolved: https://github.com/facebook/flipper/pull/525

Test Plan: Travis

Reviewed By: priteshrnandgaonkar

Differential Revision: D16984266

Pulled By: passy

fbshipit-source-id: 3e4c6ccd1f3e92a08875f7770202d8909e446ac8
2019-08-23 05:58:18 -07:00
Prathamesh Deshmukh
eb875845b5 Add missing imports in getting-started.md (#514)
Summary:
Added some missing imports in the Android getting started documentation.

By adding these imports, the compilation will not fail.
## Changelog

Updated the getting-started documentation for android
Pull Request resolved: https://github.com/facebook/flipper/pull/514

Test Plan: Add the imports and the build should run successfully

Reviewed By: passy

Differential Revision: D16919073

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 30144f440d312effec289b60af6ca537df344cd2
2019-08-23 04:47:36 -07:00
Chaiwat Ekkaewnumchai
f9fa80d93b Expand/Collapse Plugin Sidebar v1
Summary:
* Change the way to determine recently used plugins
* Show all plugins if there are just a few hidden plugins
  * Not all of plugins in client list can be showed, so checking happens when rendering
* Add action to clear the history internally (for testing) (not sure if needed)

Reviewed By: danielbuechele

Differential Revision: D16965302

fbshipit-source-id: 6efeedac8c0fad7e89a96e7fc5ba9101d3516fe7
2019-08-23 04:42:06 -07:00
Aditya Kumar
620383bae3 Add virtual destructor to class with virtual functions but non-virtual destructor
Reviewed By: jdthomas

Differential Revision: D16954508

fbshipit-source-id: 958118843687145c1147ac5beeb2857b21332702
2019-08-22 11:41:26 -07:00
Daniel Büchele
0ec48d4fc9 index
Summary:
This converts the index file to TypeScript which is used as an export for all plugins. Alongside, I had to fix a couple of errors in various files to make sure everything works correctly.

For plugins using flow, we define an interface which uses the type definition for FlipperPlugin and types all UI components as `any`.

Reviewed By: passy

Differential Revision: D16936890

fbshipit-source-id: dacd9a63a82b9f0bbb530b06072186874cba7b6f
2019-08-22 10:02:27 -07:00
Benjamin Elo
d962bbbfb9 Added screenshots to the navigation plugin
Summary:
Here I've attempted to add screenshots to the nav plugin. This isn't the most elegant solution, but it might have to do due to limitations on the event handler for navigation being fired when the navigation occurs, and not when all remote content on the view has loaded. With this in mind, I added a 1 second delay for the screenshot. This has its own issues such as navigating within a second away from the page will display the wrong view.

If anyone has some suggestions I am open.

Another issue faced here was that incoming nav events are now impure as I need to go take a screenshot on each nav event. Therefore, I have removed the the tests which no longer work for the NavPlugin.

Reviewed By: danielbuechele

Differential Revision: D16915859

fbshipit-source-id: 95db0d1ded2084441d49e1f2e4712c55acf9f1b8
2019-08-22 05:28:34 -07:00
Benjamin Elo
7def9bb681 Moved screenshot functions into Device's class.
Summary:
I have moved the screenshot functions from ScreenCaptureButtons to the Device classes. I have slightly rewritten them so that they return a Promise which resolves to a Buffer. The Buffer can then be saved to a file or converted to a data Blob.

I have removed streaming and simply loaded the image into memory. Once the image is in memory it can be manipulated for various tasks i.e. written to a file, or displayed in the app.

iOS screenshots had to be rewritten. I now save the image to a temp folder, load it into the apps memory, and then remove the temp image.

Reviewed By: jknoxville

Differential Revision: D16939901

fbshipit-source-id: 3e39a5aeda8d48829ac5a8ff912a98f110341c07
2019-08-22 05:28:33 -07:00
Pascal Hartig
263b47f82f Add x-platform update indicator
Summary: Use the new multi-platform update endpoint to indicate when new updates are available for Linux or Windows.

Reviewed By: danielbuechele

Differential Revision: D16939899

fbshipit-source-id: 11c1dc0d4fd19362a1163c613a7b7116c5edf996
2019-08-22 02:32:56 -07:00
Anatolii Shevchenko
e874e032c6 Remove ; from method implementation definition
Summary: Removing excessive semicolon ";" symbol from method implementation definition.

Reviewed By: adamjernst

Differential Revision: D16912006

fbshipit-source-id: 9c3e778a107e8fd0055f40a95ea9ca58d461e1c5
2019-08-21 15:49:04 -07:00
Chaiwat Ekkaewnumchai
ea7578aa16 Expand/Collapse Sidebar V0
Summary:
- Show all or show 5 LRU plugins
- Update when close/reopen app, collapse sidebar, or expand sidebar

Reviewed By: danielbuechele

Differential Revision: D16917950

fbshipit-source-id: 1e7edc86945162ea14e1cdaa89aa47d3defa4c7d
2019-08-21 08:50:34 -07:00
Chaiwat Ekkaewnumchai
007a29805a Setting up Persist Storage for LRU Plugins
Summary:
- Change policy to show plugins to LRU (least recently used)
- Add persist storage to store LRU plugins

Reviewed By: danielbuechele

Differential Revision: D16917951

fbshipit-source-id: 8ea7b2f15e06db51209953818f465a05e24c38c4
2019-08-21 08:50:34 -07:00
Chaiwat Ekkaewnumchai
afd7634fd6 Add Button to Expand or Collapse Left Panel
Summary:
- Add `show more` and `show less` button to expand and collapse
- The element to show depends on its usage rank from Flipper dashboard (manually copied)

Reviewed By: danielbuechele

Differential Revision: D16917952

fbshipit-source-id: fc37d5c640be33794694e302341fa08849b8f97f
2019-08-21 08:50:33 -07:00
Pascal Hartig
d1b17d3ecd Update jssetup for TypeScript
Reviewed By: jknoxville

Differential Revision: D16918664

fbshipit-source-id: 934ad08d60d882b013a3f1d9201d330a6c117bb1
2019-08-21 04:55:33 -07:00
Benjamin Elo
076087f0b2 Fix for button popup menus not rendering
Summary: The electron menu popup requires that the position be an integer. Somehow the y-position of the button in the title bar has been moved by half a pixel. Calling Math.floor on the returned values fixes this.

Reviewed By: passy

Differential Revision: D16936833

fbshipit-source-id: 6abb9add4288f1d64c051ba3e45519340ccbb56e
2019-08-21 04:13:01 -07:00
Sara Valderrama
8699d62b47 fix isTalkbackFocusable evaluation utils for flipper plugins
Summary: utils used by redblock and layout plugins were incorrectly checking node instead of childNode for listviews that have non-visible children

Reviewed By: nscoding

Differential Revision: D16897804

fbshipit-source-id: 8f62956c57568694db76030377552e43ce3a9216
2019-08-20 10:40:38 -07:00
John Knox
f1d0ca7edf Fix layout snapshot test
Summary:
The test didn't run when the sample app was updated with an extra button, so that change snuck in and caused subsequent runs to fail.

The stacked diff makes sure it will run all the time.

Reviewed By: passy

Differential Revision: D16898015

fbshipit-source-id: 0fd9ce7eaef293465d87b283b3c9bfe1fba928e5
2019-08-20 09:14:39 -07:00
James Harmon
20a96da071 Fixes for shared preferences viewer plugin (#521)
Summary:
Resolve issues for SharedPreferences Viewer

## Changelog

Fix issue https://github.com/facebook/flipper/issues/469 - Changed values for Booleans not displaying
Fix issue https://github.com/facebook/flipper/issues/499 - SharedPreference files names not sorted
Pull Request resolved: https://github.com/facebook/flipper/pull/521

Reviewed By: passy

Differential Revision: D16914831

Pulled By: jknoxville

fbshipit-source-id: de07e4f7dec85ac5a2c9bc7cab48f549313f38fd
2019-08-20 09:05:57 -07:00
Pritesh Nandgaonkar
d850f1ff43 Update the bump version script
Summary: Updates the bump_version script to update the flipperkit version in Tutorial's Podfile.

Reviewed By: passy

Differential Revision: D16916433

fbshipit-source-id: dd5cf24fbbe4e9ca322178632613caebe178cc17
2019-08-20 08:41:30 -07:00
Pritesh Nandgaonkar
6056e85f5d Update installation instruction for CP 1.7+ (#522)
Summary:
This PR updates the installation instruction for Cocoapods 1.7+ as the previous installation instruction was broken for the latest Cocoapods version

Solves https://github.com/facebook/flipper/issues/478 and https://github.com/facebook/flipper/issues/495

## Changelog

- Updated the Documentation
- Updated the sample app
Pull Request resolved: https://github.com/facebook/flipper/pull/522

Test Plan:
- Travis CI
- Also tested locally by building sample app.

Reviewed By: jknoxville

Differential Revision: D16902023

Pulled By: priteshrnandgaonkar

fbshipit-source-id: 19cc01c842f93ab3565c302f8258ca88dbdecfb2
2019-08-20 07:02:18 -07:00
Pritesh Nandgaonkar
a2a288182d Migrate elementes-inspector files from js to tsx
Summary: As per title

Reviewed By: danielbuechele

Differential Revision: D16772834

fbshipit-source-id: 4290c139ce66731b68433d54eda0d0e0207e9912
2019-08-20 06:26:53 -07:00
Pritesh Nandgaonkar
7f7e96b99f Move utils in data-inspector from js to tsx
Summary: As per title

Reviewed By: danielbuechele

Differential Revision: D16772870

fbshipit-source-id: ac980accc22fc0cda011629cd5f56dca4021fc83
2019-08-20 06:26:52 -07:00
Pritesh Nandgaonkar
0c87a82804 Migrate DataDescription from js to tsx
Summary: As per title

Reviewed By: danielbuechele

Differential Revision: D16770503

fbshipit-source-id: f8e4fddeb84aefef469a97f65dd65f951dd55e22
2019-08-20 06:26:52 -07:00
Pritesh Nandgaonkar
d84900aa8c Migrate DataPreview to tsx
Summary: As per title

Reviewed By: danielbuechele

Differential Revision: D16764969

fbshipit-source-id: 8b8d7f7c92ee99dbbb8b7277e1f38f90da927003
2019-08-20 06:26:52 -07:00