Skip to content

[1696] Refactored Tooltip implementation - #1834

Merged
TheNoumanDev merged 5 commits into
mainfrom
tooltip0x45
Feb 7, 2025
Merged

[1696] Refactored Tooltip implementation#1834
TheNoumanDev merged 5 commits into
mainfrom
tooltip0x45

Conversation

@TheNoumanDev

@TheNoumanDev TheNoumanDev commented Jan 14, 2025

Copy link
Copy Markdown
Member

@TheNoumanDev TheNoumanDev self-assigned this Jan 14, 2025
Comment on lines -1 to -6
import 'package:ensemble/framework/event.dart';
import 'package:ensemble/framework/extensions.dart';
import 'package:ensemble/framework/theme/theme_manager.dart';
import 'package:ensemble/widget/helpers/controllers.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';

@sharjeelyunus sharjeelyunus Jan 29, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we removing this, if aren't supporting this anymore, should we just add deprecated message.
PS: Ensemble react also has the Tooltip widget and is widely used in Atlas. Best case is we should create utils and support both. We don't want users to learn 2 languages for framework

CC: @kmahmood74

borderRadius = Utils.getBorderRadius(inputs['borderRadius'])?.getValue();
padding = Utils.optionalInsets(inputs['padding']);
margin = Utils.optionalInsets(inputs['margin']);
onTriggered = inputs['onTriggered'] != null ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why onTriggered is part of tooltip styles?
isn't is a action, shouldn't it be a property, instead of a style?
onTooltipTriggered?

@sharjeelyunus sharjeelyunus Feb 3, 2025

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually instead of 3 new properties of tooltip, we should combine them in an map of 1 i.e tooltip

tooltip:
   message:
   onTriggered:
   styles:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

@TheNoumanDev
TheNoumanDev merged commit 4ba57cb into main Feb 7, 2025
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

Successfully merging this pull request may close these issues.

Refactor Tooltip Implementation to Utilize Native Properties instead.

2 participants