Skip to content

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

Open
wants to merge 30 commits into
base: master
Choose a base branch
from
Open

Conversation

RivaIvanova
Copy link
Member

Closes #15726

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them

@RivaIvanova RivaIvanova added 🛠️ status: in-development Issues and PRs with active development on them tooltip labels May 12, 2025
RivaIvanova and others added 27 commits May 12, 2025 11:56
- 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`.
Copy link
Member

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.

Comment on lines +29 to +30
- 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`.

Copy link
Member

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.
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️ status: in-development Issues and PRs with active development on them tooltip
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tooltip] Align the tooltip with the implementation in WC
4 participants