mirror of
https://github.com/apache/superset.git
synced 2026-05-12 19:35:17 +00:00
refactor: Replace react-bootstrap tooltips with Antd tooltips (#11737)
* Refactor tooltip in ColumnElement * Refactor tooltip for Button * Remove redundant import * Refactor tooltip in SqlEditor * Increase line height in tooltip so that the text is centered * Refactor tooltip in Link * Refactor tooltip in AdhocMetricEditPopoverTitle * Refactor tooltip from ControlHeader * Refactor tooltip in DateFilterControl * Refactor tooltip in VizTypeControl * fixup! Refactor tooltip in AdhocMetricEditPopoverTitle * Refactor tooltip in QueryAndSaveBtns * fixup! Refactor tooltip in DateFilterControl * Refactor tooltip in CopyToClipboard, fix cursor pointer * Refactor tooltip in TooltipWrapper * Refactor tooltip in Field/DatasourceEditor * Remove redundant import * Fix typing for placement prop * Decrease margin in ColumnElement divider * Change default export to named * Move SqlLab Tooltip styles to Emotion * Fix tests
This commit is contained in:
committed by
GitHub
parent
75086f8979
commit
9b68b65568
@@ -23,7 +23,7 @@ import { t, styled } from '@superset-ui/core';
|
||||
import { ColumnOption, MetricOption } from '@superset-ui/chart-controls';
|
||||
|
||||
import { Dropdown, Menu } from 'src/common/components';
|
||||
import Tooltip from 'src/common/components/Tooltip';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import Icon from 'src/components/Icon';
|
||||
import ChangeDatasourceModal from 'src/datasource/ChangeDatasourceModal';
|
||||
import DatasourceModal from 'src/datasource/DatasourceModal';
|
||||
|
||||
@@ -18,14 +18,8 @@
|
||||
*/
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
FormControl,
|
||||
FormGroup,
|
||||
InputGroup,
|
||||
OverlayTrigger,
|
||||
Radio,
|
||||
Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
import { FormControl, FormGroup, InputGroup, Radio } from 'react-bootstrap';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import Popover from 'src/common/components/Popover';
|
||||
import { Select, Input } from 'src/common/components';
|
||||
import Button from 'src/components/Button';
|
||||
@@ -427,14 +421,11 @@ class DateFilterControl extends React.Component {
|
||||
|
||||
return (
|
||||
<TimeFramesStyles key={timeFrame}>
|
||||
<OverlayTrigger
|
||||
<Tooltip
|
||||
id={`tooltip-${timeFrame}`}
|
||||
key={timeFrame}
|
||||
placement="right"
|
||||
overlay={
|
||||
<Tooltip id={`tooltip-${timeFrame}`}>
|
||||
{formatTimeRange(timeRange, this.props.endpoints)}
|
||||
</Tooltip>
|
||||
}
|
||||
title={formatTimeRange(timeRange, this.props.endpoints)}
|
||||
>
|
||||
<div style={{ display: 'inline-block' }}>
|
||||
<Radio
|
||||
@@ -445,7 +436,7 @@ class DateFilterControl extends React.Component {
|
||||
{timeFrame}
|
||||
</Radio>
|
||||
</div>
|
||||
</OverlayTrigger>
|
||||
</Tooltip>
|
||||
</TimeFramesStyles>
|
||||
);
|
||||
});
|
||||
|
||||
@@ -18,14 +18,9 @@
|
||||
*/
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
Row,
|
||||
Col,
|
||||
FormControl,
|
||||
OverlayTrigger,
|
||||
Tooltip,
|
||||
} from 'react-bootstrap';
|
||||
import { Row, Col, FormControl } from 'react-bootstrap';
|
||||
import { t, getChartMetadataRegistry } from '@superset-ui/core';
|
||||
import { Tooltip } from 'src/common/components/Tooltip';
|
||||
import Modal from 'src/common/components/Modal';
|
||||
import Label from 'src/components/Label';
|
||||
import ControlHeader from '../ControlHeader';
|
||||
@@ -181,13 +176,10 @@ const VizTypeControl = props => {
|
||||
return (
|
||||
<div>
|
||||
<ControlHeader {...props} />
|
||||
<OverlayTrigger
|
||||
<Tooltip
|
||||
id="error-tooltip"
|
||||
placement="right"
|
||||
overlay={
|
||||
<Tooltip id="error-tooltip">
|
||||
{t('Click to change visualization type')}
|
||||
</Tooltip>
|
||||
}
|
||||
title={t('Click to change visualization type')}
|
||||
>
|
||||
<>
|
||||
<Label onClick={toggleModal} bsStyle={labelBsStyle}>
|
||||
@@ -200,7 +192,7 @@ const VizTypeControl = props => {
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</OverlayTrigger>
|
||||
</Tooltip>
|
||||
<Modal
|
||||
show={showModal}
|
||||
onHide={toggleModal}
|
||||
|
||||
Reference in New Issue
Block a user