Skip to content
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
04d3a1b
refactor(tooltip): change delay props; change methods to not respect …
RivaIvanova May 12, 2025
61e7f2f
docs(tooltip-target): update methods in readme
RivaIvanova May 12, 2025
07eefb7
feat(tooltip): hover on tooltip does not close it
RivaIvanova May 14, 2025
aad5727
feat(tooltip): Add custom close button and disable arrow functionality
Zneeky May 14, 2025
9e27017
Merge branch 'feature/align-tooltip' of https://github.com/IgniteUI/i…
Zneeky May 14, 2025
a0434de
fix(tooltip): set initially arrow to display none
Zneeky May 14, 2025
e647bf8
fix(tooltip): add check for multiple targets
RivaIvanova May 15, 2025
d42cbd6
test(tooltip): update tests with auto hide delay
RivaIvanova May 15, 2025
39bb9e2
fix(tooltip-close-icon): resolve circular dependency
RivaIvanova May 15, 2025
4923baa
feat(tooltip): add custom close button template
Zneeky May 16, 2025
c5ff1bd
fix(tooltip-target): fix animation duration mistake
Zneeky May 16, 2025
f6bc028
feat(tooltip): add arrow, placement, offset
RivaIvanova May 16, 2025
ff9aaa5
feat(tooltip): add arrow and close btn styles
didimmova May 19, 2025
f15008d
feat(tooltip): tooltip sticky functionality for multiple targets
Zneeky May 19, 2025
16fa3f3
Merge branch 'feature/align-tooltip' of https://github.com/IgniteUI/i…
Zneeky May 19, 2025
45a0570
test(tooltip): fixed minor mistake in tests
Zneeky May 19, 2025
ad586fa
feat(tooltip): update displays
didimmova May 20, 2025
d312fcc
style(tooltip): add width to fit content
didimmova May 20, 2025
f6864c9
test(tooltip): added tests for placement and offset
Zneeky May 21, 2025
b7ed915
feat(tooltip): adjust arrow position
RivaIvanova May 21, 2025
8d721be
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
RivaIvanova May 21, 2025
9f59e70
Merge branch 'feature/align-tooltip' of https://github.com/IgniteUI/i…
Zneeky May 21, 2025
5f17cec
test(tooltip): add tests for arrow
Zneeky May 21, 2025
4867e8a
refactor(tooltip): update sticky logic and add additional tests
Zneeky May 21, 2025
1a7d51a
fix(tooltip): placement to bottom, no arrow by default, arrow multi t…
RivaIvanova May 22, 2025
c0cffab
fix(tooltip-sample): rename disableArrow prop
RivaIvanova May 22, 2025
8f6fc7a
fix(tooltip): consolidate tooltip show checks into a single method
Zneeky May 22, 2025
44270f8
Merge branch 'feature/align-tooltip' of https://github.com/IgniteUI/i…
Zneeky May 22, 2025
e4d3022
docs(tooltip): update changelog and hasArrow description
RivaIvanova May 23, 2025
aca241e
Merge branch 'master' into feature/align-tooltip
RivaIvanova May 28, 2025
46aefa7
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
RivaIvanova Jun 4, 2025
200e46b
test(tooltip): update touch tests
RivaIvanova Jun 4, 2025
ce01163
feat(overlay): add placement and offset
RivaIvanova Jun 4, 2025
49a2445
feat(tooltip): allow using custom strategies with arrow
RivaIvanova Jun 5, 2025
4dcc5b2
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
RivaIvanova Jun 9, 2025
76cbbe2
fix(tooltip): use default pos settings and expose tooltip pos strategy
RivaIvanova Jun 9, 2025
47cc6f7
fix(tooltip-position-strategy): resolve circular dependency
RivaIvanova Jun 9, 2025
c386bdf
fix(position-strategies): check for defined offset
RivaIvanova Jun 9, 2025
028ea97
fix(tooltip): remove placement property
RivaIvanova Jun 10, 2025
0c00ba5
refactor(tooltip): use tooltipTarget mouse handlers
RivaIvanova Jun 10, 2025
3f2dfc3
refactor(position-strategies): add base getElementOffsets
RivaIvanova Jun 10, 2025
45d9a02
fix(tooltip): create arrow as span
RivaIvanova Jun 11, 2025
73286ac
Merge branch 'master' into feature/align-tooltip
RivaIvanova Jun 30, 2025
c154487
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
RivaIvanova Jul 9, 2025
880f9a8
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
RivaIvanova Jul 21, 2025
dae25d8
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
RivaIvanova Jul 31, 2025
5211828
Merge branch 'master' into feature/align-tooltip
RivaIvanova Jul 31, 2025
94ec8b8
test(grid-validation): fix failing test
RivaIvanova Aug 1, 2025
4732d61
Merge branch 'master' of https://github.com/IgniteUI/igniteui-angular…
RivaIvanova Aug 4, 2025
026d957
Merge branch 'master' into feature/align-tooltip
RivaIvanova Aug 6, 2025
7e3ecf0
Merge branch 'master' into feature/align-tooltip
RivaIvanova Aug 12, 2025
7301b0e
docs(tooltip): add changes to tooltip readme
RivaIvanova Aug 12, 2025
d805b06
Merge branch 'master' into feature/align-tooltip
RivaIvanova Aug 18, 2025
531fa89
fix(tooltip-theme): add default cursor to igx-tooltip-close-button
Zneeky Aug 19, 2025
da3b479
Merge branch 'master' into feature/align-tooltip
RivaIvanova Aug 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,89 @@ All notable changes for each version of this project will be documented in this
this.carousel.select(2, Direction.NEXT);
```

- `IgxOverlay`
- Position Settings now accept a new optional `offset` input property of type `number`. Used to set the offset of the element from the target in pixels.

- `IgxTooltip`
- The tooltip now remains open while interacting with it.
- `IgxTooltipTarget`
- Introduced a new `positionSettings` input property. Controls the position and animation settings used by the tooltip.
- 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.

- Introduced a new `closeButtonTemplate` input property that allows templating the default close icon `x`.
Copy link
Member

Choose a reason for hiding this comment

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

I would avoid explaining this in such detail in the changelog. There are component READMEs for this purpose and the Changelog can link to them. Please trim this substantially in favor of a robust tooltip README of how everything works now

```html
<igx-icon [igxTooltipTarget]="tooltipRef" [closeButtonTemplate]="customClose">info</igx-icon>
<span #tooltipRef="tooltip" igxTooltip>Hello there, I am a tooltip!</span>

