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

Feature Request: Allow External Control of Tooltip Animation #115

Closed
ryannapp-fedex opened this issue Aug 21, 2024 · 6 comments
Closed

Feature Request: Allow External Control of Tooltip Animation #115

ryannapp-fedex opened this issue Aug 21, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@ryannapp-fedex
Copy link
Contributor

ryannapp-fedex commented Aug 21, 2024

Is your feature request related to a problem? Please describe.

I'm currently using the super_tooltip package and have a scenario where I need to control the showing and hiding of the tooltip based on external factors, such as BLoC events. The current implementation tightly couples the animation process to the internal _showTooltip() method, making it difficult to override or control the animation externally. This limitation hinders my ability to integrate the tooltip's visibility with the state management logic I am using in my application.

For example, I have a scenario where I want the tooltip to appear ONLY when triggered by a BLoC event. In this case, I am able to show the tooltip when triggering a ShowTooltipEvent BUT the tooltip still shows when the user taps on the child widget that the tooltip wraps. It would be great if the tooltip's visibility could be controlled exclusively by things like BLoC events or other external factors, without any interference from the built-in tap handling logic of the SuperTooltip.

Describe the solution you'd like

I would like the ability to customize or override the animation logic within the _showTooltip() method. Specifically, a callback or parameter could be introduced that allows users to control the animation externally. This enhancement would provide flexibility for developers to manage tooltip visibility based on external triggers, such as BLoC events or other state changes, without being restricted by the internal AnimationController.

Describe alternatives you've considered

As a workaround, I considered implementing custom tooltips from scratch or bypassing the animation by manipulating the internal state of the SuperTooltip widget. However, these approaches are not ideal as they require significant changes and do not leverage the existing features provided by the super_tooltip package.

Additional context

Integrating this feature would allow for more dynamic and responsive UI behavior, particularly in applications where state management is handled externally (e.g., using BLoC). This addition would make the super_tooltip package more versatile and applicable to a wider range of use cases.

@bensonarafat bensonarafat self-assigned this Aug 24, 2024
@bensonarafat bensonarafat added the enhancement New feature or request label Aug 24, 2024
@bensonarafat
Copy link
Owner

Thanks @ryannapp-fedex

@ryannapp-fedex
Copy link
Contributor Author

Hey @bensonarafat -- no pressure at all but do you have a rough estimate on when support for this might be added in? We have a new feature planned for our next release and a big portion of it includes this tooltip. Just wanted to get an idea in case we needed to push this feature back to a following release instead.

@bensonarafat
Copy link
Owner

@ryannapp-fedex
Right now, I don't have enough time to work on it.
But if you can, you fork the repo, and add the features, I will review and merge.
Thanks for your understanding

@ryannapp-fedex
Copy link
Contributor Author

@bensonarafat sounds great!

@ryannapp-fedex
Copy link
Contributor Author

ryannapp-fedex commented Aug 30, 2024

@bensonarafat Just opened up a PR -- lmk if you would like any other changes made

@bensonarafat
Copy link
Owner

Okay, great @ryannapp-fedex

bensonarafat added a commit that referenced this issue Aug 31, 2024
…n-control

Feature Request: Allow External Control of Tooltip Animation #115
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants