Summary:
Using this diff as baseline for fblite composer.
Demo in this post https://fb.workplace.com/groups/503571760094149/permalink/934762916975029/
## Next
* UI
* Add binary buffer (clone/re-send)
* Support multiple messages as flow
* Persistance
* More feedbacks from post
{F238376954}
Reviewed By: timur-valiev
Differential Revision: D21701994
fbshipit-source-id: 020733034968acb5c02a1f79bfc256a1a13d6ef8
Summary:
This strips another 8MB from our node_modules.
Checked out the largest individual files in with Disk Inventory X.
{F238464588}
Reviewed By: nikoant
Differential Revision: D21765847
fbshipit-source-id: d74b0eae270b86f0518d7e73288fd773b24535da
Summary:
I've outlined the tasks required to get iOS device support working for open source users [here](https://github.com/facebook/flipper/issues/262).
This is the first step. It publishes the same code we use internally to GitHub, but in a state where it is only "available" for non-public builds. This will not change any behavior, but means that together with the community, we can start adapting it to suit everyone, and then eventually flip "available" to true for everyone.
Reviewed By: passy
Differential Revision: D21740193
fbshipit-source-id: 586c79ad850f67da330c10a007605ff25a187544
Summary:
Update the UX of the mobilebuild download. When one clicks download one can see the the installation in progress in the main screen. Once its downloaded, you can open the finder pointed to the folder of download.
I didn't write the test for InstallSection as I was not able to test it through react-testing library. Seems like the data gets added to the document little late and not instantly.
Next work:
- Search in sidebar
- Persist downloaded app data for a session
- Show download data in the form of progress bar.
Reviewed By: mweststrate
Differential Revision: D21709229
fbshipit-source-id: e67db68ff16155230becf86c913dc6b1ec9d482c
Summary: This diff enables the babel transformer for emotion. It is supposed to be a bit faster, but the most interesting thing is that it will show component names inside the dom tree, which, at least for me, will be a huge performance booster is it will make it much easier to find out to which component style changes need to be applied
Reviewed By: nikoant
Differential Revision: D21722021
fbshipit-source-id: cab1278046b1aa7f8b875c016d43dfafdbaa0a2d
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:
Pull Request resolved: https://github.com/facebook/flipper/pull/1198
Normalize paths so snapshots look the same on mac and win
Reviewed By: passy
Differential Revision: D21722773
fbshipit-source-id: 4a12117d3ec0fb57cdfc7c5bb06a5c0835412a5f
Summary: To make testing easier, I've implemented dry-run for version bumping and npm publishing scripts
Reviewed By: mweststrate
Differential Revision: D21721142
fbshipit-source-id: 72fc5a78bfc102a8fca9087decfbed6ebbda5e51
Summary: Previously, rows got highlighted after switching between data for `ManagedTable` even though `highlightableRows` was set to false. This diff forces the highlighting not to happen when the value is set to false
Reviewed By: mweststrate
Differential Revision: D21720266
fbshipit-source-id: 534944fe03ad1561bc2109468ae6c4c5f3fc947d
Summary:
While profiling the high CPU load of the Analytics plugin, I noticed that most of the time is spend in rendering React. This makes sense as the component sends data very frequently, although it is definitely less efficient than it could be.
As shown in the following profile picture, it is clear that all the cpu churns up due to the amounts of re-renderings caused (every new incoming messages causes the plugin to analyse and process all it's data).
With background plugins, we already made sure that non-active plugins don't eat up all the CPU in React components if they process data inefficiently. Before:
{F238020503}
This change debounces how often we give new state to plugins, so that multiple updates get collapsed if the load becomes to high. After (note that not every 'emit' causes in an expensive render anymore, but that the rendering is now in a separate stack, the only remaining renderer is the debouncer component). After:
{F238020481}
Render stack happens now after a bunch of emits:
{F238021694}
This drops ~130% cpu to 70% cpu in the case of the analytics plugin, see below
Reviewed By: passy
Differential Revision: D21690494
fbshipit-source-id: 299c49c95f20af01e6ee3110b0c39478b3135c43
Summary: Trying to add tooltip to some components to promote tooltip itself and make it clearer what they do
Reviewed By: mweststrate
Differential Revision: D21649207
fbshipit-source-id: 4763ae9a99d687e6624c07bb636c5f4e869cafc9
Summary: Change some offset to make it point more direct to an element
Reviewed By: mweststrate
Differential Revision: D21649206
fbshipit-source-id: 64b4a3851e713baa6095d819a16cd207bebdf46f
Summary: Fixed a layout issue in the list items of GraphQL, background style / line didn't tend to continue when scrolling, because flexbox doesn't grow all lines similarly. Tables do.
Reviewed By: jonathoma
Differential Revision: D21662000
fbshipit-source-id: 767d2d7ffd7e5dacf2c49aa67babbb47a331282c
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:
This diff updates the sidebar to show the recommended and all build types.
Also there is error handling in place along with tests. Right now the download happens by opening browser and the build gets downloaded in the download folder. But later in the diffs I will improve this flow to do that in the Flipper with a UX showing status updates.
Reviewed By: mweststrate
Differential Revision: D21556383
fbshipit-source-id: 6de9a00fe416c22cae7bacf91828a2221644eac7
Summary: FileSelector was added in D19743998, but it was not exported to be used by other. This diff exports it so that developers can use.
Reviewed By: mweststrate
Differential Revision: D21653870
fbshipit-source-id: 062247fa7a14c7ddf87c927205880a695598928d
Summary:
Bumps [jest-fetch-mock](https://github.com/jefflau/jest-fetch-mock) from 3.0.0 to 3.0.3.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/jefflau/jest-fetch-mock/commits">compare view</a></li>
</ul>
</details>
<br />
[](https://dependabot.com/compatibility-score/?dependency-name=jest-fetch-mock&package-manager=npm_and_yarn&previous-version=3.0.0&new-version=3.0.3)
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)
---
**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.
You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).
<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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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 badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1173
Reviewed By: mweststrate
Differential Revision: D21625501
Pulled By: cekkaewnumchai
fbshipit-source-id: ded86d46fca24265d09b6f7ec8b77f9cb845a825
Summary:
Bumps [chalk](https://github.com/chalk/chalk) from 3.0.0 to 4.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/chalk/chalk/releases">chalk's releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h3>Breaking</h3>
<ul>
<li>Require Node.js 10 61999a4</li>
<li>Change the <code>Level</code> TypeScript type to be a union instead of enum f0f4638</li>
</ul>
<pre lang="diff"><code>-if (chalk.level > Level.None) {}
+if (chalk.level > 0) {}
</code></pre>
<h3>Improvements</h3>
<ul>
<li>Use <code>Object.setPrototypeOf</code> as <code>__proto__</code> could potentially be disabled (<a href="https://github-redirect.dependabot.com/chalk/chalk/issues/387">https://github.com/facebook/flipper/issues/387</a>) 63469d3</li>
</ul>
<p><a href="https://github.com/chalk/chalk/compare/v3.0.0...v4.0.0">https://github.com/chalk/chalk/compare/v3.0.0...v4.0.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="31fa942080"><code>31fa942</code></a> 4.0.0</li>
<li><a href="61999a4e77"><code>61999a4</code></a> Require Node.js 10</li>
<li><a href="f0f4638a92"><code>f0f4638</code></a> Change the TypeScript <code>Level</code> type to be a union instead of enum</li>
<li><a href="7f21f209da"><code>7f21f20</code></a> Properly check if <code>level</code> is an integer (<a href="https://github-redirect.dependabot.com/chalk/chalk/issues/393">https://github.com/facebook/flipper/issues/393</a>)</li>
<li><a href="63469d30e4"><code>63469d3</code></a> Use <code>Object.setPrototypeOf</code> as <code>__proto__</code> could potentially be disabled (<a href="https://github-redirect.dependabot.com/chalk/chalk/issues/387">https://github.com/facebook/flipper/issues/387</a>)</li>
<li><a href="797461ee32"><code>797461e</code></a> Meta tweaks</li>
<li><a href="0e6fecc7f7"><code>0e6fecc</code></a> Add link to replit run (<a href="https://github-redirect.dependabot.com/chalk/chalk/issues/379">https://github.com/facebook/flipper/issues/379</a>)</li>
<li>See full diff in <a href="https://github.com/chalk/chalk/compare/v3.0.0...v4.0.0">compare view</a></li>
</ul>
</details>
<br />
[](https://dependabot.com/compatibility-score/?dependency-name=chalk&package-manager=npm_and_yarn&previous-version=3.0.0&new-version=4.0.0)
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)
---
**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.
You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).
<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 close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor 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 badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme
Additionally, you can set the following in the `.dependabot/config.yml` file in this repo:
- Update frequency
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/1176
Reviewed By: mweststrate
Differential Revision: D21625536
Pulled By: cekkaewnumchai
fbshipit-source-id: 88a174f4db562b397ad9d70b73909e5eb70cfce5
Summary:
Fixed the layout usage in QPL, the `horizontal` was correct, but the elements where swapped (the table was supposed to take all remaining size, and sidebar it's needed space, rather than the reverse).
Made this more explicit in the Layout component, by splitting it up in `Layout.(Top|Left|Right|Bottom)`, so that one has to make an explicit choice here, making it less error prone.
Reviewed By: passy
Differential Revision: D21572438
fbshipit-source-id: 29aa3462a3c96d048825be3157730e26182cb2fa
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: Freshly init-ed plugins are not picked up by Flipper if they are not on the search path. This diff checks if the current dir is on the search path, and, if not, suggests to add it.
Reviewed By: jknoxville
Differential Revision: D21619632
fbshipit-source-id: b1dbe2695dbee9ce537999dc83e36f969ba4b747
Summary:
Created a test that snapshots the generated files, so that we can capture accidental regressions when generating files.
Also made the package id to package name a bit more robust
Reviewed By: jknoxville
Differential Revision: D21619633
fbshipit-source-id: 88ffb127e050d840df9ccd4b15ba29a71f341975
Summary:
Although there are tools that do this for you (create-react-app, react-native), and other that assume you are already in the created directory before you invoke the command (typescript, git), creating the directory by the tool has a few benefits:
1. less risk of making an accidental mess when people assume they don't need to create the dir first (I definitely ended up with a node_modules in the wrong directory)
1. it provide a naive way of detecting plugin name conflicts early (at least for plugins you create yourself)
1. in the next diff I'll add a pkg suggestion to add the current directory to the search path for flipper plugins. In the current setup, that would require needing to suggest to add the parent directory, which somehow feels less logical
2. makes sure that the directory name follows npm conventions: the package.json name should match the current directory name (not super important, but e.g VSCode will show warnings otherwise)
Reviewed By: jknoxville
Differential Revision: D21619631
fbshipit-source-id: 6d027ad18f14659e0347a66cacf056eacbc65680
Summary:
Added a watch mode to the bundle command of flipper plugins. This makes it easy to test develop plugins locally, even when you are using a production build of flipper, which lowers the barrier of developing / fixing plugins.
opted for `fs.watch` over watchman to avoid some overengineering:
1. pkg / pkg-lib don't have the watchman utilities that would be needed for this. I wasn't sure if I could move those over from `static` without breaking the bootstrapping process
2. watchman is often a nuisance on non FB machines that aren't set up for it. fs.watch in contrast doesn't have any further dependencies or setup requirements, and is much more likely to work ootb.
3. since we watch only the `src` folder we don't really need the watchman optimizations. (so for a package.json change people would have to restart, but I don't think that is much of a problem).
Reviewed By: jknoxville
Differential Revision: D21523814
fbshipit-source-id: b1de72b7d01c6fc50cb8ce5709f54f8019eb89e4
Summary: See previous diff, should have merged those two diffs
Reviewed By: jknoxville
Differential Revision: D21523815
fbshipit-source-id: 3db91d06d845f0764e28f0dbf3020e77812cde53
Summary: When opening a freshly generated plugin in VScode the IDE would be full of errors, even though it can bundle correctly thanks to the defaults used by bundle. This is fixed by diff by correctly setting up a tsconfig.
Reviewed By: jknoxville
Differential Revision: D21523817
fbshipit-source-id: 8f6b58fbfb704460ddb5b845ddfb137b28d37187
Summary: By adding a build command the flipper plugin can be picked up, even when using a production build of Flipper, as we don't require Flipper's own infrastructure anymore to compile plugins.
Reviewed By: jknoxville
Differential Revision: D21523819
fbshipit-source-id: eed935ee95a7e3bff2ace629836b4b2450b5d1ad
Summary:
As soon as any data was send to a freshly generated plugin, the plugin would crash as React doesn't support directly rendering data. Replaced it with a poor mans rendering that simply dumps all the data we received.
Also made sure the view is scrollable now which wasn't the case before.
Reviewed By: jknoxville
Differential Revision: D21523816
fbshipit-source-id: 3e04799facdf8b66ce9d66217a47fc7826d58d43
Summary:
This stack contains a bunch of improvements I made to smoothen the demo of plugin creating in the Flipper + React Native talk.
With 98% likelihood people will manage the source code of their Flipper plugins in git. This will make sure the `.gitignore` is configured properly ootb
Reviewed By: nikoant
Differential Revision: D21523818
fbshipit-source-id: b2ed769edc8fb9fd320464b05686e817e438f21e
Summary:
Very similar to the Logview plugin, showing a table with all logs (from all clients, if more than one is connected to Unity), and a right-side panel for details (the extra).
I'm still thinking how can I display the extra in the table (so it will be more convenient to compare logs), but still don't know (each extra can have different fields), and this is a good starting point.
Note: the POI plugin has an option to display marauder data, but I received requests for an easy way to debug just Pigeon, and since this is simple enough I don't see the harm here.
Reviewed By: timur-valiev
Differential Revision: D21549233
fbshipit-source-id: e7a48b4e21711bc9454e9b87a312e94a662917e2
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