@samitouri / QOS-React-2 / commits / fc4af4d018

Fixed text wrap bug in extension panel

Brian Vaughn committed Jan 29, 2019 at 13:48 UTC fc4af4d0188ecea769ad25bcd510d9328726ce41
4 files changed +21 -12
src/backend/agent.js
+9 -6
@@ -1,17 +1,20 @@
1 // @flow
2
3 import EventEmitter from 'events';
4 +import { __DEBUG__ } from '../constants';
5
6 import type { RendererID, RendererInterface } from './types';
7 import type { Bridge } from '../types';
8
9 const debug = (methodName, ...args) => {
9 - console.log(
10 - `%cAgent %c${methodName}`,
11 - 'color: purple; font-weight: bold;',
12 - 'font-weight: bold;',
13 - ...args
14 - );
10 + if (__DEBUG__) {
11 + console.log(
12 + `%cAgent %c${methodName}`,
13 + 'color: purple; font-weight: bold;',
14 + 'font-weight: bold;',
15 + ...args
16 + );
17 + }
18 };
19
20 export default class Agent extends EventEmitter {
src/constants.js
+2
@@ -3,3 +3,5 @@
3 export const TREE_OPERATION_ADD = 1;
4 export const TREE_OPERATION_REMOVE = 2;
5 export const TREE_OPERATION_RESET_CHILDREN = 3;
6 +
7 +export const __DEBUG__ = false;
src/devtools/store.js
+9 -6
@@ -7,17 +7,20 @@ import {
7 TREE_OPERATION_RESET_CHILDREN,
8 } from '../constants';
9 import { utfDecodeString } from '../utils';
10 +import { __DEBUG__ } from '../constants';
11
12 import type { Element, ElementType } from './types';
13 import type { Bridge } from '../types';
14
15 const debug = (methodName, ...args) => {
15 - console.log(
16 - `%cStore %c${methodName}`,
17 - 'color: green; font-weight: bold;',
18 - 'font-weight: bold;',
19 - ...args
20 - );
16 + if (__DEBUG__) {
17 + console.log(
18 + `%cStore %c${methodName}`,
19 + 'color: green; font-weight: bold;',
20 + 'font-weight: bold;',
21 + ...args
22 + );
23 + }
24 };
25
26 /**
src/devtools/views/Element.css
+1
@@ -3,6 +3,7 @@
3 border-radius: 0.25em;
4 cursor: pointer;
5 position: relative;
6 + white-space: nowrap;
7 }
8 .Element:hover {
9 background-color: var(--color-state03);