Skip to content

Commit

Permalink
Fix the tooltip position of copy value and JSON Buttton (#1650)
Browse files Browse the repository at this point in the history
Resolves #1649 

![Screenshot 2023-08-09
045507](https://github.com/jaegertracing/jaeger-ui/assets/81948346/774c75fd-bacf-42f0-9db4-87fce92a1bc3)

## Checklist
- [x] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [x] I have signed all commits
- [ ] I have added unit tests for the new functionality

---------

Signed-off-by: Anik Dhabal Babu <adhabal2002@gamil.com>
Signed-off-by: Anik Dhabal Babu <adhabal2002@gmail.com>
Co-authored-by: Anik Dhabal Babu <adhabal2002@gamil.com>
Co-authored-by: Yuri Shkuro <yurishkuro@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 11, 2023
1 parent 2444799 commit 848bfa0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ exports[`drawNode diffNode renders as expected when props.a and props.b are the
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -72,7 +72,7 @@ exports[`drawNode diffNode renders as expected when props.a and props.b are the
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -120,7 +120,7 @@ exports[`drawNode diffNode renders as expected when props.a is 0 1`] = `
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -186,7 +186,7 @@ exports[`drawNode diffNode renders as expected when props.a is 0 1`] = `
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -249,7 +249,7 @@ exports[`drawNode diffNode renders as expected when props.a is less than props.b
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -315,7 +315,7 @@ exports[`drawNode diffNode renders as expected when props.a is less than props.b
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -378,7 +378,7 @@ exports[`drawNode diffNode renders as expected when props.a is more than props.b
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -444,7 +444,7 @@ exports[`drawNode diffNode renders as expected when props.a is more than props.b
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -507,7 +507,7 @@ exports[`drawNode diffNode renders as expected when props.b is 0 1`] = `
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -573,7 +573,7 @@ exports[`drawNode diffNode renders as expected when props.b is 0 1`] = `
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -631,7 +631,7 @@ exports[`drawNode diffNode renders as expected when props.isUiFindMatch is true
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down Expand Up @@ -677,7 +677,7 @@ exports[`drawNode diffNode renders as expected when props.isUiFindMatch is true
className="DiffNode--copyIcon"
copyText="serviceName operationName"
icon="copy"
placement="left"
placement="top"
tooltipTitle="Copy label"
/>
</td>
Expand Down
4 changes: 2 additions & 2 deletions packages/jaeger-ui/src/components/common/CopyIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default class CopyIcon extends React.PureComponent<PropsType, StateType>
static defaultProps: Partial<PropsType> = {
className: undefined,
icon: 'copy',
placement: 'left',
placement: 'top',
};

state = {
Expand All @@ -64,7 +64,7 @@ export default class CopyIcon extends React.PureComponent<PropsType, StateType>
return (
<Tooltip
arrowPointAtCenter
mouseLeaveDelay={0.1}
mouseLeaveDelay={0}
onVisibleChange={this.handleTooltipVisibilityChange}
placement={this.props.placement}
title={this.state.hasCopied ? 'Copied' : this.props.tooltipTitle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ exports[`<CopyIcon /> renders as expected 1`] = `
arrowPointAtCenter={true}
autoAdjustOverflow={true}
mouseEnterDelay={0.1}
mouseLeaveDelay={0.1}
mouseLeaveDelay={0}
onVisibleChange={[Function]}
placement="left"
placement="top"
title="tooltipTitleValue"
transitionName="zoom-big-fast"
>
Expand Down

0 comments on commit 848bfa0

Please sign in to comment.