Skip to content

Commit f5b6ddb

Browse files
fix: scrollbar for dashboard, settings, load data and task page is Large (#3149)
1 parent 5fe9d9a commit f5b6ddb

File tree

7 files changed

+34
-24
lines changed

7 files changed

+34
-24
lines changed

cypress/e2e/shared/simpleTable.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('simple table interactions', () => {
7979
.within(() => {
8080
cy.getByTestID('button').should(
8181
'have.class',
82-
'cf-button cf-button-md cf-button-tertiary cf-button-square active'
82+
'cf-button cf-button-md cf-button-tertiary active'
8383
)
8484
})
8585
// verify correct number of pages
@@ -145,7 +145,7 @@ describe('simple table interactions', () => {
145145
.within(() => {
146146
cy.getByTestID('button').should(
147147
'have.class',
148-
'cf-button cf-button-md cf-button-tertiary cf-button-square active'
148+
'cf-button cf-button-md cf-button-tertiary active'
149149
)
150150
})
151151
// verify correct number of pages

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
},
159159
"dependencies": {
160160
"@docsearch/react": "^3.0.0-alpha.37",
161-
"@influxdata/clockface": "^3.1.0",
161+
"@influxdata/clockface": "^3.1.3",
162162
"@influxdata/flux": "^0.5.1",
163163
"@influxdata/flux-lsp-browser": "^0.5.53",
164164
"@influxdata/giraffe": "^2.20.0",

src/dashboards/components/dashboard_index/DashboardsIndex.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
// Libraries
22
import React, {PureComponent} from 'react'
3-
import {RouteComponentProps} from 'react-router-dom'
3+
import {Route, RouteComponentProps, Switch} from 'react-router-dom'
44
import {connect, ConnectedProps} from 'react-redux'
5-
import {Switch, Route} from 'react-router-dom'
65

76
// Decorators
87
import {ErrorHandling} from 'src/shared/decorators/errors'
98

109
// Components
1110
import DashboardsIndexContents from 'src/dashboards/components/dashboard_index/DashboardsIndexContents'
12-
import {Page} from '@influxdata/clockface'
11+
import {ComponentSize, Page, Sort} from '@influxdata/clockface'
1312
import SearchWidget from 'src/shared/components/search_widget/SearchWidget'
1413
import AddResourceDropdown from 'src/shared/components/AddResourceDropdown'
1514
import GetAssetLimits from 'src/cloud/components/GetAssetLimits'
@@ -29,7 +28,6 @@ import {setDashboardSort, setSearchTerm} from 'src/dashboards/actions/creators'
2928

3029
// Types
3130
import {AppState, ResourceType} from 'src/types'
32-
import {Sort} from '@influxdata/clockface'
3331
import {SortTypes} from 'src/shared/utils/sort'
3432
import {DashboardSortKey} from 'src/shared/components/resource_sort_dropdown/generateSortItems'
3533

@@ -102,6 +100,8 @@ class DashboardIndex extends PureComponent<Props, State> {
102100
className="dashboards-index__page-contents"
103101
fullWidth={false}
104102
scrollable={true}
103+
scrollbarSize={ComponentSize.Large}
104+
autoHideScrollbar={true}
105105
>
106106
<GetAssetLimits>
107107
<DashboardsIndexContents

src/settings/components/LoadDataTabbedPage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {connect, ConnectedProps} from 'react-redux'
55
// Components
66
import ErrorBoundary from 'src/shared/components/ErrorBoundary'
77
import LoadDataNavigation from 'src/settings/components/LoadDataNavigation'
8-
import {Tabs, Orientation, Page} from '@influxdata/clockface'
8+
import {ComponentSize, Orientation, Page, Tabs} from '@influxdata/clockface'
99

1010
// Utils
1111
import {getOrg} from 'src/organizations/selectors'
@@ -28,6 +28,8 @@ const LoadDataTabbedPage: FC<Props> = ({activeTab, orgID, children}) => {
2828
<Page.Contents
2929
fullWidth={false}
3030
scrollable={shouldPageBeScrollable(activeTab)}
31+
scrollbarSize={ComponentSize.Large}
32+
autoHideScrollbar={true}
3133
>
3234
<Tabs.Container
3335
orientation={Orientation.Horizontal}

src/settings/components/SettingsTabbedPage.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, {PureComponent} from 'react'
33

44
// Components
55
import SettingsNavigation from 'src/settings/components/SettingsNavigation'
6-
import {Tabs, Orientation, Page} from '@influxdata/clockface'
6+
import {ComponentSize, Orientation, Page, Tabs} from '@influxdata/clockface'
77

88
// Decorators
99
import {ErrorHandling} from 'src/shared/decorators/errors'
@@ -19,7 +19,12 @@ class SettingsTabbedPage extends PureComponent<Props> {
1919
const {activeTab, orgID, children} = this.props
2020

2121
return (
22-
<Page.Contents fullWidth={false} scrollable={true}>
22+
<Page.Contents
23+
fullWidth={false}
24+
scrollable={true}
25+
scrollbarSize={ComponentSize.Large}
26+
autoHideScrollbar={true}
27+
>
2328
<Tabs.Container orientation={Orientation.Horizontal}>
2429
<SettingsNavigation activeTab={activeTab} orgID={orgID} />
2530
<Tabs.TabContents>{children}</Tabs.TabContents>

src/tasks/containers/TasksPage.tsx

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Libraries
22
import React, {PureComponent} from 'react'
33
import {connect, ConnectedProps} from 'react-redux'
4-
import {Switch, Route} from 'react-router-dom'
4+
import {Route, RouteComponentProps, Switch} from 'react-router-dom'
55

66
// Components
77
import TasksHeader from 'src/tasks/components/TasksHeader'
88
import TasksList from 'src/tasks/components/TasksList'
9-
import {Page} from '@influxdata/clockface'
9+
import {ComponentSize, Page, Sort} from '@influxdata/clockface'
1010
import {ErrorHandling} from 'src/shared/decorators/errors'
1111
import FilterList from 'src/shared/components/FilterList'
1212
import GetResources from 'src/resources/components/GetResources'
@@ -20,12 +20,12 @@ import {isFlagEnabled} from 'src/shared/utils/featureFlag'
2020

2121
// Actions
2222
import {
23-
updateTaskStatus,
24-
updateTaskName,
25-
deleteTask,
26-
cloneTask,
2723
addTaskLabel,
24+
cloneTask,
25+
deleteTask,
2826
runTask,
27+
updateTaskName,
28+
updateTaskStatus,
2929
} from 'src/tasks/actions/thunks'
3030

3131
import {
@@ -36,9 +36,7 @@ import {
3636
import {checkTaskLimits as checkTasksLimitsAction} from 'src/cloud/actions/limits'
3737

3838
// Types
39-
import {AppState, Task, ResourceType} from 'src/types'
40-
import {RouteComponentProps} from 'react-router-dom'
41-
import {Sort} from '@influxdata/clockface'
39+
import {AppState, ResourceType, Task} from 'src/types'
4240
import {SortTypes} from 'src/shared/utils/sort'
4341
import {extractTaskLimits} from 'src/cloud/utils/limits'
4442
import {TaskSortKey} from 'src/shared/components/resource_sort_dropdown/generateSortItems'
@@ -105,7 +103,12 @@ class TasksPage extends PureComponent<Props, State> {
105103
sortType={sortType}
106104
onSort={this.handleSort}
107105
/>
108-
<Page.Contents fullWidth={false} scrollable={true}>
106+
<Page.Contents
107+
fullWidth={false}
108+
scrollable={true}
109+
scrollbarSize={ComponentSize.Large}
110+
autoHideScrollbar={true}
111+
>
109112
<GetResources resources={[ResourceType.Tasks, ResourceType.Labels]}>
110113
<GetAssetLimits>
111114
<Filter

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -855,10 +855,10 @@
855855
"@docsearch/css" "3.0.0-alpha.37"
856856
algoliasearch "^4.0.0"
857857

858-
"@influxdata/clockface@^3.1.0":
859-
version "3.1.0"
860-
resolved "https://registry.yarnpkg.com/@influxdata/clockface/-/clockface-3.1.0.tgz#71607eb036a16d2da2af4df4a42a1d5cf6b127f1"
861-
integrity sha512-2J9xPVtEa3VncRzD1CRGSaTuy5eSDUSOxvEqlx1j9kqGHNwk026bG/mvEAGY9RrDBe42NZQak906IIp6YvO95g==
858+
"@influxdata/clockface@^3.1.3":
859+
version "3.1.3"
860+
resolved "https://registry.yarnpkg.com/@influxdata/clockface/-/clockface-3.1.3.tgz#d6e4484f55d323909fc06ccfc14dc689c334a823"
861+
integrity sha512-0hAW+ZDsherbOTd+kUI57NFbgd8xp06he0vR3YtozmkO0pXHEF5YiDN+1i0OeMczJaF0gGVEF48i07nnzDjvkQ==
862862

863863
"@influxdata/flux-lsp-browser@^0.5.53":
864864
version "0.5.53"

0 commit comments

Comments
 (0)