Skip to content

Bug - Chip - tooltip not shown when under Expandable section or similar #9690

@celdrake

Description

@celdrake

Describe the problem
The Chip component determines if it needs to show a tooltip (to be seen when the text is very long), at the moment that it's mounted.

When combined with a component such as a Expandable section, the result is that the tooltip won't be shown even for very long text.

How do you reproduce the problem?
See the sandbox. The second section demonstrates the problem.
https://codesandbox.io/s/pensive-wescoff-t46t3r?file=/index.js

Expected behavior
For a long text, the tooltip should be displayed, no matter if the component is initially hidden or not.
If it cannot be controlled, maybe provide a property that can be passed so that consuming apps can force the tooltip for certain text lengths, etc.

Is this issue blocking you?
No, if necessary we'll try to figure out a workaround.

Video
See the video demonstrating what can be seen in the provided Sandbox.
https://github.com/patternfly/patternfly-react/assets/829045/fc146765-c5bc-4649-9f31-64c9319166c2

What is your environment?
We use Patternfly v4, but the Sandbox is v5.0.1 and the same problem appears as well.
In both cases, I see that the same strategy of using componentDidMount is used in the Chip component.

  • Browser: the issue is present equally with Chrome and Firefox.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions