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

Enhancement: Add ability to add tooltip to Icon in List component #2878

Closed
dulldrums opened this issue Aug 21, 2021 · 3 comments
Closed

Enhancement: Add ability to add tooltip to Icon in List component #2878

dulldrums opened this issue Aug 21, 2021 · 3 comments
Milestone

Comments

@dulldrums
Copy link

Description

Cannot add a tooltip to an Icon placed inside a List Item component.

Adding a tooltip to an icon in a List component item row could be useful in certain cases. In this specific case, there were multiple icons in the row, and adding a tooltip could clarify their behavior.

Currently, we can only add a tooltip to the List Item component or components using slot="actions-start", but not to icons within the List Item component using slot="content-start".

Acceptance Criteria

The ability to use a tooltip for an icon in a List Item.

Relevant Info

version: 1.0.0-beta.62

workaround: Use slot="actions-start" on the icon

Which Component

List: https://developers.arcgis.com/calcite-design-system/components/list/
Icon: https://developers.arcgis.com/calcite-design-system/components/icon/

Example Use Case

Here is a codepen: https://codepen.io/dulldrums/pen/XWgrrqM

@dulldrums dulldrums added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Aug 21, 2021
@driskull
Copy link
Member

@asangma this is because the pointer events for the content is set to none. https://github.com/Esri/calcite-components/blob/master/src/components/calcite-list-item/calcite-list-item.scss#L74-L77

Do we need that set?

Here's a temporary workaround...

<calcite-icon
                        style="pointer-events:auto;"

@julio8a julio8a removed the needs triage Planning workflow - pending design/dev review. label Sep 24, 2021
@julio8a julio8a added this to the Freezer milestone Sep 24, 2021
@jcfranco
Copy link
Member

I think content slots are not interactive by design, but I could be wrong. @asangma Can you chime on this one?

@macandcheese
Copy link
Contributor

I think content slots are not interactive by design, but I could be wrong.

Agreed - In this case the recommendation would be to use the actions-end (or start) slot to house a trigger for the tooltip: https://codepen.io/mac_and_cheese/pen/ExEajNN?editors=1000

@macandcheese macandcheese removed enhancement Issues tied to a new feature or request. 0 - new New issues that need assignment. labels Jun 29, 2022
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

5 participants