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(web): activity feed tooltip issue #2687

Merged
merged 1 commit into from
Feb 7, 2023
Merged

Conversation

LetItRock
Copy link
Contributor

What change does this PR introduce?

The Activity Feed tooltip on the bar was not showing up.

Why was this change needed?

Other information (Screenshots)

Screenshot 2023-02-06 at 13 05 22
Screenshot 2023-02-06 at 13 05 32

@LetItRock LetItRock self-assigned this Feb 6, 2023
@@ -154,7 +154,7 @@ function updateToolTipStyles(context, tooltipEl: HTMLElement, tooltipModel) {

/* eslint-disable no-param-reassign */
tooltipEl.style.opacity = '1';
tooltipEl.style.left = `${position.left + window.scrollX + tooltipModel.caretX - tooltipModel.width - 40}px`;
tooltipEl.style.left = `${position.left + window.scrollX + tooltipModel.caretX - tooltipModel.width - 30}px`;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't know why but this magic number worked before it was 40.
I've tried to calculate it differently with translateX but it was not working.

@@ -23,6 +22,7 @@ function chartStyles(isTriggerSent: boolean, isDark: boolean) {
padding: 12px 15px 14px 15px;
pointer-events: none;
position: absolute;
z-index: 1;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

z index issue, tooltip was hidden behind the chart

@@ -14,7 +14,6 @@ function chartStyles(isTriggerSent: boolean, isDark: boolean) {
}

#chartjs-tooltip {
width: 190px;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it looks much better without this constraint

Copy link
Contributor

@scopsy scopsy left a comment

Choose a reason for hiding this comment

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

Good Catch!

@LetItRock LetItRock merged commit 4f9c299 into next Feb 7, 2023
@LetItRock LetItRock deleted the fix-activity-graph-tooltip branch February 7, 2023 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants