Skip to content

Refactor Tooltip Implementation to Utilize Properties instead of widget. #1017

@TheNoumanDev

Description

@TheNoumanDev

Title: Refactor Tooltip Implementation in ensemble_react to Property-based Approach

Description:
We need to align ensemble_react's tooltip implementation with ensemble_flutter by moving from a widget-based to a property-based approach.

Current State:

  • Tooltip is implemented as a wrapper widget
  • This approach goes against Ensemble's core design philosophy so we changed the ensemble_flutter appraoch as well.

Required Changes:

  1. Deprecation Steps:

    • Mark existing TooltipWidget as deprecated
    • Keep existing implementation temporarily for backward compatibility
  2. New Implementation:

  TextStyle? textStyle;
  double? verticalOffset;
  bool? preferBelow;
  Duration? waitDuration;
  Duration? showDuration;
  TooltipTriggerMode? triggerMode;
  Color? backgroundColor;
  BorderRadius? borderRadius;
  EdgeInsets? padding;
  EdgeInsets? margin;
  EnsembleAction? onTriggered;
  Color? borderColor;
  int? borderWidth;
  1. Schema Updates:
    • Remove TooltipWidget from schema validation
    • Add new tooltip properties to all widget schemas
    • Update documentation to reflect new approach

Referance Tickets:

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions