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

fix: Tooltip displays wrong message when used with IconButton, FloatingActionButton and PopupMenuButton #3922

Merged
merged 2 commits into from
Sep 2, 2024

Conversation

ndonkoHenri
Copy link
Contributor

@ndonkoHenri ndonkoHenri commented Sep 2, 2024

Description

Fixes #3920

Summary by Sourcery

Fix tooltip display issues by removing incorrect tooltip assignments from IconButton, FloatingActionButton, and PopupMenuButton components.

Bug Fixes:

  • Fix the issue where the Tooltip displays the wrong message when used with IconButton, FloatingActionButton, and PopupMenuButton by removing incorrect tooltip assignments.

Copy link
Contributor

sourcery-ai bot commented Sep 2, 2024

Reviewer's Guide by Sourcery

This pull request addresses an issue with the Tooltip component displaying incorrect messages when used with IconButton, FloatingActionButton, and PopupMenuButton. The changes involve removing the tooltip property from these components and adjusting the tooltip visibility logic.

File-Level Changes

Change Details Files
Removed tooltip property from PopupMenuButton, FloatingActionButton, and IconButton components
  • Removed 'tooltip' variable and its assignment
  • Removed 'tooltip' property from PopupMenuButton constructor
  • Adjusted TooltipVisibility logic
  • Removed 'tooltip' property from FloatingActionButton constructor
  • Removed 'tooltip' property from IconButton constructor
packages/flet/lib/src/controls/popup_menu_button.dart
packages/flet/lib/src/controls/floating_action_button.dart
packages/flet/lib/src/controls/icon_button.dart
Modified tooltip handling in create_control.dart
  • Removed condition checking for specific control types
  • Simplified tooltip application logic
packages/flet/lib/src/controls/create_control.dart

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ndonkoHenri - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The approach to handling tooltips seems inconsistent across different components. Consider standardizing the implementation for better maintainability.
  • There's a debug print statement left in the popup_menu_button.dart file. Please remove this before merging.
  • It would be helpful to add comments explaining the rationale behind these changes, especially in relation to the issue being fixed (Tooltip object displays wrong message on IconButton #3920).
Here's what I looked at during the review
  • 🟡 General issues: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@FeodorFitsner FeodorFitsner merged commit 48da1e4 into main Sep 2, 2024
3 checks passed
@FeodorFitsner FeodorFitsner deleted the fix-tooltip branch September 2, 2024 19:07
@ndonkoHenri ndonkoHenri linked an issue Sep 3, 2024 that may be closed by this pull request
1 task
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.

unicode string in tooltip Tooltip object displays wrong message on IconButton
2 participants