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

Use DapperScrollbars in inline label editor #13584

Merged
merged 5 commits into from
Apr 23, 2019
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
1. [13560](https://github.com/influxdata/influxdb/pull/13560): Add option to generate all access token in tokens tab

### Bug Fixes
1. [13584](https://github.com/influxdata/influxdb/pull/13584): Fixed scroll clipping found in label editing flow
1. [13585](https://github.com/influxdata/influxdb/pull/13585): Prevent overlapping text and dot in time range dropdown

### UI Improvements
Expand Down
8 changes: 3 additions & 5 deletions ui/src/shared/components/inlineLabels/InlineLabelsEditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,8 @@ $inline-labels--popover-caret: 12px;
.inline-labels--list-container {
background-color: $g3-castle;
border-radius: $radius;
overflow: hidden;
margin-top: $ix-marg-a;
}

.inline-labels--list-container .fancy-scroll--track-h {
display: none;
overflow: hidden;
}

.inline-labels--list {
Expand Down Expand Up @@ -86,6 +82,8 @@ $inline-labels--popover-caret: 12px;
font-weight: 500;
color: $g11-sidewalk;
transition: background-color 0.25s ease, color 0.25s ease;
word-break: break-all;
word-wrap: break-word;

strong {
font-weight: 900;
Expand Down
12 changes: 8 additions & 4 deletions ui/src/shared/components/inlineLabels/InlineLabelsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import React, {Component} from 'react'
import _ from 'lodash'

// Components
import {EmptyState} from '@influxdata/clockface'
import FancyScrollbar from 'src/shared/components/fancy_scrollbar/FancyScrollbar'
import {EmptyState, DapperScrollbars} from '@influxdata/clockface'
import InlineLabelsListItem from 'src/shared/components/inlineLabels/InlineLabelsListItem'
import InlineLabelsCreateLabelButton from 'src/shared/components/inlineLabels/InlineLabelsCreateLabelButton'

Expand Down Expand Up @@ -33,9 +32,14 @@ class InlineLabelsList extends Component<Props> {
public render() {
return (
<div className="inline-labels--list-container">
<FancyScrollbar autoHide={false} autoHeight={true} maxHeight={250}>
<DapperScrollbars
autoSize={true}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn’t this already the default value?

autoHide={false}
style={{maxWidth: '100%', maxHeight: '300px'}}
noScrollX={true}
>
<div className="inline-labels--list">{this.menuItems}</div>
</FancyScrollbar>
</DapperScrollbars>
</div>
)
}
Expand Down