From 9bf41f7bb71bc766069d26e24f7a1a4ab1d6a831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20B=C3=BCchele?= Date: Mon, 18 Feb 2019 04:53:55 -0800 Subject: [PATCH] add GK Summary: Users passing the GK `flipper_layout_inspector_new` will see then new layout inspector instead of the old one. Hopefully users won't realize that they are on the new Layout Inspector. To make them aware of it, I added a bar on the bottom linking to the support group that is used for the GK. Reviewed By: jknoxville Differential Revision: D14100392 fbshipit-source-id: 78d561a3ab8ac035e5b439799c395901be086b1b --- src/plugins/layout/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/layout/index.js b/src/plugins/layout/index.js index 558734dde..fa5b01b41 100644 --- a/src/plugins/layout/index.js +++ b/src/plugins/layout/index.js @@ -26,10 +26,13 @@ import { Popover, ToggleButton, SidebarExtensions, + GK, } from 'flipper'; // $FlowFixMe perf_hooks is a new API in node import {performance} from 'perf_hooks'; +import Layout2 from './layout2/index.js'; + import type {TrackType} from '../../fb-interfaces/Logger.js'; import debounce from 'lodash.debounce'; @@ -189,7 +192,7 @@ class LayoutSearchInput extends Component< } } -export default class Layout extends FlipperPlugin { +class Layout extends FlipperPlugin { state = { elements: {}, initialised: false, @@ -1236,3 +1239,5 @@ export default class Layout extends FlipperPlugin { ); } } + +export default (GK.get('flipper_layout_inspector_new') ? Layout2 : Layout);