Commit Graph

7102 Commits

Author SHA1 Message Date
Andrey Goncharov
055b14c6dd Persist device ID
Summary: Linked to https://github.com/facebook/flipper/issues/3319

Reviewed By: passy

Differential Revision: D36786952

fbshipit-source-id: f3214f35039845a8e35fa14e63f509a6fbdddb1f
2022-06-01 02:49:25 -07:00
Lorenzo Blasa
ee64216725 Extract logger and write to file
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
2022-06-01 02:37:03 -07:00
Andrey Goncharov
92cdb81096 Upgrade electron version
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
2022-05-31 06:52:14 -07:00
Lorenzo Blasa
2fe7e73175 Refactor checks to see if socket is in use
Summary:
These are utility methods that are not specific to startServer.

They will be reused by other components needing to check if something is listening to a port.

Make socket path is also extracted.

Reviewed By: passy

Differential Revision: D36473641

fbshipit-source-id: 73ed67912052896696b59670cb757d22761eeaa1
2022-05-31 03:31:05 -07:00
Lorenzo Blasa
4f7dd3b5eb Update react and react-native
Summary:
Update necessary dependencies for RNW

allow-large-files

Reviewed By: passy

Differential Revision: D36751452

fbshipit-source-id: e2b4c2770e141813a325ea6783fdd2f89e50ec2c
2022-05-31 03:17:49 -07:00
Andrey Goncharov
ec068e814b Prevent using node APIs in a browser bundle
Reviewed By: antonk52

Differential Revision: D36771197

fbshipit-source-id: aec3edc22d4c4148ae0fe7a0c87c701323112acd
2022-05-31 02:58:21 -07:00
Andrey Goncharov
976399b950 Move Tail to flipper-server-core
Summary: Tail is a server-side logging utility. We cannot add it to flipper-frontend-core as it is going to be included into the browser bundle then and break the build.

Reviewed By: antonk52

Differential Revision: D36771864

fbshipit-source-id: 169cdb88543f1e47f39e8c0976c3a3f45c0439d5
2022-05-31 02:58:21 -07:00
Anton Nikolaev
0a8577e948 Show all available sections in sidebar
Summary:
Kevin Strider after reviewing Flipper docs structure suggested to show all sections in sidebar. This will make it easier for users to navigate website as they will be able to find all the content through sidebar menu.

Before that only current section items were shown, so e.g. if user clicks "Learn more" on the start page they open "Features" section and it's not clear that there are a lot of other content (Setup, Creating Plugins, Under the Hood) which is only available through the top menu.

Reviewed By: antonk52

Differential Revision: D36762008

fbshipit-source-id: a36cfb77e5d2efd4f5d8795d1c68e46d07ed79e1
2022-05-31 02:20:39 -07:00
Andrey Goncharov
59761ecd50 Mark deprecated plugins in the UI
Summary:
Changelog: Add a deprecation warning for deprecated plugins.

Closes https://github.com/facebook/flipper/issues/2074

Reviewed By: lblasa, antonk52

Differential Revision: D36760209

fbshipit-source-id: 64cf799644f28aeedf88824c949738a6a766b094
2022-05-30 07:32:12 -07:00
Flipper Bot
4ed0f1c4b0 Flipper Snapshot Bump: v0.147.2-SNAPSHOT
Summary: Releasing snapshot version 0.147.2-SNAPSHOT

Reviewed By: aigoncharov

Differential Revision: D36759783

fbshipit-source-id: 43bc5f67b352fa1c054d1c13efb1365e564ed2be
2022-05-30 06:18:15 -07:00
Flipper Bot
04400fd22e Flipper Release: v0.147.1
Summary: Releasing version 0.147.1

Reviewed By: aigoncharov

Differential Revision: D36759784

fbshipit-source-id: 27c04809b8b6efaea96e96f79e4d2079a9162799
2022-05-30 06:18:15 -07:00
Luke De Feo
e07d5c5bfe Added support for dotted key paths in Data table column
Summary:
This adds support for the key of DataTableColumn to be a dotted path into a nested object, e.g foo.bar. Currently the typescript types only allow a top level key to be set, making this feature currently unusuable from plugin code.

