Summary: You need to use a type guard when narrowing types in a filter.
Reviewed By: danielbuechele
Differential Revision: D17163782
fbshipit-source-id: aa78bdd392653ebf1080a04e62e131b607e5181b
Summary:
This is a UI ovehaul for the Navigation plugin, taking inspiration from the Notifications page in Flipper.
We now display a timestamp, open page and bookmark are more clearly identified, screenshots are organized more neatly, and parameters are displayed in a table.
If the class name of the ViewController is available, that will also be displayed.
Edit:
Adding in some of the requested changes.
Improved UI:
https://pxl.cl/K0h9
Scroll on opening a page:
https://pxl.cl/K0hQ
Reviewed By: danielbuechele
Differential Revision: D17161734
fbshipit-source-id: e5e054bf87f540964e90da3a798fd0c23df86540
Summary:
This makes the implementation of static view generic. Right now the only non-plugin view which is shown is the WelcomeScreen. The implementation it is hardcoded. I want to make it generic, so that we can show the bug request screen too.
This diff sets the default value of the `staticView` to `WelcomeScreen`, which will be set to null when the `selectedDevice` is set. And viceversa, it will be assigned back to `WelcomScreen`, when the `selectedDevice` is set to `null`
Reviewed By: danielbuechele
Differential Revision: D16965734
fbshipit-source-id: 69d700184f44d4e5ab531f5f8fc0e23bafa07e72
Summary: Migrate CPU plugin to use TypeScript
Reviewed By: danielbuechele
Differential Revision: D17072709
fbshipit-source-id: d9acf172af08d764216e7b79b79994199dc83f5c
Summary:
Generics on static methods don't seem to work the way we are using them.
I looked into how react types getDerivedStateFromProps as this is a very similar concept, and they don't seem to type it at all. For that reason I've given up and just type the persistedState passed to our static methods as `Object`.
Reviewed By: passy
Differential Revision: D17152767
fbshipit-source-id: d9c2159be26fa341c5411dd0b40895d4c8ddf71e
Summary:
Logs plugin expected the default icons size to be 16 and therefor didn't set it explicitly. However, with the TS migration we lost the default size.
This adds back the default size for icons.
Reviewed By: jknoxville
Differential Revision: D17156747
fbshipit-source-id: a37f3a2bd189a56019aee1939618caf21122a397
Summary: I've made some slight changes to how bookmarks are displayed in the app, and added the ability to remove them from the tab.
Reviewed By: danielbuechele
Differential Revision: D17154083
fbshipit-source-id: 587e1e0f6f79f461c92e4866f4a59608a6173ccb
Summary: This functionality already existed in FlexColumn by adding the prop grow.
Reviewed By: danielbuechele
Differential Revision: D17132219
fbshipit-source-id: d284f2c5e219beff743525abd344a8b9d1955d0b
Summary: Luckily I put all my types in one file, so this was very easy to convert over.
Reviewed By: danielbuechele
Differential Revision: D17132226
fbshipit-source-id: cacd0d66e15504d6f82ccc4aaaa4e27339e513f1
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
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
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
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
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
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
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
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
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