From 3c97c1d3bc978f7196766c477ee5f1645520536a Mon Sep 17 00:00:00 2001 From: Roi Becker Date: Tue, 2 Jun 2020 03:43:20 -0700 Subject: [PATCH] Scuba plugin Summary: Scuba doesn't work when running on laptops, so developers often run a canary just to see that their logging works. This attempts to give a Scuba-like view (Scuba UI does a lot, I'm just showing a simple samples-like view) of the data you report in real time. ## Unity * `ScubaFlipperPlugin` - very similar to our Pigeon/Logview plugins. * `ScubaLogger` - notice that I'm ignoring the sample rate (weight) to give as much signal as possible since a local Unity usually doesn't have a lot of traffic/logs. ## Flipper * `index.tsx` * Aggregates incoming data from Unity: * `messages` - all messages, keyed by the scribe category. * `columns` - keeps track of all the columns per table. This can grow over time (different messages can have different columns; Scuba does the same - using the union of all columns from all rows). I'm doing this here (and not while rendering a specific table) since this allows me to run the aggregation only once when a message arrives instead of every render (which React can do many of). * Chooses between one of the two following components. * `ScubaTables.tsx` - shows all known tables so far, with a count of rows (just so I'll have something to show in table...). Each row has a button to view this table. * `ScubaTable.tsx` - probably the only interesting part is not using explicit widths in the table (since I don't know what data I'll have). Instead, I just use `horizontallyScrollable` on the table and let it decide. It will squeeze everything in the window's width, but let's you expand/scroll as needed. Differential Revision: D21715926 fbshipit-source-id: 6f1c4f7f77c3b047dcb35a4e9b8173a7378af198 --- desktop/static/icons.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/static/icons.json b/desktop/static/icons.json index c5f909dbf..31911b3c7 100644 --- a/desktop/static/icons.json +++ b/desktop/static/icons.json @@ -422,5 +422,8 @@ ], "plus": [ 16 + ], + "scuba": [ + 12 ] -} \ No newline at end of file +}