-
Notifications
You must be signed in to change notification settings - Fork 160
feat(tooltip): align with WC tooltip #15791
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
base: master
Are you sure you want to change the base?
Conversation
…gniteui-angular into feature/align-tooltip
…gniteui-angular into feature/align-tooltip
…into feature/align-tooltip
…gniteui-angular into feature/align-tooltip
…gniteui-angular into feature/align-tooltip
- The tooltip now remains open while interacting with it. | ||
- `IgxTooltipTarget` | ||
- Introduced a new `hasArrow` input property. Controls whether to display an arrow indicator for the tooltip. Defaults to `false`. | ||
- Introduced a new `sticky` input property. When set to `true`, the tooltip renders a default close icon `x`. The tooltip remains visible until the user closes it via the close icon `x` or `Esc` key. Defaults to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there's already hide delay, wouldn't this be equivalent of hideDelay = null or -1 for example. I don't mind the explicit option though.
- Introduced a new `placement` input property of type `TooltipPlacement`. Controls where to place the tooltip relative to the target element. Default value is `bottom`. Supported values are `top`, `top-start`, `top-end`, `bottom`, `bottom-start`, `bottom-end`, `right`, `right-start`, `right-end`, `left`, `left-start`, `left-end`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, okay so this bit is something that's already doable with the current API right? Position settings of some some sort I assume?
We might consider exposing such short-hand API for position settings, but find it really odd that being for the tooltip only;
The alignment is first API consistency within the product itself and then functionality/behavior consistency across products. If the latter involves new API, that can be synced ofc.
``` | ||
- Introduced a new `offset` input property. Controls the offset of the tooltip from the target in pixels. Default value is 6. | ||
|
||
_Note:_ If a custom `positionStrategy` is used, the `placement` and `offset` properties (if set) will not be taken into account and the arrow (if enabled) will not be displayed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eh that doesn't sound great, ideally we'd like those to work mostly permanently
Options would be to expose the PositionSettings
on the directive which do this (I think some components do this) or some other mechanic to adjust settings from the service API, need to dig some;
Also the overlay service seems to have setOffset
API that's entirely unrelated to any position strategy too (though it looks a bit sus, but still might be an option). Anyway, those should be discussed at least.
Closes #15726
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)