Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove fancy scroll bars #18016

Merged
merged 2 commits into from
May 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions ui/src/dashboards/components/NoteEditorPreview.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, {SFC, MouseEvent} from 'react'

import FancyScrollbar from 'src/shared/components/fancy_scrollbar/FancyScrollbar'

import {MarkdownRenderer} from 'src/shared/components/views/MarkdownRenderer'
import {DapperScrollbars} from '@influxdata/clockface'

interface Props {
note: string
Expand All @@ -16,10 +15,10 @@ const cloudImageRenderer = (): any =>
const NoteEditorPreview: SFC<Props> = props => {
return (
<div className="note-editor--preview">
<FancyScrollbar
<DapperScrollbars
className="note-editor--preview-scroll"
scrollTop={props.scrollTop}
setScrollTop={props.onScroll}
onScroll={props.onScroll}
>
<div className="note-editor--markdown-container">
<MarkdownRenderer
Expand All @@ -31,7 +30,7 @@ const NoteEditorPreview: SFC<Props> = props => {
}}
/>
</div>
</FancyScrollbar>
</DapperScrollbars>
</div>
)
}
Expand Down
8 changes: 4 additions & 4 deletions ui/src/shared/components/MultiGrid/MultiGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as React from 'react'
import CellMeasurerCacheDecorator from './CellMeasurerCacheDecorator'
import FancyScrollbar from 'src/shared/components/fancy_scrollbar/FancyScrollbar'
import {Grid} from 'react-virtualized'
import {DapperScrollbars} from '@influxdata/clockface'

const SCROLLBAR_SIZE_BUFFER = 20
type HeightWidthFunction = (arg: {index: number}) => number
Expand Down Expand Up @@ -472,12 +472,12 @@ class MultiGrid extends React.PureComponent<PropsMultiGrid, State> {
const height = this.getBottomGridHeight(props)

return (
<FancyScrollbar
<DapperScrollbars
style={{...this.bottomRightGridStyle, width, height}}
autoHide={true}
scrollTop={this.state.scrollTop}
scrollLeft={this.state.scrollLeft}
setScrollTop={this.onScrollbarsScroll}
onScroll={this.onScrollbarsScroll}
>
<Grid
{...props}
Expand All @@ -503,7 +503,7 @@ class MultiGrid extends React.PureComponent<PropsMultiGrid, State> {
}}
width={width}
/>
</FancyScrollbar>
</DapperScrollbars>
)
}

Expand Down
99 changes: 0 additions & 99 deletions ui/src/shared/components/fancy_scrollbar/FancyScrollbar.tsx

This file was deleted.

10 changes: 4 additions & 6 deletions ui/src/timeMachine/components/RawFluxDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import React, {PureComponent, MouseEvent} from 'react'
import memoizeOne from 'memoize-one'
import RawFluxDataGrid from 'src/timeMachine/components/RawFluxDataGrid'

// Components
import FancyScrollbar from 'src/shared/components/fancy_scrollbar/FancyScrollbar'

// Utils
import {parseFiles} from 'src/timeMachine/utils/rawFluxDataTable'
import {DapperScrollbars} from '@influxdata/clockface'

interface Props {
files: string[]
Expand Down Expand Up @@ -35,7 +33,7 @@ class RawFluxDataTable extends PureComponent<Props, State> {

return (
<div className="raw-flux-data-table" data-testid="raw-data-table">
<FancyScrollbar
<DapperScrollbars
style={{
overflowY: 'hidden',
width: tableWidth,
Expand All @@ -44,7 +42,7 @@ class RawFluxDataTable extends PureComponent<Props, State> {
autoHide={false}
scrollTop={scrollTop}
scrollLeft={scrollLeft}
setScrollTop={this.onScrollbarsScroll}
onScroll={this.onScrollbarsScroll}
>
<RawFluxDataGrid
scrollTop={scrollTop}
Expand All @@ -55,7 +53,7 @@ class RawFluxDataTable extends PureComponent<Props, State> {
data={data}
key={files[0]}
/>
</FancyScrollbar>
</DapperScrollbars>
</div>
)
}
Expand Down