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

[Bug]: DefinitionTooltip issue with align property #12287

Closed
2 tasks done
tw15egan opened this issue Oct 11, 2022 · 4 comments
Closed
2 tasks done

[Bug]: DefinitionTooltip issue with align property #12287

tw15egan opened this issue Oct 11, 2022 · 4 comments
Assignees
Labels
component: tooltip good first issue 👋 Used by GitHub to elevate contribution opportunities role: dev 🤖 severity: 3 User can complete task, and/or has a workaround type: bug 🐛

Comments

@tw15egan
Copy link
Member

Package

@carbon/styles

Browser

Chrome

Package version

@carbon/react v1.14.0

React version

v16

Description

When working on carbon-design-system/carbon-website#3104 I noticed that the align property was not calculating the caret position properly. Popover and Tooltip do not seem to have this issue

2022-10-11 13 08 34

Reproduction/example

See above

Steps to reproduce

Go to DefinitionTooltip and try changing the align property, and compare it with Popover and Tooltip

Code of Conduct

@tay1orjones tay1orjones added severity: 3 User can complete task, and/or has a workaround good first issue 👋 Used by GitHub to elevate contribution opportunities labels Oct 13, 2022
@FionaDL
Copy link

FionaDL commented Oct 19, 2022

Hello, I would like to work on this :)

@tw15egan
Copy link
Member Author

All yours, @FionaDL 👍🏻

@FionaDL
Copy link

FionaDL commented Oct 20, 2022

Hello, we were only able to reproduce this bug in the playground, but the default seemed to be working. We think it has something to do with binding the arguments to the Playground story, as that is the only difference we could find. We were not able to solve this though. If someone else wants to work on this, please allow them, otherwise we will keep poking around.

@riddhybansal
Copy link
Contributor

It works as intended, The caret position depends upon the size of the base word. If the user wants to make it more customise or more precise , they can override the classes as per there usage.

Moreover, The Caret positioning can be improved with the usage of floating UI. This will position the floating tooltip element at the position based on the alignment attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tooltip good first issue 👋 Used by GitHub to elevate contribution opportunities role: dev 🤖 severity: 3 User can complete task, and/or has a workaround type: bug 🐛
Projects
Archived in project
Development

No branches or pull requests

5 participants