While this could be addressed in a future commit the intention of this is to allow the user to add custom fields into their table columns at run time

Note there is a side effect to free text search from this commit. Previously it would search all top keys in the object. Now it will only search in columns that are in the table.

changelog: Searching data table will now only search columns in the table, rather than all top level attributes of the object

Reviewed By: mweststrate

Differential Revision: D36663929

fbshipit-source-id: 3688e9f26aa7e1828f8e9ee69f8e6f86268c8a54
2022-05-30 04:37:25 -07:00
Pascal Hartig
8c4b494d32 Add a note about changelogs
Summary:
LukeDefeo called out that there's currently no guide for how to create changelog items.

I couldn't find another good page to add this to. Might be a good idea to expand this with further tips for making good contributions.

Reviewed By: LukeDefeo, nikoant

Differential Revision: D36702634

fbshipit-source-id: 15bc1dcf420ea923a714929eff8ac817efa56ceb
2022-05-30 03:44:28 -07:00
Pascal Hartig
db045a3b21 Send isHeadlessBuild flag in error reporting
Summary:
Andrey's diff already ensures that we send the flag, this also adds it to the info string
which makes it more visible.

Reviewed By: lblasa

Differential Revision: D36699070

fbshipit-source-id: 905eded9612b19ecaa35a841ec240af002e11611
2022-05-30 03:44:28 -07:00
Pascal Hartig
11ff9b51e3 Fix node +x bit in server distribution
Summary: This was lost when I changed from `pkg-fetch` writing it to copying the file.

Reviewed By: mweststrate, aigoncharov

Differential Revision: D36682861

fbshipit-source-id: 23822d4cc75720a83282de949d28029a05a2a7f9
2022-05-30 03:44:28 -07:00
Andrey Goncharov
c2a17873cb Fix node-fetch bundling
Summary:
In electron setup, bundlers usually bundle for browser environments. In browser envs, bundles seem to pick up .mjs files first. .mjs fro node-fetch exports fetch as a default export. This fix allows bundling of npm-api for electron.

Closes https://github.com/facebook/flipper/issues/3752

https://github.com/doowb/npm-api/pull/25/files

Reviewed By: lblasa

Differential Revision: D36758469

fbshipit-source-id: bf6c27ed37cb0baa54382ea563902e6e77a118e9
2022-05-30 03:41:33 -07:00
Yedidya Feldblum
48fec52610 cut config for folly::uncaught_exceptions
Summary: This function is no longer configured, so cut flipper's configuration of it.

Reviewed By: lblasa

Differential Revision: D34513641

fbshipit-source-id: 46e909a3a1ec7924ffd3b38ff7769020a486fda4
2022-05-28 16:47:31 -07:00
Andrey Goncharov
4eca8d1088 Add isHeadlessBuild to EnvironmentInfo
Summary: Allows to attribute errors to flipper server or flipper electron

Reviewed By: passy

Differential Revision: D36698504

fbshipit-source-id: 6d07216fd05aa48b7c8cca5b53145916b64526eb
2022-05-27 02:37:53 -07:00
Lorenzo Blasa
49eb026769 Tail
Summary:
Added a new type, Tail. It observes changes made to a file and notifies the subscriber.

It is useful and used to tail flipper-server logs, for example.

Reviewed By: passy

Differential Revision: D36473529

fbshipit-source-id: b0f905f4f8419d9e13386440d2d2cdabd528295b
2022-05-26 09:44:30 -07:00
Kevin Strider
41f49c8ad7 device-identifiers.mdx (Under the Hood - Device Indentifiers)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: lblasa

Differential Revision: D36668737

fbshipit-source-id: a863cec2fcb405f048d78e707c16084399e8a767
2022-05-26 07:57:11 -07:00
Kevin Strider
8f448dcfc8 linters.mdx (Under the Hood - Linters)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: passy

Differential Revision: D36667953

fbshipit-source-id: 0ede69115f3652b00acf9658e472dba4bb8f799c
2022-05-26 04:27:17 -07:00
Michel Weststrate
15e9d105c4 Restore styleguide menu entry, reordered menu
Summary: The styleguide was no longer accessible in Flipper, this diff restores that, and also cleans up the extras menu a bit to by creating a plugin devs only section.

Reviewed By: antonk52

Differential Revision: D36697071

fbshipit-source-id: a2abce40157fffd4952172f379c8063492e2dcc0
2022-05-26 04:26:20 -07:00
Michel Weststrate
9111b66916 Document Container grow / shrink properties
Summary: For some reason, the most important container property grow (and shrink) wasn't in the docs. Added that

Reviewed By: antonk52

Differential Revision: D36697072

fbshipit-source-id: 45dd0351e2a94d31972d57a9f006cd06a0d37c4e
2022-05-26 04:26:20 -07:00
Kevin Strider
50919e26f5 public-releases.mdx (Under the Hood - Public Flipper Releases)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: passy

Differential Revision: D36666339

fbshipit-source-id: 4c57746bd62fd52fa8dff4fda3098c443941ae30
2022-05-26 04:24:33 -07:00
Kevin Strider
23f73f0b1e testing-rn.mdx (Under the Hood - Testing RN Changes)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: passy

Differential Revision: D36666807

fbshipit-source-id: 6da969a81a28fc7f9cd7cd8deb3fe341b5516ee2
2022-05-26 03:44:28 -07:00
Lorenzo Blasa
e44cad5e99 Partially remove dependency on folly async
Summary:
This change isolates the usage of folly async from Flipper. Is now self-contained in Flipper Folly schedulers.

Users of Flipper can decide not to use the types defined in that header and implement their own.

NOTE: changes are minimal, we are just replacing direct calls to folly event base with a scheduler which simply relays this on to folly.

Reviewed By: fabiomassimo

Differential Revision: D36626483

fbshipit-source-id: add0241caf4af0aa5c3b5c2e7efc2e725f5400ab
2022-05-25 15:58:05 -07:00
Flipper Bot
9c7850604c Flipper Snapshot Bump: v0.147.1-SNAPSHOT
Summary: Releasing snapshot version 0.147.1-SNAPSHOT

Reviewed By: aigoncharov

Differential Revision: D36658610

fbshipit-source-id: 3ffa986ca7fed2123f79d0058e9ef08ecc5bc056
2022-05-25 09:56:02 -07:00
Flipper Bot
19a5a8e9c7 Flipper Release: v0.147.0
Summary: Releasing version 0.147.0

Reviewed By: aigoncharov

Differential Revision: D36658611

fbshipit-source-id: 74137e1c5c1f5be5dc45c28ed74aa016001db070
2022-05-25 09:56:02 -07:00
Kevin Strider
b75eeb941b client-plugin-lifecycle.mdx (Creating Plugins - Client Plugin Lifecycle)
Summary:
Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

This diff includes a new version of the images:
bg-plugin-lifecycle.png
regular-plugin-lifecycle.png

The old versions have been renamed to:
bg-plugin-lifecycle.bak
regular-plugin-lifecycle.bak

Reviewed By: aigoncharov

Differential Revision: D36630758

fbshipit-source-id: 29922750364e1dd6f959bd297e3b5d5e6cf1a9ac
2022-05-25 03:42:25 -07:00
Kevin Strider
ee006a961b architecture.mdx (Creating Plugins - Architecture)
Summary:
Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

This diff includes a new version of the image 'flipper-communication-diagram.png'.
The old version has been renamed to 'flipper-communication-diagram.bak'

Reviewed By: aigoncharov

Differential Revision: D36628993

fbshipit-source-id: cb59785777926b4fb8b8bb3be2aa2439d3a580d0
2022-05-25 03:26:55 -07:00
Kevin Strider
2d465c1bf9 layout-inspector.mdx (Creating Plugins - Extending the Layout Inspector)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: aigoncharov

Differential Revision: D36632888

