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

[1696] Refactored Tooltip implementation #1834

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

TheNoumanDev
Copy link
Member

@TheNoumanDev TheNoumanDev commented Jan 14, 2025

@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';
Copy link
Member

@sharjeelyunus sharjeelyunus Jan 29, 2025

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
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?

Copy link
Member

@sharjeelyunus sharjeelyunus Feb 3, 2025

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
Member Author

Choose a reason for hiding this comment

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

updated

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