Summary:
For Flipper Desktop, Electron based, the origin maybe file:// as shown in tests:
```
Refused socket connection from cross domain request, origin: file://, host: localhost:52342.
Expected origins: http://localhost:52342 or http://[::1]:52342 or http://::1:52342 or http://localhost:3000.
Expected hosts: localhost:52342 or [::1]:52342 or ::1:52342 or localhost:3000
```
This change effectively adds `file://` as a valid origin.
Reviewed By: passy
Differential Revision: D37212809
fbshipit-source-id: 311a93bb8872587d15c6be4329238af6b0f6988d
Summary:
After doing some tests, any error thrown during ws events can result in flipper-server shutting down.
To avoid this, effectively, errors throughout should be properly handled.
The problem is that there's no guarantees this is or will be the case.
Instead, wrap the event handlers in a safe function execution wrapper. Any errors will be caught and logged.
Reviewed By: aigoncharov
Differential Revision: D37206923
fbshipit-source-id: 6f7cadc297ac39768030962c6eaadde55048fd21
Summary:
Following the discussion from D37080670 (ea7ff7eb8a)
Unfortunately at some people npm changed the order in which things happen when running `npm install` and now dependency resolution happens before validating engines 🤷♂️
But this will work regardless
https://www.internalfb.com/intern/px/p/261cr
Reviewed By: aigoncharov
Differential Revision: D37142960
fbshipit-source-id: 306f1a4e7444dc099c1a11c4c9e22dafceacdbaa
Summary: Some files relying on -include_pch and therefore they miss Foundation.h and UIKit.h includes. This diff is fixing missing imports
Reviewed By: rmaz
Differential Revision: D37140239
fbshipit-source-id: bc57921e0c8365e0e9a5a571d607ba40ff1b31f3
Summary:
Bumps [constraintlayout](https://github.com/androidx/constraintlayout) from 2.1.2 to 2.1.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/androidx/constraintlayout/releases">constraintlayout's releases</a>.</em></p>
<blockquote>
<h2>2.1.3</h2>
<p>Point release of the constraintlayout library.</p>
<p>ConstraintLayout</p>
<ul>
<li>Add getSceneString on ConstraintLayout which gets a json formatted dump of the layout and constraints</li>
<li>Add attribute to GuideLine guidelineuseRTL to enable / disable if guideline is using RTL</li>
</ul>
<p>ConstraintLayout Compose</p>
<ul>
<li>add support for Margin in barrier <code>id: {type: 'barrier', direction: 'end' , contains: ['id1', 'id2'], margin: -12}</code></li>
<li>add json support for vbias/hbias <code>id: { centerVertically: 'parent', vBias: 0.45 }</code></li>
<li>improve json min/max support <code> width: { value: 'wrap', max: 300, min:20 },</code></li>
<li>mprove chain in dsl <code>val chain1 = createHorizontalChain(box1, box2, chainStyle = ChainStyle.Spread)</code></li>
<li>add DSL for goneMargin , Reset dimensions and transforms</li>
<li>add bias <code>centerHorizontallyTo(parent, bias = 0.2f)</code></li>
</ul>
<p>MotionLayout Compose</p>
<ul>
<li>Make Compose MotionLayout <a href="https://github.com/ExperimentalMotionApi"><code>@ExperimentalMotionApi</code></a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a href="https://github.com/androidx/constraintlayout/commits">compare view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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 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)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/3748
Reviewed By: lawrencelomax
Differential Revision: D37070948
Pulled By: passy
fbshipit-source-id: 4cc9389149490e85bc9aa0cbcb4b386072775010
Summary:
Bumps core-ktx from 1.7.0 to 1.8.0.
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
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 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)
</details>
Pull Request resolved: https://github.com/facebook/flipper/pull/3794
Reviewed By: lawrencelomax
Differential Revision: D37070913
Pulled By: passy
fbshipit-source-id: 98f817ee76bde2dfec2ebf3eb5080214c746cdc4
Summary: This is now replaced by the support entry point and we need to delete the calling sites before we can clean up the everstore type.
Reviewed By: lawrencelomax
Differential Revision: D37090901
fbshipit-source-id: 597684bb149783d75e46ba61113e73878bf271a8
Summary: Like the previous diff, combining a few upgrades.
Reviewed By: antonk52
Differential Revision: D37074518
fbshipit-source-id: bdfdcdef1b0910ae886ef91b8ac9d0e3bd3b8a21
Summary: There are a bunch of open tasks. Combining them into one with `yarn upgrade-interactive`.
Reviewed By: antonk52
Differential Revision: D37070919
fbshipit-source-id: f89b63d1f3b15c5b625d7a0f1bc566d9c37e5e42
Summary: Bad practice to have both.
Reviewed By: mweststrate
Differential Revision: D37080670
fbshipit-source-id: b239bb5216fd39ba5dae61f4a5e4388fa96bfdaf
Summary: We have several folders Flipper uses that sometimes we forget to create before Flipper starts. With this diff we have a single place to initialise the necessary folder structure.
Reviewed By: lblasa
Differential Revision: D37036601
fbshipit-source-id: f945f2bfdfc6be24ba87bd4b13c7fcef3fd74451
Summary:
This is an automated PR to update the Podfile.lock.
- Make sure that the Podfile.lock contains latest FlipperKit and Flipper pod versions.
- Also make sure that all the dependencies are updated to the latest one.
- This is auto-generated by [create-pull-request](https://github.com/peter-evans/create-pull-request)
Pull Request resolved: https://github.com/facebook/flipper/pull/3804
Reviewed By: nikoant
Differential Revision: D37068378
Pulled By: passy
fbshipit-source-id: d7f30af8f568f6440fc3ab66d4c1c1fe9a99790e
Summary:
Provided that GK passes:
- If a flipper-server instance is running, use and connect.
- If not, start flipper-server and connect.
Reviewed By: passy
Differential Revision: D37034960
fbshipit-source-id: ff79e56e80e74415373f84b78305b4fc3e31f7d0
Summary: A new page, whiich is part of the new Contributing to Documentation section (see diff D37004092 (b81fb44017))
Reviewed By: lblasa
Differential Revision: D37006980
fbshipit-source-id: 94d428c9c75ccd4170dc6f1be7c8d2f9d5cb5137
Summary: A new page, which is part of the new Contributing to Documentation section (see diff D37004092 (b81fb44017))
Reviewed By: lblasa
Differential Revision: D37006489
fbshipit-source-id: e9ea74aadc5d578aa7ce21a41379546251872704
Summary:
This is a new section under 'Contributing to the Documentation', in the 'Under the Hood' menu.
It includes two new pages:
* Documentation Formatting Tips (created here. For content, see D37006489)
* Writing Guide (created here. For content, see D37006980)
Setup in sidebar.js.
Reviewed By: lblasa
Differential Revision: D37004092
fbshipit-source-id: 5fa0a38632f7fa9d9178b69a89d9b21f5bda39ab
Summary:
Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).
This title of the page has changed as there will be a new section called 'Contributing to the Documentation'
Reviewed By: lblasa
Differential Revision: D37003755
fbshipit-source-id: bc2412e371c941e87e25429fe801f4c3e7148f9c
Summary: Added JS side of plugin to be displayed in the local Flipper Desktop app
Differential Revision: D36985721
fbshipit-source-id: f9d3cc28e418e95283c572fed4d40dbecfd2f236
Summary: Some minor changes to Title and Sidebar Labels
Reviewed By: nikoant
Differential Revision: D36932615
fbshipit-source-id: 09da6f331433086e7033677904884fac7400bc14
Summary:
Added a mouse hover state to detail inspector. The hover state follows you into and out of the hierarchy.
changelog: Added hover state to detail inspector
Reviewed By: mweststrate
Differential Revision: D36781553
fbshipit-source-id: eafbf119a81779bf07199142d305b06ad6b98c52
Summary:
Previously if you activated context menu in detail inspector it would trigger a context menu for multiple
overlapping children. This behaviour can be observed in live by right clicking a nested property an selecting 'Copy value'.
Most of the time you will copy the entire tree as you are clicking on the parents context menu. This is
the solution recommended by the antd team. https://github.com/ant-design/ant-design/issues/33865 (see the
response fiddle from the maintainer)
changelog: Fixed bug when copying value from context menu in detail sidebar
Reviewed By: mweststrate
Differential Revision: D36781555
fbshipit-source-id: 010a04648eb90eb19a47aa0f1f2b0427c9f5f7cc
Summary:
This is a completely meaningless change *but* it actually has an important
semantic meaning. I recently changed the `+x` bit to be set on the node binary
while bundling which is not always true when packing on Linux.
However, we don't consider permission bits as part of the checksums we build,
which means you will always get the previous version until we update the node version
or this very script because it's part of the same bundle.
So let's just ship this "update".
Reviewed By: mweststrate
Differential Revision: D36954703
fbshipit-source-id: 2d89cb1ee2e7bcce125c3f9efc9d8d39101ac133
Summary:
Getting the behavior exactly right was tricky, now settled on the following:
* Don't automatically show the search history (the default) but introduce an explicit button to toggle it, as opening it by default was pretty obtrusive in testing
* Items are added to the history when using return / explicitly clicking search, to only get "clean" entries into the history, and not half complete searches. Needing to press enter might be to subtle since datatable will also search without that, but not searching on keypress felt as a regression as well.
* Introduced a menu item for clearing the search history
* Search history is persisted like search filters.
Yay to Antd's AutoComplete, which is really straightforward and cleanly composes with Input.Search.
Changelog: DataTable will now keep a history of search items when hitting <return> to search. Use the history button to bring up the history.
Reviewed By: aigoncharov
Differential Revision: D36736821
fbshipit-source-id: 8d18b85308a39bd1644057371040855d199545c7
Summary:
The `Control` button press, that hides the current search filter, had some specific logic to make sure that the current selection remained visible. Since this is now generically supported, this is no longer needed.
Also updated the `Control` button behavior to also toggle back the search filter if needed, which was never finished in the original implementation.
Changelog: DataTable: pressing the control key can be used to temporarily turn the current search filter on and off.
Reviewed By: aigoncharov
Differential Revision: D36736494
fbshipit-source-id: 2c4949efa0d6935735f61ee43f9268b7e27d1fcf
Summary:
During filter changes, DataTable would loose any selections made, which was posted multiple times as papercut
I didn't implement preserving multi line selections. That should be straightforward, but wasn't sure that'd be desirable or not.
Changelog: DataTable: Data tables will now preserve the current selection and scroll it into view when changing the search filter.
Reviewed By: aigoncharov
Differential Revision: D36736496
fbshipit-source-id: 401ef351c847f58a5d411cf9f352390f6a110b24
Summary:
DataTable selected rows are a bit hard to spot when changing search, scrolling etc, so give them a bit more prominent background
Changelog: DataTable: more pronounced background color for selections
Reviewed By: aigoncharov
Differential Revision: D36736495
fbshipit-source-id: 2cab9eb99594ffaaccdd9ebe0d922691adb27bdc
Summary:
This changes moves most of the functionality found in flipper-server to flipper-server-core.
flipper-server will mostly be a package that wraps around flipper-server-core. Staying in flipper-server:
- Command line args
- Orchestration to start the necessary servers
Reviewed By: aigoncharov
Differential Revision: D36807087
fbshipit-source-id: f29002c7cc5d08b8c5184fdaaa02ba22562a9f45
Summary:
Apps usually communicate with multiple hosts to support pops and data centres. The problem currently is that for each host we need a different config in the mock tab in flipper. If the host change due to failover then the mocking stops working. Added support to enter the URL without a host in the flipper. We then check if the Url from the actual network request contains the mock URL without a host.
We can change the hint on flipper UI to suggest either entering the complete URL or without the host to allow matching across multiple hosts.
Resolve:[3751](https://github.com/facebook/flipper/issues/3751)
Let me know if the approach looks good.
## Changelog
Pull Request resolved: https://github.com/facebook/flipper/pull/3762
Reviewed By: lblasa
Differential Revision: D36780307
Pulled By: passy
fbshipit-source-id: 744898fa24d13343132e9a2165750241861245bd
Summary:
This change aggregates/redirects flipper-server logs with logs generated by the app.
This is a great approach, why:
As we tail the file, we deserialise the logs, and re-log them using console. This means, that they will be intercepted by the logging infrastructure flipper already has in place which will make these logs go to scribe, error reporting, etc.
Reviewed By: passy
Differential Revision: D36473790
fbshipit-source-id: a3547c5c8733217c61bb2d9b94990626bbf0a492
Summary:
This change extracts logging logic out from startFlipperServer.
Logs will also be written to disk.
Reviewed By: passy
Differential Revision: D36473768
fbshipit-source-id: b1df9df79b4aced0d3ba2e8c243aa8d44cf83703
Summary:
CHANGELOG: Upgrade electron to 18.2.0.
In Electron 18.2.0 we no longer have access to `remote`. Instead, we are recommended to implement IPC communications. We re-implement `remote` methods used before as IPC commands. To support type-safe execution of the commands, we create electron IPC clients on both sides: the main process and renderer process. We also move the main menu creation to the main process and track its usage via sending IPC messages to the renderer process where the logging happens.
Reviewed By: mweststrate
Differential Revision: D36593625
fbshipit-source-id: 6dcf531461ef2edceb9cac372a650f84f3370953