<ng-template #customClose>
<button igxButton>Close</button>
</ng-template>
```

- Introduced a new `hasArrow` input property. Controls whether to display an arrow indicator for the tooltip. Defaults to `false`.

_Note:_ The tooltip uses the `TooltipPositionStrategy` to position the tooltip and arrow element. If a custom position strategy is used (`overlaySettings.positionStrategy`) and `hasArrow` is set to `true`, the custom strategy should extend the `TooltipPositionStrategy`. Otherwise, the arrow will not be displayed.

_Note:_ The arrow element is positioned based on the provided position settings. If the directions and starting points do not correspond to any of the predefined position values, the arrow is positioned in the top middle side of the tooltip (default tooltip position `bottom`).


| Position     | Horizontal Direction          | Horizontal Start Point         | Vertical Direction            | Vertical Start Point           |
|--------------|-------------------------------|--------------------------------|-------------------------------|--------------------------------|
| top          | HorizontalAlignment.Center    | HorizontalAlignment.Center     | VerticalAlignment.Top         | VerticalAlignment.Top          |
| top-start    | HorizontalAlignment.Right     | HorizontalAlignment.Left       | VerticalAlignment.Top         | VerticalAlignment.Top          |
| top-end      | HorizontalAlignment.Left      | HorizontalAlignment.Right      | VerticalAlignment.Top         | VerticalAlignment.Top          |
| bottom       | HorizontalAlignment.Center    | HorizontalAlignment.Center     | VerticalAlignment.Bottom      | VerticalAlignment.Bottom       |
| bottom-start | HorizontalAlignment.Right     | HorizontalAlignment.Left       | VerticalAlignment.Bottom      | VerticalAlignment.Bottom       |
| bottom-end   | HorizontalAlignment.Left      | HorizontalAlignment.Right      | VerticalAlignment.Bottom      | VerticalAlignment.Bottom       |
| right        | HorizontalAlignment.Right     | HorizontalAlignment.Right      | VerticalAlignment.Middle      | VerticalAlignment.Middle       |
| right-start  | HorizontalAlignment.Right     | HorizontalAlignment.Right      | VerticalAlignment.Bottom      | VerticalAlignment.Top          |
| right-end    | HorizontalAlignment.Right     | HorizontalAlignment.Right      | VerticalAlignment.Top         | VerticalAlignment.Bottom       |
| left         | HorizontalAlignment.Left      | HorizontalAlignment.Left       | VerticalAlignment.Middle      | VerticalAlignment.Middle       |
| left-start   | HorizontalAlignment.Left      | HorizontalAlignment.Left       | VerticalAlignment.Bottom      | VerticalAlignment.Top          |
| left-end     | HorizontalAlignment.Left      | HorizontalAlignment.Left       | VerticalAlignment.Top         | VerticalAlignment.Bottom       |


The arrow's position can be customized by overriding the `positionArrow(arrow: HTMLElement, arrowFit: ArrowFit)` method.

For example:

```ts
export class CustomStrategy extends TooltipPositioningStrategy {
constructor(settings?: PositionSettings) {
super(settings);
}

public override positionArrow(arrow: HTMLElement, arrowFit: ArrowFit): void {
Object.assign(arrow.style, {
left: '-0.25rem',
transform: 'rotate(-45deg)',
[arrowFit.direction]: '-0.25rem',
});
}
}

public overlaySettings: OverlaySettings = {
positionStrategy: new CustomStrategy({
horizontalDirection: HorizontalAlignment.Right,
horizontalStartPoint: HorizontalAlignment.Right,
verticalDirection: VerticalAlignment.Bottom,
verticalStartPoint: VerticalAlignment.Bottom,
})
};
```

```html
<igx-icon [igxTooltipTarget]="tooltipRef" [hasArrow]="true" [overlaySettings]="overlaySettings">info</igx-icon>
<span #tooltipRef="tooltip" igxTooltip>Hello there, I am a tooltip!</span>
```

### General
- `IgxDropDown` now exposes a `role` input property, allowing users to customize the role attribute based on the use case. The default is `listbox`.

- `IgxTooltipTarget`
- **Behavioral Changes**
- The `showDelay` input property now defaults to `200`.
- The `hideDelay` input property now defaults to `300`.
- The `showTooltip` and `hideTooltip` methods do not take `showDelay`/`hideDelay` into account.

## 20.0.6
### General
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,22 @@

@extend %tooltip-display !optional;

@include m(top) {
@extend %arrow--top !optional;
}

@include m(bottom) {
@extend %arrow--bottom !optional;
}

@include m(left) {
@extend %arrow--left !optional;
}

@include m(right) {
@extend %arrow--right !optional;
}

@include m(hidden) {
@extend %tooltip--hidden !optional;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,57 @@
@include css-vars($theme);
$variant: map.get($theme, '_meta', 'theme');

$transparent-border: rem(4px) solid transparent;
$color-border: rem(4px) solid var-get($theme, 'background');

%tooltip-display {
display: inline-flex;
justify-content: center;
flex-flow: column wrap;
display: flex;
align-items: flex-start;
text-align: start;
background: var-get($theme, 'background');
color: var-get($theme, 'text-color');
border-radius: var-get($theme, 'border-radius');
box-shadow: map.get($theme, 'shadow');
margin: 0 auto;
padding: 0 rem(8px);
padding: rem(4px) rem(8px);
gap: rem(8px);
min-height: rem(24px);
min-width: rem(24px);
max-width: 200px;
width: fit-content;

igx-icon {
--component-size: 1;
}

@if $variant == 'indigo' {
padding: rem(4px) rem(8px);
igx-tooltip-close-button {
display: flex;
}
}

%arrow--top {
border-left: $transparent-border;
border-right: $transparent-border;
border-top: $color-border;
}

%arrow--bottom {
border-left: $transparent-border;
border-right: $transparent-border;
border-bottom: $color-border;
}

%arrow--left {
border-top: $transparent-border;
border-bottom: $transparent-border;
border-left: $color-border;
}

%arrow--right {
border-top: $transparent-border;
border-bottom: $transparent-border;
border-right: $color-border;
}

%tooltip--hidden {
display: none;
}
Expand All @@ -45,6 +79,7 @@
}
} @else {
%tooltip-display {
line-height: rem(16px);
font-size: rem(10px);
font-weight: 600;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Since the **IgxTooltip** directive extends the **IgxToggle** directive and there
### Methods
| Name | Type | Arguments | Description |
| :--- |:--- | :--- | :--- |
| showTooltip | void | N/A | Shows the tooltip after the amount of ms specified by the `showDelay` property. |
| hideTooltip | void | N/A | Hides the tooltip after the amount of ms specified by the `hideDelay` property. |
| showTooltip | void | N/A | Shows the tooltip. |
| hideTooltip | void | N/A | Hides the tooltip. |

### Events
|Name|Description|Cancelable|Event arguments|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { IgxTooltipDirective } from './tooltip.directive';

export * from './tooltip.directive';
export * from './tooltip-target.directive';
export { ArrowFit, TooltipPositionStrategy } from './tooltip.common';

/* NOTE: Tooltip directives collection for ease-of-use import in standalone components scenario */
export const IGX_TOOLTIP_DIRECTIVES = [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Component, Output, EventEmitter, HostListener, Input, TemplateRef } from '@angular/core';
import { IgxIconComponent } from '../../icon/icon.component';
import { CommonModule } from '@angular/common';

@Component({
selector: 'igx-tooltip-close-button',
template: `
<ng-container *ngIf="customTemplate; else defaultTemplate">
<ng-container *ngTemplateOutlet="customTemplate"></ng-container>
</ng-container>
<ng-template #defaultTemplate>
<igx-icon aria-hidden="true" family="default" name="close"></igx-icon>
</ng-template>
`,
imports: [IgxIconComponent, CommonModule],
})
export class IgxTooltipCloseButtonComponent {
@Input()
public customTemplate: TemplateRef<any>;

@Output()
public clicked = new EventEmitter<void>();

@HostListener('click')
public handleClick() {
this.clicked.emit();
}
}
Loading
Loading