fix scrollbars in logs

Summary: Some columns in logs plugin where showing scrollbars since the update to electron 3. This hides scrollbars on all columns

Reviewed By: passy

Differential Revision: D9179242

fbshipit-source-id: bdf2e1a6f77d2a7e25cb34792b980afe7571e643
This commit is contained in:
Daniel Büchele
2018-08-06 06:19:28 -07:00
committed by Facebook Github Bot
parent 3a657ed46a
commit 1b3e3468a3

View File

@@ -201,14 +201,17 @@ const DEFAULT_FILTERS = [
}, },
]; ];
const NonSelectableText = Text.extends({ const HiddenScrollText = Text.extends({
alignSelf: 'baseline', alignSelf: 'baseline',
userSelect: 'none', userSelect: 'none',
lineHeight: '130%', lineHeight: '130%',
marginTop: 6, marginTop: 6,
'&::-webkit-scrollbar': {
display: 'none',
},
}); });
const LogCount = NonSelectableText.extends( const LogCount = HiddenScrollText.extends(
{ {
backgroundColor: props => props.color, backgroundColor: props => props.color,
borderRadius: '999em', borderRadius: '999em',
@@ -226,12 +229,6 @@ const LogCount = NonSelectableText.extends(
}, },
); );
const HiddenScrollText = NonSelectableText.extends({
'&::-webkit-scrollbar': {
display: 'none',
},
});
function pad(chunk: mixed, len: number): string { function pad(chunk: mixed, len: number): string {
let str = String(chunk); let str = String(chunk);
while (str.length < len) { while (str.length < len) {
@@ -343,29 +340,29 @@ export default class LogTable extends SonarDevicePlugin<LogsState> {
}, },
tag: { tag: {
value: ( value: (
<NonSelectableText code={true}>{entry.tag}</NonSelectableText> <HiddenScrollText code={true}>{entry.tag}</HiddenScrollText>
), ),
isFilterable: true, isFilterable: true,
}, },
pid: { pid: {
value: ( value: (
<NonSelectableText code={true}> <HiddenScrollText code={true}>
{String(entry.pid)} {String(entry.pid)}
</NonSelectableText> </HiddenScrollText>
), ),
isFilterable: true, isFilterable: true,
}, },
tid: { tid: {
value: ( value: (
<NonSelectableText code={true}> <HiddenScrollText code={true}>
{String(entry.tid)} {String(entry.tid)}
</NonSelectableText> </HiddenScrollText>
), ),
isFilterable: true, isFilterable: true,
}, },
app: { app: {
value: ( value: (
<NonSelectableText code={true}>{entry.app}</NonSelectableText> <HiddenScrollText code={true}>{entry.app}</HiddenScrollText>
), ),
isFilterable: true, isFilterable: true,
}, },