Commit Graph

7336 Commits

Author SHA1 Message Date
Pascal Hartig
a52e3e65a3 Combined dep bump
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
2022-06-13 05:18:42 -07:00
Pascal Hartig
ea7ff7eb8a Remove duplicate lock introduced in D36985721
Summary: Bad practice to have both.

Reviewed By: mweststrate

Differential Revision: D37080670

fbshipit-source-id: b239bb5216fd39ba5dae61f4a5e4388fa96bfdaf
2022-06-13 04:18:15 -07:00
Thiago
28bf342707 Docs: fix typo (#3803)
Summary:
Fix typo on word Recommended

Update Docs to fix a typo on Manual Android Setup

Addresses:

- https://github.com/facebook/flipper/issues/3790

## Changelog
Fix typo on Manual Android Setup  documentation.

Pull Request resolved: https://github.com/facebook/flipper/pull/3803

Test Plan: Not needed.

Reviewed By: antonk52

Differential Revision: D37070896

Pulled By: passy

fbshipit-source-id: da55e164d23f42f9b53ce3cadcb125b01ebeed81
2022-06-13 04:05:00 -07:00
Andrey Goncharov
d987e36c62 Add a single place to initialize Flipper utilitary folders
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
2022-06-10 06:38:50 -07:00
facebook-flipper-bot
60f9a5e8de Automated: Update Podfile.lock (#3804)
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
2022-06-10 05:40:58 -07:00
Kevin Strider
490fdbd4c4 desktop-plugin-structure.mdx (Creating Plugins - Plugin Structure)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: passy

Differential Revision: D37035954

fbshipit-source-id: e6e6a0e23989b676a59390ab6f0d068b449ee21d
2022-06-10 02:17:00 -07:00
Lorenzo Blasa
4b396e1ef3 Use flipper-server if running, otherwise initiate one
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
2022-06-09 14:26:17 -07:00
Flipper Bot
184372c271 Flipper Snapshot Bump: v0.149.1-SNAPSHOT
Summary: Releasing snapshot version 0.149.1-SNAPSHOT

Reviewed By: passy

Differential Revision: D36999203

fbshipit-source-id: cde3b316fae0531afb3ad501456774df614821ff
2022-06-09 10:32:12 -07:00
Flipper Bot
ad19b51069 Flipper Release: v0.149.0
Summary: Releasing version 0.149.0

Reviewed By: passy

Differential Revision: D36999205

fbshipit-source-id: 9bf6df029e3d359c166f21bd12f158a2d19b6516
2022-06-09 10:32:12 -07:00
Kevin Strider
e43ae6cd5f documentation-writing-guide.mdx (Under the Hood - Writing Guide)
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
2022-06-09 09:40:20 -07:00
Kevin Strider
af1c0c5ee6 documentation-formatting.mdx (Under the Hood - Formatting Tips)
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
2022-06-09 09:40:20 -07:00
Kevin Strider
b81fb44017 new Contributing to the Documentation section
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
2022-06-09 06:10:06 -07:00
Kevin Strider
235ff6c926 index.mdx (Under the Hood - Introduction)
Summary: Restyle of page, including changes to spelling, grammar, links, and structure (where relevant).

Reviewed By: lblasa

Differential Revision: D37003485

fbshipit-source-id: c36fde0d7962e079f369836b1b8581b82a2f5934
2022-06-09 05:45:28 -07:00
Kevin Strider
d230cbfba1 contributing.mdx (Under the Hood - Contributing Code)
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
2022-06-09 04:43:02 -07:00
Andrey Goncharov
fec2650afb Remove redundant GK definition from flipper-common
Summary: Developers should use `getRenderHostInstance().GK(...)` instead

Reviewed By: lblasa

Differential Revision: D37034322

fbshipit-source-id: 41017f53a5256449252917a48fcd3a49a9b984c8
2022-06-09 03:34:04 -07:00
Hannah Kim
9b0535b0ff (2/n) Created JS Flipper plugin
Summary: Added JS side of plugin to be displayed in the local Flipper Desktop app

Differential Revision: D36985721

fbshipit-source-id: f9d3cc28e418e95283c572fed4d40dbecfd2f236
2022-06-08 09:25:05 -07:00
Kevin Strider
f0c0011d69 Miscellaneous
Summary: Some minor changes to Title and Sidebar Labels

Reviewed By: nikoant

Differential Revision: D36932615

fbshipit-source-id: 09da6f331433086e7033677904884fac7400bc14
2022-06-07 09:27:52 -07:00
Luke De Feo
48bebdc665 Improve typing of getValueAtPath
Summary: Context: https://www.internalfb.com/diff/D36663929 (e07d5c5bfe)?dst_version_fbid=701770760940095&transaction_fbid=714786499947486

Reviewed By: antonk52

Differential Revision: D36782095

fbshipit-source-id: 2eb29d70aa641d386b129bf957320b718e97c298
2022-06-07 04:29:16 -07:00
Luke De Feo
3412ddfb1b Added mouse hovered state when exploring tree
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
2022-06-07 04:29:16 -07:00
Luke De Feo
ae0a89c580 Fix context menu for nested/overlapping elements
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
2022-06-07 04:29:16 -07:00
Luke De Feo
0200afca51 Added support for plugin supplied context menu items
Reviewed By: passy

Differential Revision: D36781556

fbshipit-source-id: 42124e0324bb2c850099b60410eb20872ebefe3c
2022-06-07 04:29:16 -07:00
Pascal Hartig
bb401fa70b Change server template
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
2022-06-07 04:15:42 -07:00
Michel Weststrate
f2bf48d4e4 DataTable delighter: Introduce search history
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
2022-06-07 04:04:01 -07:00
Michel Weststrate
36b78131b7 update control filter toggling implementation
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
2022-06-07 04:04:01 -07:00
Michel Weststrate
2037cf0595 preserve selection during filter changes
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
2022-06-07 04:04:01 -07:00
Michel Weststrate
fd3f6a0435 Improve selection color of datatable
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
2022-06-07 04:04:01 -07:00
Andrey Goncharov
2f2a101094 Deprecate kaios-big-allocations
Reviewed By: passy

Differential Revision: D36809144

fbshipit-source-id: ea04ddb2ed9d6114baa6586577f3e7ddd8b8bbf4
2022-06-07 04:00:02 -07:00
Andrey Goncharov
2b16916a85 Deprecate kaios-portal
Reviewed By: passy

Differential Revision: D36807506

fbshipit-source-id: 660f334a46dbf7847c90ce6e67f2dc974c1daf90
2022-06-07 04:00:02 -07:00
Lorenzo Blasa
9cc8e4076f flipper-server refactor
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
2022-06-07 02:42:16 -07:00
Harshit Bangar
c88e769013 Prototype: Added support for multiple host in mock (#3762)
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
2022-06-06 12:40:55 -07:00
Kevin Strider
b7977a954a sidebar.js
Summary: Tiny change to capitalization of a sub-menu

Reviewed By: nikoant

Differential Revision: D36931810

fbshipit-source-id: 52e6030f75e547e0936893830c702a6939ff5775
2022-06-06 09:18:24 -07:00
Flipper Bot
55d8872448 Flipper Snapshot Bump: v0.148.1-SNAPSHOT
Summary: Releasing snapshot version 0.148.1-SNAPSHOT

Reviewed By: jknoxville

Differential Revision: D36805038

fbshipit-source-id: 46318f2a39efa6132bf2228e5d2fb3b9648b228c
2022-06-06 06:25:38 -07:00
Flipper Bot
5971d603bf Flipper Release: v0.148.0
Summary: Releasing version 0.148.0

Reviewed By: jknoxville

Differential Revision: D36805039

fbshipit-source-id: 8d97ba973c57de4558fc6aaa0a546dbac1ee08cd
2022-06-06 06:25:38 -07:00
Lorenzo Blasa
054fbf1298 Aggregate existing logs from the ones generated by flipper-server
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
2022-06-01 04:37:36 -07:00
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