Skip to content

Commit

Permalink
cluster-ui: remove divider and transparent button on timescale
Browse files Browse the repository at this point in the history
Previously, the timescale dropdown component had transparent button
backgrounds and by default a divider to the left of the dropdown. This
commit removes the divider from the base component and make the button
backgrounds solid to make the component more reusable.

Release note: None
  • Loading branch information
xinhaoz committed Dec 14, 2021
1 parent 42055b0 commit 5e1c761
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import React from "react";
import { RouteComponentProps } from "react-router-dom";
import { isNil, merge } from "lodash";
import moment, { Moment } from "moment";
import classNames from "classnames/bind";
import { Loading } from "src/loading";
import { PageConfig, PageConfigItem } from "src/pageConfig";
Expand All @@ -23,7 +22,6 @@ import {
} from "src/sortedtable";
import { Search } from "src/search";
import { Pagination } from "src/pagination";
import { DateRange } from "src/dateRange";
import { TableStatistics } from "../tableStatistics";
import {
Filter,
Expand Down Expand Up @@ -69,14 +67,14 @@ import { StatementsRequest } from "src/api/statementsApi";
import Long from "long";
import ClearStats from "../sqlActivity/clearStats";
import SQLActivityError from "../sqlActivity/errorComponent";
import { commonStyles } from "../common";
import {
TimeScaleDropdown,
defaultTimeScaleSelected,
TimeScale,
toDateRange,
} from "../timeScaleDropdown";

import { commonStyles } from "../common";
const cx = classNames.bind(styles);
const sortableTableCx = classNames.bind(sortableTableStyles);

Expand Down Expand Up @@ -557,7 +555,7 @@ export class StatementsPage extends React.Component<
showNodes={nodes.length > 1}
/>
</PageConfigItem>
<PageConfigItem>
<PageConfigItem className={commonStyles("separator")}>
<TimeScaleDropdown
currentScale={this.props.timeScale}
setTimeScale={this.changeTimeScale}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
._action, ._action > button {
margin-right: 0px;
border-color: $colors--neutral-4;
background-color: transparent;
width: 40px;
height: 40px;
font-size: 21px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import React, { useMemo } from "react";
import moment from "moment";
import { Divider } from "antd";
import classNames from "classnames/bind";
import {
TimeRangeTitle,
Expand Down Expand Up @@ -237,7 +236,6 @@ export const TimeScaleDropdown: React.FC<TimeScaleDropdownProps> = ({

return (
<div className={cx("timescale")}>
<Divider type="vertical" />
<RangeSelect
selected={getTimeRangeTitle(currentWindow, currentScale)}
onChange={onOptionSelect}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ export class TransactionsPage extends React.Component<
showNodes={nodes.length > 1}
/>
</PageConfigItem>
<PageConfigItem>
<PageConfigItem className={commonStyles("separator")}>
<TimeScaleDropdown
currentScale={this.props.timeScale}
setTimeScale={this.changeTimeScale}
Expand Down

0 comments on commit 5e1c761

Please sign in to comment.