godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.07k stars 69 forks source link

please don't go to the Script Editor or change the EditorInspector when connecting a signal to an existing method #9543

Open jinyangcruise opened 2 months ago

jinyangcruise commented 2 months ago

Describe the project you are working on

A plugin that can bind callable as data source to properties.

Describe the problem or limitation you are having in your project

My plugin adds some controls in the EditorInspector, there is a button in it will trigger the Engine's ConnectDialog for user to connect a signal to a method. When confirmed, Script Editor is opened and the content in the EditorInspector will lose. This is a little bit annoying.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I have two ideas:

  1. When connect a signal to a method, if the method exists, there is no need to jump to the Script Editor, so we can continue our work in the EditorInspector. If the method doesn't exists, just keep the old way to open the Script Editor and add a new method.
  2. Maybe the real probem is that the EditorInspector will lose it's content when the connection is made. So, what if the EditorInspector keeps it's state in the signal-connection process?

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

NA

If this enhancement will not be used often, can it be worked around with a few lines of script?

For now, this problem seems like a user experience problem. Users need to re-click their nodes to make the EditorInspector to show the content they need.

Is there a reason why this should be core and not an add-on in the asset library?

This is about improving user experience.

Calinou commented 2 months ago

This is already implemented as an editor setting in 4.3: https://github.com/godotengine/godot/pull/89249