fbshipit-source-id: 41c4ddceab4ae6a665559093465a73c595aa494f
2022-05-25 03:21:57 -07:00
Kevin Strider
b8292ee62c create-plugin.mdx (Creating Plugins - Client Plugin API)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: aigoncharov

Differential Revision: D36626315

fbshipit-source-id: 735160f8d1f1365a8aab7fb1cd3e99b724025e3a
2022-05-25 03:14:14 -07:00
Kevin Strider
669bc74acd error-handling.mdx (Creating Plugins - Error Handling)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: aigoncharov

Differential Revision: D36626777

fbshipit-source-id: 65c5fcac860ff47c775fc43c053a8a55eb4804e9
2022-05-25 03:11:36 -07:00
Lorenzo Blasa
6d2bc5cc9a Refactor some of the types used by FBLogger into Logger
Summary:
^

This change aims to extract some bits and pieces that are not specific to FBLogger and could be used by other Logger implementations.

Reviewed By: passy

Differential Revision: D36473286

fbshipit-source-id: 57f02d132673dbac97384da4dca51bf3e6fb8738
2022-05-24 10:23:42 -07:00
Pascal Hartig
a73f736d92 Launch emulator error message
Summary:
It's not obvious for non-mobile developers how to fix it when there are no emulators available. Adding a quick section in the troubleshooting guide and linking to it.

Changelog: Add link to troubleshooting page when no emulators are available.

Reviewed By: nikoant

Differential Revision: D36599925

fbshipit-source-id: f3a1e79e07209e34b66176102c85e7797292978c
2022-05-24 07:55:40 -07:00
Pascal Hartig
f84f56614d Loading state for emulator launcher
Summary:
Our current loading state holder for the emulator launch dialogue is a "No emulators available" error message which may stay there for up to 5 seconds (in the case of only iOS enabled) before we see devices.

This adds a proper spinner that will show for as long there are pending device queries.

Changelog: Loading state for emulator launch dialogue

Reviewed By: nikoant

Differential Revision: D36598855

fbshipit-source-id: 64099596b48708b48a43f0208696a7dddc15007c
2022-05-24 07:55:40 -07:00
Pascal Hartig
fe29183014 Show custom messages for no SDKs in Launch Emulator dialog
Summary:
Our launch emulator button isn't very helpful when you don't have any SDKs set up as it shows you exactly the same message as if it was loading for a bit longer. We've seen a low, but constant flow of support requests and it's often not easy to debug remotely unless you dig into the state export.

This sets up a new actionable message when you have neither Android nor iOS support enabled and sends you straight to the settings.

Changelog: Show alert in Launch Emulator dialogue if no SDKs are enabled

Reviewed By: mweststrate

Differential Revision: D36596972

fbshipit-source-id: ba72e9aaeb136c1a7e2f360ef9fbbeec6bc76f4d
2022-05-24 07:55:40 -07:00
Anton Nikolaev
015be5ad83 Remove flashing on initializing datatable with filter
Summary:
When filter is applied for the first time we shouldn't debounce to avoid "flashing" on datatable loading when it is first loaded without filter and then filter applied after 250ms.

Changelog:
Fixed flashing on opening datatable-based plugin with a filter.

Reviewed By: timur-valiev

Differential Revision: D36602929

fbshipit-source-id: 8bd33f50c92036f2a5565f636f4f2fbe69d900f2
2022-05-24 04:51:19 -07:00
Anton Nikolaev
8d07b7b644 Quick action for resetting all datatable filters
Summary:
As we persist column filters between sessions - sometimes it's not obvious that they are applied.

This diff adds "Reset filters" action just near message "No records match the current search / filter criteria" to make it obvious that some records are hidden because of filters and let user quickly disable filters to see all items.

The same action also added to datatable's context menu.

Changelog:
Quick action "Reset filters" for datatable-based plugins which is shown in context menu and in empty table when all items filtered out.

Reviewed By: timur-valiev

Differential Revision: D36600535

