Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Property Editor] Add a tooltip for the property's default value and documentation#9058

Merged
elliette merged 8 commits intoflutter:masterfrom
elliette:issue-8938
Mar 25, 2025
Merged

[Property Editor] Add a tooltip for the property's default value and documentation#9058
elliette merged 8 commits intoflutter:masterfrom
elliette:issue-8938

Conversation

@elliette
Copy link
Member

@elliette elliette commented Mar 21, 2025

Fixes #8938

Each property input has an info icon to its left which, when hovered, displays a tooltip with the default value and documentation.

Screenshot 2025-03-21 at 2 21 03 PM

Screenshot 2025-03-21 at 2 39 23 PM

@elliette elliette requested a review from a team as a code owner March 21, 2025 21:26
@elliette elliette requested review from kenzieschmoll and removed request for a team March 21, 2025 21:26
@elliette
Copy link
Member Author

Note: I tried to have the info tooltip in input label (as initially described here: #8891 (comment)) but I couldn't get the gesture detector to recognize a hover and show the tooltip.

Copy link
Member

@kenzieschmoll kenzieschmoll left a comment

Choose a reason for hiding this comment

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

can you add a test that verifies the contents of the new tooltip for a widget property?

@elliette
Copy link
Member Author

can you add a test that verifies the contents of the new tooltip for a widget property?

Done!

Comment on lines +1227 to +1231
Whether or not the text should wrap.

If null, the default value is platform dependent. On TargetPlatform.android,
the default is true. On TargetPlatform.iOS, false. The remaining platforms
also default to false.
Copy link
Member

Choose a reason for hiding this comment

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

can you use String interpolation here instead? $softWrapDocumentation

Copy link
Member Author

Choose a reason for hiding this comment

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

We're also testing that the brackets are correctly removed, so it's not identical to the documentation string.

Default value: Alignment.bottomLeft

Documentation:
How to align the child.
Copy link
Member

Choose a reason for hiding this comment

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

same comment

Copy link
Member

@kenzieschmoll kenzieschmoll left a comment

Choose a reason for hiding this comment

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

one comment then lgtm

@elliette elliette merged commit 29aa8bd into flutter:master Mar 25, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Property Editor] "info" pop-up for editable arguments

2 participants