-
Notifications
You must be signed in to change notification settings - Fork 116
fix(core/tooltip): update padding and align icon size with figma #2189
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
Merged
danielleroux
merged 8 commits into
siemens:main
from
lakshmi-priya-b:fix-2720/tooltip-icon-padding-misalign
Nov 11, 2025
+226
−14
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ba38dab
update tooltip padding and icon-size
lakshmi-priya-b f41b180
test(vrt): Update visual regression snapshots for tooltip and other c…
lakshmi-priya-b ce15c60
add examples for tooltip with icon
lakshmi-priya-b 4eb9adb
Create smooth-snails-retire.md
nuke-ellington 931ab90
Merge branch 'main' of https://github.com/lakshmi-priya-b/ix into fix…
lakshmi-priya-b be59faf
solve sonar issue
lakshmi-priya-b 13bb765
update JSDocs for the tooltip icon slot element
lakshmi-priya-b f96237a
Merge remote-tracking branch 'origin/main' into fix-2720/tooltip-icon…
danielleroux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
packages/angular-standalone-test-app/src/preview-examples/tooltip-with-icon.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: 2025 Siemens AG | ||
|
|
||
| SPDX-License-Identifier: MIT | ||
|
|
||
| This source code is licensed under the MIT license found in the | ||
| LICENSE file in the root directory of this source tree. | ||
| --> | ||
|
|
||
| <ix-button class="any-class" aria-describedby="tooltip-1">Hover me</ix-button> | ||
| <ix-tooltip id="tooltip-1" for=".any-class"> | ||
| <ix-icon slot="title-icon" name="info"></ix-icon> | ||
| <div slot="title-content">Tooltip Title</div> | ||
| Simple selector with icon | ||
| </ix-tooltip> |
19 changes: 19 additions & 0 deletions
19
packages/angular-standalone-test-app/src/preview-examples/tooltip-with-icon.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2025 Siemens AG | ||
| * | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| import { Component } from '@angular/core'; | ||
| import { IxButton, IxIcon, IxTooltip } from '@siemens/ix-angular/standalone'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-example', | ||
| imports: [IxButton, IxTooltip, IxIcon], | ||
| templateUrl: './tooltip-with-icon.html', | ||
| styleUrls: ['./tooltip.css'], | ||
| }) | ||
| export default class Tooltip {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/angular-test-app/src/preview-examples/tooltip-with-icon.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: 2024 Siemens AG | ||
|
|
||
| SPDX-License-Identifier: MIT | ||
|
|
||
| This source code is licensed under the MIT license found in the | ||
| LICENSE file in the root directory of this source tree. | ||
| --> | ||
|
|
||
| <ix-button class="any-class" aria-describedby="tooltip-1">Hover me</ix-button> | ||
| <ix-tooltip id="tooltip-1" for=".any-class"> | ||
| <ix-icon slot="title-icon" name="info"></ix-icon> | ||
| <div slot="title-content">Tooltip Title</div> | ||
| Simple selector with icon | ||
| </ix-tooltip> |
18 changes: 18 additions & 0 deletions
18
packages/angular-test-app/src/preview-examples/tooltip-with-icon.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2024 Siemens AG | ||
| * | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| import { Component } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| standalone: false, | ||
| selector: 'app-example', | ||
| templateUrl: './tooltip-with-icon.html', | ||
| styleUrls: ['./tooltip.css'], | ||
| }) | ||
| export default class TooltipWithIcon {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
packages/html-test-app/src/preview-examples/tooltip-with-icon.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: 2024 Siemens AG | ||
|
|
||
| SPDX-License-Identifier: MIT | ||
|
|
||
| This source code is licensed under the MIT license found in the | ||
| LICENSE file in the root directory of this source tree. | ||
| --> | ||
|
|
||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Tooltip example</title> | ||
| <link rel="stylesheet" href="./tooltip.css" /> | ||
| <script type="module"> | ||
| import { addIcons } from '@siemens/ix-icons'; | ||
| import { iconInfo } from '@siemens/ix-icons/icons'; | ||
|
|
||
| addIcons({ | ||
| iconInfo, | ||
| }); | ||
| </script> | ||
| </head> | ||
| <body> | ||
| <ix-button class="any-class" aria-describedby="tooltip-1"> | ||
| Hover me | ||
| </ix-button> | ||
| <ix-tooltip id="tooltip-1" for=".any-class"> | ||
| <ix-icon slot="title-icon" name="info"></ix-icon> | ||
| <div slot="title-content">Tooltip Title</div> | ||
| Simple selector with icon | ||
| </ix-tooltip> | ||
|
|
||
| <script type="module" src="./init.js"></script> | ||
| </body> | ||
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
packages/react-test-app/src/preview-examples/tooltip-with-icon.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2024 Siemens AG | ||
| * | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| */ | ||
|
|
||
| import './tooltip.scoped.css'; | ||
|
|
||
| import { IxButton, IxIcon, IxTooltip } from '@siemens/ix-react'; | ||
| import { iconInfo } from '@siemens/ix-icons/icons'; | ||
|
|
||
| export default () => { | ||
| return ( | ||
| <> | ||
| <IxButton className="any-class" aria-describedby="tooltip-1"> | ||
| Hover me | ||
| </IxButton> | ||
| <IxTooltip id="tooltip-1" for=".any-class"> | ||
| <IxIcon slot="title-icon" name={iconInfo}></IxIcon> | ||
| <div slot="title-content">Tooltip Title</div> | ||
| Simple selector with icon | ||
| </IxTooltip> | ||
| </> | ||
| ); | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
packages/vue-test-app/src/preview-examples/tooltip-with-icon.vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| <!-- | ||
| * SPDX-FileCopyrightText: 2024 Siemens AG | ||
| * | ||
| * SPDX-License-Identifier: MIT | ||
| * | ||
| * This source code is licensed under the MIT license found in the | ||
| * LICENSE file in the root directory of this source tree. | ||
| --> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { IxButton, IxTooltip, IxIcon } from '@siemens/ix-vue'; | ||
| import { iconInfo } from '@siemens/ix-icons/icons'; | ||
| </script> | ||
|
|
||
| <style scoped src="./tooltip.css"></style> | ||
|
|
||
| <template> | ||
| <IxButton class="any-class" aria-describedby="tooltip-1"> Hover me </IxButton> | ||
| <IxTooltip id="tooltip-1" for=".any-class"> | ||
| <IxIcon slot="title-icon" :name="iconInfo"></IxIcon> | ||
| <div slot="title-content">Tooltip Title</div> | ||
| Simple selector with icon</IxTooltip | ||
| > | ||
| </template> |
Binary file modified
BIN
+114 Bytes
(100%)
...nput/input.e2e.ts/input-tooltip-below-input-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+68 Bytes
(100%)
...put/input.e2e.ts/input-tooltip-below-input-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+170 Bytes
(100%)
...-second-level-visible-ellipsis-for-category-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5 Bytes
(100%)
...second-level-visible-ellipsis-for-category-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+184 Bytes
(100%)
...link---should-render-menu-items-with-a-href-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-1 Byte
(100%)
...ink---should-render-menu-items-with-a-href-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+126 Bytes
(100%)
...__/tests/menu/menu.e2e.ts/menu-show-tooltip-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
..._/tests/menu/menu.e2e.ts/menu-show-tooltip-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
...e.ts/menu-toggle---check-icon-functionality-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+112 Bytes
(100%)
....ts/menu-toggle---check-icon-functionality-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+56 Bytes
(100%)
...lider/slider.e2e.ts/should-show-float-steps-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-43 Bytes
(99%)
...ider/slider.e2e.ts/should-show-float-steps-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.31 KB
(73%)
...tooltip.e2e.ts/tooltip-Long-Text-long-words-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.5 KB
(72%)
...ooltip.e2e.ts/tooltip-Long-Text-long-words-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.86 KB
(73%)
...ooltip.e2e.ts/tooltip-Long-text-short-words-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.97 KB
(72%)
...oltip.e2e.ts/tooltip-Long-text-short-words-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.14 KB
(68%)
.../tests/tooltip/tooltip.e2e.ts/tooltip-Short-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4.18 KB
(68%)
...tests/tooltip/tooltip.e2e.ts/tooltip-Short-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+196 Bytes
(100%)
...p-delay-tooltip-placement-bottom-with-delay-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+58 Bytes
(100%)
...-delay-tooltip-placement-bottom-with-delay-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+48 Bytes
(100%)
...tip-delay-tooltip-placement-left-with-delay-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+70 Bytes
(100%)
...ip-delay-tooltip-placement-left-with-delay-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+165 Bytes
(100%)
...ip-delay-tooltip-placement-right-with-delay-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+63 Bytes
(100%)
...p-delay-tooltip-placement-right-with-delay-1-chromium---classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+111 Bytes
(100%)
...ltip-delay-tooltip-placement-top-with-delay-1-chromium---classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4 Bytes
(100%)
...tip-delay-tooltip-placement-top-with-delay-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4.86 KB
(73%)
...p/tooltip.e2e.ts/tooltip-fallback-placement-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-4.97 KB
(72%)
.../tooltip.e2e.ts/tooltip-fallback-placement-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+55 Bytes
(100%)
...ltip-global-style-not-bleeding-into-tooltip-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-8 Bytes
(100%)
...tip-global-style-not-bleeding-into-tooltip-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+387 Bytes
(100%)
...e2e.ts/tooltip-placement-near-viewport-edge-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+197 Bytes
(100%)
...2e.ts/tooltip-placement-near-viewport-edge-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+129 Bytes
(100%)
...e2e.ts/tooltip-placement-near-viewport-edge-2-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+200 Bytes
(100%)
...2e.ts/tooltip-placement-near-viewport-edge-2-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+385 Bytes
(100%)
...e2e.ts/tooltip-placement-near-viewport-edge-3-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+201 Bytes
(100%)
...2e.ts/tooltip-placement-near-viewport-edge-3-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+72 Bytes
(100%)
...e2e.ts/tooltip-placement-near-viewport-edge-4-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+198 Bytes
(100%)
...2e.ts/tooltip-placement-near-viewport-edge-4-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+38 Bytes
(100%)
...ltip.e2e.ts/tooltip-tooltip-inside-dropdown-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
-7 Bytes
(100%)
...tip.e2e.ts/tooltip-tooltip-inside-dropdown-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+220 Bytes
(100%)
...ltip.e2e.ts/tooltip-tooltip-position-bottom-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+59 Bytes
(100%)
...tip.e2e.ts/tooltip-tooltip-position-bottom-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+143 Bytes
(100%)
...ooltip.e2e.ts/tooltip-tooltip-position-left-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+47 Bytes
(100%)
...oltip.e2e.ts/tooltip-tooltip-position-left-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+200 Bytes
(100%)
...oltip.e2e.ts/tooltip-tooltip-position-right-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+48 Bytes
(100%)
...ltip.e2e.ts/tooltip-tooltip-position-right-1-chromium---classic-light-linux.png
Oops, something went wrong.
Binary file modified
BIN
+130 Bytes
(100%)
...tooltip.e2e.ts/tooltip-tooltip-position-top-1-chromium---classic-dark-linux.png
Oops, something went wrong.
Binary file modified
BIN
+1 Byte
(100%)
...ooltip.e2e.ts/tooltip-tooltip-position-top-1-chromium---classic-light-linux.png
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.