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

Proposal to update tooltip placement logic #586

Closed
joshblack opened this issue Feb 16, 2018 · 3 comments
Closed

Proposal to update tooltip placement logic #586

joshblack opened this issue Feb 16, 2018 · 3 comments

Comments

@joshblack
Copy link
Contributor

This issue corresponds to the work done in #583 and is being used to organize groups who may have implemented their own placement logic.

Would love to hear @asudoh's opinions on the work he's introduced in #583. I believe @scottnath also has been doing some work here to update the tooltip logic that we need to sync-up on.

I'm unsure of what the requirements are here for the placement logic so would love for either Akira or Scott to suggest what the requirements are here.

@marijohannessen
Copy link
Contributor

@joshblack @asudoh any update here?

@joshblack
Copy link
Contributor Author

None on my end 👍

@asudoh
Copy link
Contributor

asudoh commented Jun 22, 2018

Given this issue seems more for discussion, some background - Floating menu is hostile to modern web development approaches, and tend to involve complex layout calculation if we don’t do it carefully.

Because of that, the goal of the floating menu placement logic is keeping it as minimum as possible, basically deliberately limiting it to calculating the position of edges of the trigger button relative to the top/left corner of the viewport. We use “adjustment” mechanism for others like arrow size, and expose it as objMenuOffset option (which can take a function) in overflow menu and tooltip so that application can override it.

There were some issues with IE that have been fixed. There is a request for using alternative DOM element as the target (stemming from a focus issue, etc.) that I’ve been considering.

Other issues are tracked individually and can be worked around by using the adjustment mechanism. Hope it helps!

joshblack pushed a commit to joshblack/carbon that referenced this issue May 2, 2019
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

No branches or pull requests

4 participants