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

fix(sqllab): Removed the tooltip from CopyToClipboard button in sqllab #18749

Merged
Merged
Changes from 1 commit
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
19 changes: 2 additions & 17 deletions superset-frontend/src/components/CopyToClipboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,7 @@ class CopyToClipboard extends React.Component {

renderNotWrapped() {
return (
<Tooltip
id="copy-to-clipboard-tooltip"
placement="top"
style={{ cursor: 'pointer' }}
title={this.props.tooltipText}
trigger={['hover']}
>
{this.getDecoratedCopyNode()}
</Tooltip>
this.getDecoratedCopyNode()
Copy link
Member

Choose a reason for hiding this comment

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

It was a generic component and it was used in other components. You shouldn't remove the tooltip.

image

Copy link
Member

Choose a reason for hiding this comment

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

Agreed, the solution should be prop-based. Either

  • render the tooltip conditionally (if it was passed a meaningful title)
  • provide a prop or other means (e.g. title={false}) to intentionally hide the tooltip

);
}

Expand All @@ -108,14 +100,7 @@ class CopyToClipboard extends React.Component {
{this.props.text}
</span>
)}
<Tooltip
id="copy-to-clipboard-tooltip"
placement="top"
title={this.props.tooltipText}
trigger={['hover']}
>
{this.getDecoratedCopyNode()}
</Tooltip>
{this.getDecoratedCopyNode()}
</span>
);
}
Expand Down