fbshipit-source-id: 782e7f863f2f52d7f6017685bdebcb1feeb97dbd
2022-05-24 04:51:19 -07:00
Kevin Strider
02058a14d0 flipper-plugin.mdx (CreatingPlugins - Desktop Plugin API)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: nikoant

Differential Revision: D36594291

fbshipit-source-id: caba082f8bf6ab62c7bd03b3dfeae43f5ec76b7e
2022-05-24 03:29:25 -07:00
Pascal Hartig
b185cabbc2 Fix height of launch emu window
Summary:
A paper cut that hurt me so many times. The launch emulator window gets populated by external commands that finish at interminate points in time and change the size, jiggling the buttons around. That means, you may hover over an android emulator just when the iOS command returns and when you click, you don't hit the Android emu, but some iOS thing.

This just makes the height fixed, so this cannot happen.

Still having some more improvements in mind as this is such a high-trafficked surface.

Chanlog: Fix wiggling of the Launch Emulator dialogue as data comes in

Reviewed By: mweststrate

Differential Revision: D36595001

fbshipit-source-id: e61de55f348ab4d2f6f977552539d2a44d3fd11d
2022-05-23 11:25:33 -07:00
Kevin Strider
d9524e893c node-apis.mdx (Creating Plugins - Using Node.js APIs)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: mweststrate

Differential Revision: D36596005

fbshipit-source-id: 9ae71f426fad792af6e13f949581e26f8366baa4
2022-05-23 09:43:57 -07:00
Kevin Strider
cd1345bc28 deeplinks.mdx (Creating Plugins - Using Deeplinks)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: mweststrate

Differential Revision: D36595695

fbshipit-source-id: 7aea6856da2d1e00676c781ffe3d817d6abc58dc
2022-05-23 09:39:07 -07:00
Kevin Strider
1dd2f8bcf1 styling-components.mdx (Creating Plugins - Styling Components)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: mweststrate

Differential Revision: D36595388

fbshipit-source-id: 0d65c3b7099d492c1e3959f9d1d4b3f7c09cd98d
2022-05-23 09:36:58 -07:00
Andrey Goncharov
3141658ac0 Publish flipper-headless-demo
Reviewed By: lblasa

Differential Revision: D36591088

fbshipit-source-id: 0f22b38f558934aa9a8b017cdb87cc67f5a65cef
2022-05-23 08:06:18 -07:00
Andrey Goncharov
125f450f60 Prepare flipper-headless-demo for publishing
Summary: Make headless-demo executable and configure packaging

Reviewed By: passy

Differential Revision: D36590919

fbshipit-source-id: 2c192a712e38888bc8b1f1caa3e55075c24ed14e
2022-05-23 08:06:18 -07:00
Andrey Goncharov
966e53f4a2 Publish flipper-headless-tic-tac-toe
Reviewed By: passy

Differential Revision: D36590750

fbshipit-source-id: c94a74f850723c2165222a9869d563469471f206
2022-05-23 08:06:18 -07:00
Andrey Goncharov
38814f16f9 Prepare headless tic-tac-toe for publishing
Summary: Make headless-tic-tac-toe executable and configure packaging

Reviewed By: lblasa

Differential Revision: D36589422

fbshipit-source-id: d8b141033434265e4f14b9a047d3bccde8fad14b
2022-05-23 08:06:18 -07:00
Andrey Goncharov
abbb267482 Implement headless tic-tac-toe CLI
Summary: Add a CLI app to play tic-tac-toe from the terminal.

Reviewed By: lblasa

Differential Revision: D36548528

fbshipit-source-id: 4cdfb9d8887cb0d4d0100a822f39a4f9fb25aa9b
2022-05-23 08:06:18 -07:00
Andrey Goncharov
0fcfdef465 Add TicTacToe client to headless tic-tac-toe
Summary: TicTacToe client implements basic operation to play Tic Tac Toe

Reviewed By: passy

Differential Revision: D36548545

fbshipit-source-id: cfca5dad4c42efc8272ee1ce7544914451059f14
2022-05-23 08:06:18 -07:00