Skip to content

[EuiToolTip] Migrate from class to function component #9486

Closed

Description

@weronikaolejniczak

EuiToolTip displays a tooltip on hover/focus with positioning and delay logic. Highlighted as one of the most widely used EUI components.

  • File: components/tool_tip/tool_tip.tsx
  • Class size: 255 lines
  • State: visible, hasFocus, calculatedPosition, toolTipStyles, arrowStyles, id
  • Lifecycle: componentDidMount, componentDidUpdate, componentWillUnmount

Migration notes:

Multiple state fields and lifecycle methods managing show/hide delays, positioning calculations, and event listeners. Positioning recalculation on update needs careful useEffect dependency management.

Acceptance criteria:

  • Convert to function component with hooks
  • Maintain show/hide delay behavior
  • Maintain dynamic positioning
  • All existing tests pass
  • Manual verification of tooltip positioning in various contexts

Activity

  1. changed the title [-][EuiToolTip] Migrate from class to function component[/-] [+][EuiTooltip] Migrate from class to function component[/+] on Mar 20, 2026
  2. changed the title [-][EuiTooltip] Migrate from class to function component[/-] [+][EuiToolTip] Migrate from class to function component[/+] on Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions