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

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

Open
elliette opened this issue Feb 24, 2025 · 1 comment
Open

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

elliette opened this issue Feb 24, 2025 · 1 comment
Labels
analysis-server-change-needed issues that require a corresponding change to the Analysis Server P2 important to work on, but not at the top of the work list. property editor

Comments

@elliette
Copy link
Member

Each editable argument should have an info (i) tooltip that when hovered displays:

  • the default value, if it has one
  • the documentation for that argument

See discussion here: #8891 (comment)

The documentation should match what a user sees when they hover over the argument in their IDE:

Image

This will require an update to the Analysis Server editableArguments API, similarly to the change to include the documentation for the widget itself:

{
    "name": "Center",
    "documentation": "Creates a widget that centers its child.",
    "arguments": [
      {
        "name": "width",
        "type": "double",
        "value": 120.0,
        "isDefault": false,
        "documentation": "If non-null, requires the child to have exactly this width." <-- NEW FIELD
      },
      {
        "name": "height",
        "type": "double",
        "value": 240.0,
        "isDefault": false,
        "documentation": "If non-null, requires the child to have exactly this height." <--- NEW FIELD
      },
     ....
@elliette elliette added P2 important to work on, but not at the top of the work list. property editor analysis-server-change-needed issues that require a corresponding change to the Analysis Server labels Feb 24, 2025
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Feb 24, 2025
…ent fields

If an argument is for a field parameter, this includes the documentation from that field, so that the property editor can show the same content you'd see by hovering over the argument name in the editor.

See flutter/devtools#8938

Change-Id: Iebee757dd42fe9da2c8938c95febc99c0c96b609
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/411684
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Brian Wilkerson <[email protected]>
Reviewed-by: Elliott Brooks <[email protected]>
@DanTup
Copy link
Contributor

DanTup commented Feb 26, 2025

Adding docs to arguments landed in dart-lang/sdk@af68c2d but will need to roll into Flutter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analysis-server-change-needed issues that require a corresponding change to the Analysis Server P2 important to work on, but not at the top of the work list. property editor
Projects
None yet
Development

No branches or pull requests

2 participants