diff --git a/desktop/plugins/public/crash_reporter/docs/setup.mdx b/desktop/plugins/public/crash_reporter/docs/setup.mdx index 99a591563..47eaefe4f 100644 --- a/desktop/plugins/public/crash_reporter/docs/setup.mdx +++ b/desktop/plugins/public/crash_reporter/docs/setup.mdx @@ -1,11 +1,17 @@ import useBaseUrl from '@docusaurus/useBaseUrl'; import Link from '@docusaurus/Link'; -You do not have to instantiate it in your app in order to use its basic functionality mentioned here. You can also use crash reporter plugin to send the notifications for the exception which you suppress in your Android application. You could even use it to send the notifications when the [Litho Error Boundary](https://fblitho.com/docs/error-boundaries) is triggered. In order to send your custom notification you will have to follow the following steps. +You don't have to instantiate the Crash Reporter plugin in your app in order to use its basic functionality. + +You can use the Crash Reporter plugin to send notifications for exceptions that are suppressed in your Android application. +You could even use it to send notifications when the [Litho Error Boundary](https://www.internalfb.com/intern/staticdocs/litho/docs/mainconcepts/use-error-boundary/) is triggered. + +In order to send custom notifications, take the steps detailed below. ## Android Instantiate and add the plugin in `FlipperClient`. + ```java import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; @@ -16,5 +22,6 @@ Use the following API to trigger your custom crash notification. ```java import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; + CrashReporterPlugin.getInstance().sendExceptionMessage(Thread.currentThread(), error); ``` diff --git a/desktop/plugins/public/fresco/docs/setup.mdx b/desktop/plugins/public/fresco/docs/setup.mdx index e4a57f322..b47478566 100644 --- a/desktop/plugins/public/fresco/docs/setup.mdx +++ b/desktop/plugins/public/fresco/docs/setup.mdx @@ -1,9 +1,13 @@ -Currently, the images plugin only supports [Fresco](https://frescolib.org/) for Android as backend, but just like the network plugin, support for other image loading libraries -could easily be added. Send us a PR! +import useBaseUrl from '@docusaurus/useBaseUrl'; +import Link from '@docusaurus/Link'; + +Currently, the Image plugin only supports [Fresco](https://frescolib.org/) for Android as backend. + +If you'd like to see support for other image loading libraries, please post your request in the [Flipper Support](https://fb.workplace.com/groups/flippersupport) Workplace group. ## Fresco and Android -The Fresco images plugin is shipped as a separate Maven artifact: +The Fresco Images plugin is shipped as a separate Maven artifact: ```groovy dependencies { @@ -11,8 +15,7 @@ dependencies { } ``` -After including the plugin in your dependencies, you can add it to the -client: +After including the plugin in your dependencies, you can add it to the client: ```java import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; @@ -20,9 +23,7 @@ import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; client.addPlugin(new FrescoFlipperPlugin()); ``` -The `FrescoFlipperPlugin` constructor offers a whole lot of configuration options which -can be useful if you have an advanced setup of Fresco in your application: - +The `FrescoFlipperPlugin` constructor offers a range of configuration options that can be useful if you have an advanced setup of Fresco in your application: ```java FrescoFlipperPlugin( @@ -37,13 +38,9 @@ FrescoFlipperPlugin( ### Leak Tracking -The Flipper plugin can help you track down `CloseableReferences` who have not had -`close()` called on them. This can have a negative impact on the performance of -your application. +The Flipper plugin can help you track down `CloseableReferences` that have not had `close()` called on them. However, this can have a negative impact on the performance of your application. -To enable this functionality, you need to create a `CloseableReferenceLeakTracker` -and set it in both your `ImagePipelineConfig` for Fresco and the `FrescoPluginPlugin` -on creation. +To enable this functionality, you need to create a `CloseableReferenceLeakTracker` and set it in both your `ImagePipelineConfig` for Fresco and the `FrescoPluginPlugin` on creation: ```java import com.facebook.imagepipeline.debug.FlipperCloseableReferenceLeakTracker; @@ -70,9 +67,7 @@ client.addPlugin(new FrescoFlipperPlugin( ### Attribution -In order to annotate images with the context they are used in, you have to set a -caller context when loading the image. This can be any object, so for the simplest -case, a String will suffice. +In order to annotate images with the context they are used in, you have to set a caller context when loading the image. This can be any object; for the simplest case, a String will suffice, as shown below: ```java String callerContext = "my_feature"; @@ -89,5 +84,4 @@ DataSource> dataSource = imagePipeline.fetchDecodedImage(imageRequest, callerContext); ``` -If a caller context is supplied, the image will be properly attributed in the -Flipper image plugin. +If a caller context is supplied, the image will be properly attributed in the Flipper image plugin.