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

feat(Tooltip): render arrow with pseudo element #2656

Open
wants to merge 4 commits into
base: next
Choose a base branch
from
Open

Conversation

Barsnes
Copy link
Member

@Barsnes Barsnes commented Oct 22, 2024

resolves #2653 also ports over #2657

Copy link

changeset-bot bot commented Oct 22, 2024

⚠️ No Changeset found

Latest commit: 8540ce4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Oct 22, 2024

Preview deployments for this pull request:

Storybook - 23. Oct 2024 - 09:47

Copy link
Contributor

github-actions bot commented Oct 22, 2024

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 57.94% 3646 / 6292
🔵 Statements 57.94% 3646 / 6292
🔵 Functions 84% 168 / 200
🔵 Branches 75.58% 517 / 684
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/react/src/components/Tooltip/Tooltip.tsx 95.49% 81.81% 100% 95.49% 133-137
Generated in workflow #507 for commit 8540ce4 by the Vitest Coverage Report Action

@Barsnes Barsnes marked this pull request as ready for review October 22, 2024 12:43
Barsnes added a commit that referenced this pull request Oct 23, 2024
resolves #2657

This only solves it for popover, since tooltip does not have pseudo
element yet, Will solve this for tooltip in #2656
@Barsnes Barsnes marked this pull request as draft October 23, 2024 06:36
@Barsnes Barsnes marked this pull request as ready for review October 23, 2024 06:40
Comment on lines +29 to +43
&[data-placement='top']::before {
top: 100%;
}

&[data-placement='left']::before {
left: 100%;
}

&[data-placement='right']::before {
left: 0;
}

&[data-placement='bottom']::before {
top: 0;
}
Copy link
Member Author

Choose a reason for hiding this comment

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

I copied this from Popover, but would it be better to do this in the floating function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tooltip: simplify arrow
1 participant