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

Code assistance context menu is missing #2868

Open
math1man opened this issue Feb 21, 2024 · 6 comments
Open

Code assistance context menu is missing #2868

math1man opened this issue Feb 21, 2024 · 6 comments

Comments

@math1man
Copy link

What happened?

DartPad appears to have been updated in a major way. I noticed that following the update, the code assistance context menu for Flutter (with commands like "Wrap in SizedBox", "Remove widget", "Swap with parent", etc) is no longer accessible.

Steps to reproduce problem

Open DartPad, switch to a Flutter sample, position the cursor on a widget constructor and press Opt-Enter (for Mac, may vary by OS).

Browser

Browser: Chrome

Version: 121.0.6167.160

Are you using any extensions/plugins that affect website behavior
(particularly those that affect iframes, such as ad blockers)? No

Are there any warnings or errors in your browser's JavaScript console? No

Machine

Operating system: MacOS

Version: Sonoma 14.3.1

@mit-mit
Copy link
Member

mit-mit commented Feb 21, 2024

Whoa, I didn't even know this feature existed. If we bring it back (and it sounds like a cool thing to have!), I suggest we do something to make it more discoverable. For example, maybe a button in the toolbar or something like that.

@math1man
Copy link
Author

It works similarly in VS Code and AndroidStudio when using the Flutter plugins.

@devoncarew
Copy link
Member

I think the issue is that keybinding changed - it's now command-. (visible from the keybindings shortcut action in the bottom left).

Screenshot 2024-02-21 at 12 15 51 PM

It may be that we should alias the keyboard shortcut?

@math1man
Copy link
Author

math1man commented Feb 21, 2024

Oh interesting. I guess this changed from the default AndroidStudio key binding to the default VS Code keybinding. It would be much appreciated if you could support both!

@mit-mit
Copy link
Member

mit-mit commented Feb 21, 2024

It works similarly in VS Code and AndroidStudio when using the Flutter plugins.

Right, but one big difference is that they show a small UI element (in code it's a lightbulb) to let the user know that this menu exists. I've love to see something similar in DartPad.

@math1man
Copy link
Author

That's true.

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

No branches or pull requests

3 participants