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

Update the tooltip arrow convention. fixes #2221 #2222

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default class Selector extends PureComponent<TProps> {

return (
<Popover
arrowPointAtCenter
arrow={{ pointAtCenter: true }}
content={[decrementBtn, ...hops.map(this.makeBtn), incrementBtn]}
placement="bottom"
title={`Visible ${lowercaseLabel}`}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

exports[`Selector renders buttons with expected text and classNames 1`] = `
<Popover
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
content={
Array [
<button
Expand Down Expand Up @@ -127,7 +131,11 @@ exports[`Selector renders message when there are no options 1`] = `

exports[`Selector renders upstream hops with negative distance correctly 1`] = `
<Popover
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
content={
Array [
<button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,12 @@ export default class LayoutSettings extends React.PureComponent<TProps> {
</table>
);
return (
<Popover arrowPointAtCenter content={content} placement="bottomLeft" title="Layout settings">
<Popover
arrow={{ pointAtCenter: true }}
content={content}
placement="bottomLeft"
title="Layout settings"
>
<div className={cssCls()}>
{settingsIcon}
Layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class UnconnectedDetailsPanel extends React.PureComponent<TProps, TState>
<div className="Ddg--DetailsPanel--DecorationHeader">
<span>{stringSupplant(decorationSchema.name, { service, operation })}</span>
{detailLink && (
<Tooltip arrowPointAtCenter title="More Info">
<Tooltip arrow={{ pointAtCenter: true }} title="More Info">
<a
className="Ddg--DetailsPanel--DetailLink"
href={stringSupplant(detailLink, { service, operation })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,11 @@ exports[`<SidePanel> render renders detailLink 1`] = `
Decorating test svc
</span>
<Tooltip
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
title="More Info"
>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default class MetricCard extends React.PureComponent<TProps> {
<div className="MetricCard--Body">
<span className="MetricCard--TitleHeader">
{name}{' '}
<Tooltip arrowPointAtCenter title="Metric Documentation">
<Tooltip arrow={{ pointAtCenter: true }} title="Metric Documentation">
<a href={metricDocumentationLink} target="_blank" rel="noreferrer noopener">
<NewWindowIcon />
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ exports[`MetricCard renders as expected when passCount is zero 1`] = `
Metric Name

<Tooltip
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
title="Metric Documentation"
>
<a
Expand Down Expand Up @@ -101,7 +105,11 @@ exports[`MetricCard renders as expected with details 1`] = `
Metric Name

<Tooltip
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
title="Metric Documentation"
>
<a
Expand Down Expand Up @@ -220,7 +228,11 @@ exports[`MetricCard renders as expected without details 1`] = `
Metric Name

<Tooltip
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
title="Metric Documentation"
>
<a
Expand Down Expand Up @@ -297,7 +309,11 @@ exports[`MetricCard renders as expected without details 2`] = `
Metric Name

<Tooltip
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
title="Metric Documentation"
>
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function TracePageSearchBarFn(props: TracePageSearchBarProps & { forwarde
trackFindFunction={trackFilter}
/>
<Tooltip
arrowPointAtCenter
arrow={{ pointAtCenter: true }}
placement="bottomLeft"
trigger="hover"
overlayStyle={{ maxWidth: '600px' }} // This is a large tooltip and the default is too narrow.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export default class ReferencesButton extends React.PureComponent<TReferencesBut
const { references, children, tooltipText, focusSpan } = this.props;

const tooltipProps = {
arrowPointAtCenter: true,
pointAtCenter: true,
mouseLeaveDelay: 0.5,
placement: 'bottom' as TooltipPlacement,
title: tooltipText,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function SpanBar(props: TCommonProps) {
{Object.keys(logGroups).map(positionKey => (
<Popover
key={positionKey}
arrowPointAtCenter
arrow={{ pointAtCenter: true }}
overlayClassName="SpanBar--logHint"
placement="topLeft"
content={
Expand Down
2 changes: 1 addition & 1 deletion packages/jaeger-ui/src/components/common/CopyIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default class CopyIcon extends React.PureComponent<PropsType, StateType>
render() {
return (
<Tooltip
arrowPointAtCenter
arrow={{ pointAtCenter: true }}
mouseLeaveDelay={0}
onOpenChange={this.handleTooltipVisibilityChange}
placement={this.props.placement}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

exports[`<CopyIcon /> renders as expected 1`] = `
<Tooltip
arrowPointAtCenter={true}
arrow={
Object {
"pointAtCenter": true,
}
}
mouseLeaveDelay={0}
onOpenChange={[Function]}
placement="top"
Expand Down
Loading